projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don't try and verify signatures if key is NULL (CVE-2013-0166)
[oweals/openssl.git]
/
crypto
/
asn1
/
a_verify.c
diff --git
a/crypto/asn1/a_verify.c
b/crypto/asn1/a_verify.c
index cecdb13c70901ab77367c563a1000dcaecaf0cff..097ec813ac24dbb42956a037ab5ecaab8fa3f995 100644
(file)
--- a/
crypto/asn1/a_verify.c
+++ b/
crypto/asn1/a_verify.c
@@
-136,6
+136,12
@@
int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
int mdnid, pknid;
+ if (!pkey)
+ {
+ ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ERR_R_PASSED_NULL_PARAMETER);
+ return -1;
+ }
+
EVP_MD_CTX_init(&ctx);
/* Convert signature OID into digest and public key OIDs */