diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asymmetric_keys/public_key.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c index de996586762a..e929fe1e4106 100644 --- a/crypto/asymmetric_keys/public_key.c +++ b/crypto/asymmetric_keys/public_key.c | |||
@@ -79,9 +79,11 @@ int public_key_verify_signature(const struct public_key *pkey, | |||
79 | 79 | ||
80 | BUG_ON(!pkey); | 80 | BUG_ON(!pkey); |
81 | BUG_ON(!sig); | 81 | BUG_ON(!sig); |
82 | BUG_ON(!sig->digest); | ||
83 | BUG_ON(!sig->s); | 82 | BUG_ON(!sig->s); |
84 | 83 | ||
84 | if (!sig->digest) | ||
85 | return -ENOPKG; | ||
86 | |||
85 | alg_name = sig->pkey_algo; | 87 | alg_name = sig->pkey_algo; |
86 | if (strcmp(sig->pkey_algo, "rsa") == 0) { | 88 | if (strcmp(sig->pkey_algo, "rsa") == 0) { |
87 | /* The data wangled by the RSA algorithm is typically padded | 89 | /* The data wangled by the RSA algorithm is typically padded |