aboutsummaryrefslogtreecommitdiff
path: root/lib/rsa
diff options
context:
space:
mode:
authorHeinrich Schuchardt2022-01-19 18:05:50 +0100
committerHeinrich Schuchardt2022-01-19 18:11:34 +0100
commit185f812c419f1b4f0d10d9787d59cf9f11a2a600 (patch)
tree2fea02768d6005934547f075586c60ba7aca6253 /lib/rsa
parent6a685753ce8b6b02b67d64b239143bf19eda63c9 (diff)
doc: replace @return by Return:
Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib/rsa')
-rw-r--r--lib/rsa/rsa-mod-exp.c4
-rw-r--r--lib/rsa/rsa-sign.c12
-rw-r--r--lib/rsa/rsa-verify.c8
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/rsa/rsa-mod-exp.c b/lib/rsa/rsa-mod-exp.c
index 74f9eb16cc2..d259b2aedf2 100644
--- a/lib/rsa/rsa-mod-exp.c
+++ b/lib/rsa/rsa-mod-exp.c
@@ -59,7 +59,7 @@ static void subtract_modulus(const struct rsa_public_key *key, uint32_t num[])
*
* @key: Key containing modulus to check
* @num: Number to check against modulus, as little endian word array
- * @return 0 if num < modulus, 1 if num >= modulus
+ * Return: 0 if num < modulus, 1 if num >= modulus
*/
static int greater_equal_modulus(const struct rsa_public_key *key,
uint32_t num[])
@@ -315,7 +315,7 @@ int rsa_mod_exp_sw(const uint8_t *sig, uint32_t sig_len,
*
* @keyptr: RSA key
* @inout: Big-endian word array containing value and result
- * @return 0 on successful calculation, otherwise failure error code
+ * Return: 0 on successful calculation, otherwise failure error code
*
* FIXME: Use pow_mod() instead of zynq_pow_mod()
* pow_mod calculation required for zynq is bit different from
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index 3b6e5f0f86c..a95a3d2748a 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -38,7 +38,7 @@ static int rsa_err(const char *msg)
* @keydir: Directory containins the key
* @name Name of key file (will have a .crt extension)
* @evpp Returns EVP_PKEY object, or NULL on failure
- * @return 0 if ok, -ve on error (in which case *evpp will be set to NULL)
+ * Return: 0 if ok, -ve on error (in which case *evpp will be set to NULL)
*/
static int rsa_pem_get_pub_key(const char *keydir, const char *name, EVP_PKEY **evpp)
{
@@ -96,7 +96,7 @@ err_cert:
* @name Name of key
* @engine Engine to use
* @evpp Returns EVP_PKEY object, or NULL on failure
- * @return 0 if ok, -ve on error (in which case *evpp will be set to NULL)
+ * Return: 0 if ok, -ve on error (in which case *evpp will be set to NULL)
*/
static int rsa_engine_get_pub_key(const char *keydir, const char *name,
ENGINE *engine, EVP_PKEY **evpp)
@@ -156,7 +156,7 @@ static int rsa_engine_get_pub_key(const char *keydir, const char *name,
* @name Name of key file (will have a .crt extension)
* @engine Engine to use
* @evpp Returns EVP_PKEY object, or NULL on failure
- * @return 0 if ok, -ve on error (in which case *evpp will be set to NULL)
+ * Return: 0 if ok, -ve on error (in which case *evpp will be set to NULL)
*/
static int rsa_get_pub_key(const char *keydir, const char *name,
ENGINE *engine, EVP_PKEY **evpp)
@@ -172,7 +172,7 @@ static int rsa_get_pub_key(const char *keydir, const char *name,
* @keydir: Directory containing the key
* @name Name of key file (will have a .key extension)
* @evpp Returns EVP_PKEY object, or NULL on failure
- * @return 0 if ok, -ve on error (in which case *evpp will be set to NULL)
+ * Return: 0 if ok, -ve on error (in which case *evpp will be set to NULL)
*/
static int rsa_pem_get_priv_key(const char *keydir, const char *name,
const char *keyfile, EVP_PKEY **evpp)
@@ -215,7 +215,7 @@ static int rsa_pem_get_priv_key(const char *keydir, const char *name,
* @name Name of key
* @engine Engine to use
* @evpp Returns EVP_PKEY object, or NULL on failure
- * @return 0 if ok, -ve on error (in which case *evpp will be set to NULL)
+ * Return: 0 if ok, -ve on error (in which case *evpp will be set to NULL)
*/
static int rsa_engine_get_priv_key(const char *keydir, const char *name,
const char *keyfile,
@@ -283,7 +283,7 @@ static int rsa_engine_get_priv_key(const char *keydir, const char *name,
* @name Name of key
* @engine Engine to use for signing
* @evpp Returns EVP_PKEY object, or NULL on failure
- * @return 0 if ok, -ve on error (in which case *evpp will be set to NULL)
+ * Return: 0 if ok, -ve on error (in which case *evpp will be set to NULL)
*/
static int rsa_get_priv_key(const char *keydir, const char *name,
const char *keyfile, ENGINE *engine, EVP_PKEY **evpp)
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index 83f7564101c..fbb2d35a7d5 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -47,7 +47,7 @@
* @msg: Padded message
* @pad_len: Number of expected padding bytes
* @algo: Checksum algo structure having information on DER encoding etc.
- * @return 0 on success, != 0 on failure
+ * Return: 0 on success, != 0 on failure
*/
static int rsa_verify_padding(const uint8_t *msg, const int pad_len,
struct checksum_algo *algo)
@@ -122,7 +122,7 @@ static void u32_i2osp(uint32_t val, uint8_t *buf)
* @seed_len: Size of the input octet string
* @output: Specifies the output octet string
* @output_len: Size of the output octet string
- * @return 0 if the octet string was correctly generated, others on error
+ * Return: 0 if the octet string was correctly generated, others on error
*/
static int mask_generation_function1(struct checksum_algo *checksum,
uint8_t *seed, int seed_len,
@@ -325,7 +325,7 @@ U_BOOT_PADDING_ALGO(pss) = {
* @sig_len: Number of bytes in signature
* @hash: Pointer to the expected hash
* @key_len: Number of bytes in rsa key
- * @return 0 if verified, -ve on error
+ * Return: 0 if verified, -ve on error
*/
static int rsa_verify_key(struct image_sign_info *info,
struct key_prop *prop, const uint8_t *sig,
@@ -437,7 +437,7 @@ int rsa_verify_with_pkey(struct image_sign_info *info,
* @sig: Signature
* @sig_len: Number of bytes in signature
* @node: Node having the RSA Key properties
- * @return 0 if verified, -ve on error
+ * Return: 0 if verified, -ve on error
*/
static int rsa_verify_with_keynode(struct image_sign_info *info,
const void *hash, uint8_t *sig,