summaryrefslogtreecommitdiffstats
path: root/crypto/rsassa-pkcs1.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 07:22:04 +0200
commit221f00418e726237dbe38ba627ce08b22d3667f7 (patch)
tree58415891681c85d775fb3193b93f6f8ab79e1da5 /crypto/rsassa-pkcs1.c
parentcrypto: ecdsa - Move X9.62 signature decoding into template (diff)
downloadlinux-221f00418e726237dbe38ba627ce08b22d3667f7.tar.xz
linux-221f00418e726237dbe38ba627ce08b22d3667f7.zip
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/rsassa-pkcs1.c')
-rw-r--r--crypto/rsassa-pkcs1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rsassa-pkcs1.c b/crypto/rsassa-pkcs1.c
index b291ec0944a2..9c28f1c62826 100644
--- a/crypto/rsassa-pkcs1.c
+++ b/crypto/rsassa-pkcs1.c
@@ -302,7 +302,7 @@ static int rsassa_pkcs1_verify(struct crypto_sig *tfm,
return 0;
}
-static unsigned int rsassa_pkcs1_max_size(struct crypto_sig *tfm)
+static unsigned int rsassa_pkcs1_key_size(struct crypto_sig *tfm)
{
struct rsassa_pkcs1_ctx *ctx = crypto_sig_ctx(tfm);
@@ -419,7 +419,7 @@ static int rsassa_pkcs1_create(struct crypto_template *tmpl, struct rtattr **tb)
inst->alg.sign = rsassa_pkcs1_sign;
inst->alg.verify = rsassa_pkcs1_verify;
- inst->alg.max_size = rsassa_pkcs1_max_size;
+ inst->alg.key_size = rsassa_pkcs1_key_size;
inst->alg.set_pub_key = rsassa_pkcs1_set_pub_key;
inst->alg.set_priv_key = rsassa_pkcs1_set_priv_key;