summaryrefslogtreecommitdiffstats
path: root/crypto/ecrdsa.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/ecrdsa.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/ecrdsa.c')
-rw-r--r--crypto/ecrdsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ecrdsa.c b/crypto/ecrdsa.c
index 7383dd11089b..f981b31f4249 100644
--- a/crypto/ecrdsa.c
+++ b/crypto/ecrdsa.c
@@ -241,7 +241,7 @@ static int ecrdsa_set_pub_key(struct crypto_sig *tfm, const void *key,
return 0;
}
-static unsigned int ecrdsa_max_size(struct crypto_sig *tfm)
+static unsigned int ecrdsa_key_size(struct crypto_sig *tfm)
{
struct ecrdsa_ctx *ctx = crypto_sig_ctx(tfm);
@@ -259,7 +259,7 @@ static void ecrdsa_exit_tfm(struct crypto_sig *tfm)
static struct sig_alg ecrdsa_alg = {
.verify = ecrdsa_verify,
.set_pub_key = ecrdsa_set_pub_key,
- .max_size = ecrdsa_max_size,
+ .key_size = ecrdsa_key_size,
.exit = ecrdsa_exit_tfm,
.base = {
.cra_name = "ecrdsa",