summaryrefslogtreecommitdiffstats
path: root/crypto/sig.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/sig.c')
-rw-r--r--crypto/sig.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/sig.c b/crypto/sig.c
index 7a3521bee29a..be5ac0e59384 100644
--- a/crypto/sig.c
+++ b/crypto/sig.c
@@ -127,6 +127,10 @@ int crypto_register_sig(struct sig_alg *alg)
return -EINVAL;
if (!alg->key_size)
return -EINVAL;
+ if (!alg->max_size)
+ alg->max_size = alg->key_size;
+ if (!alg->digest_size)
+ alg->digest_size = alg->key_size;
sig_prepare_alg(alg);
return crypto_register_alg(base);