[PATCH 4/5] rsa: fix typos and missing type definitions

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Sep 21 03:23:09 PDT 2023


Including <rsa.h> as first header shows some that some includes are
missing and looking into the file, the kerneldoc comment is out of date.
Fix both.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 include/rsa.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/rsa.h b/include/rsa.h
index 650fb234f263..f1e3c1b6c366 100644
--- a/include/rsa.h
+++ b/include/rsa.h
@@ -12,6 +12,7 @@
 #ifndef _RSA_H
 #define _RSA_H
 
+#include <linux/types.h>
 #include <errno.h>
 #include <digest.h>
 
@@ -38,10 +39,10 @@ struct rsa_public_key {
  * Verify a RSA PKCS1.5 signature against an expected hash.
  *
  * @info:	Specifies key and FIT information
- * @data:	Pointer to the input data
- * @data_len:	Data length
  * @sig:	Signature
  * @sig_len:	Number of bytes in signature
+ * @hash:	hash over payload
+ * @algo:	hashing algo
  * @return 0 if verified, -ve on error
  */
 int rsa_verify(const struct rsa_public_key *key, const uint8_t *sig,
@@ -51,6 +52,8 @@ int rsa_verify(const struct rsa_public_key *key, const uint8_t *sig,
 /* This is the maximum signature length that we support, in bits */
 #define RSA_MAX_SIG_BITS	4096
 
+struct device_node;
+
 struct rsa_public_key *rsa_of_read_key(struct device_node *node);
 void rsa_key_free(struct rsa_public_key *key);
 const struct rsa_public_key *rsa_get_key(const char *name);
-- 
2.39.2




More information about the barebox mailing list