summaryrefslogtreecommitdiff
path: root/crypto/sig.c
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2024-09-10 16:30:26 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2024-10-05 13:22:04 +0800
commit221f00418e726237dbe38ba627ce08b22d3667f7 (patch)
tree58415891681c85d775fb3193b93f6f8ab79e1da5 /crypto/sig.c
parentd6793ff974e07e4eea151d1f0805e92d042825a1 (diff)
crypto: sig - Rename crypto_sig_maxsize() to crypto_sig_keysize()
crypto_sig_maxsize() is a bit of a misnomer as it doesn't return the maximum signature size, but rather the key size. Rename it as well as all implementations of the ->max_size callback. A subsequent commit introduces a crypto_sig_maxsize() function which returns the actual maximum signature size. While at it, change the return type of crypto_sig_keysize() from int to unsigned int for consistency with crypto_akcipher_maxsize(). None of the callers checks for a negative return value and an error condition can always be indicated by returning zero. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/sig.c')
-rw-r--r--crypto/sig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/sig.c b/crypto/sig.c
index 84d0ea9fd73b..7a3521bee29a 100644
--- a/crypto/sig.c
+++ b/crypto/sig.c
@@ -125,7 +125,7 @@ int crypto_register_sig(struct sig_alg *alg)
alg->set_priv_key = sig_default_set_key;
if (!alg->set_pub_key)
return -EINVAL;
- if (!alg->max_size)
+ if (!alg->key_size)
return -EINVAL;
sig_prepare_alg(alg);