Message ID | 20160628153514.GA4515@localhost (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c index 8be2586..db53267 100644 --- a/crypto/asymmetric_keys/public_key.c +++ b/crypto/asymmetric_keys/public_key.c @@ -68,6 +68,9 @@ int software_key_determine_akcipher(const char *encoding, { int n; + if (!encoding) + return -ENOPKG; + if (strcmp(encoding, "pkcs1") == 0) { /* The data wangled by the RSA algorithm is typically padded * and encoded in some manner, such as EMSA-PKCS1-1_5 [RFC3447