diff options
author | Bodo Möller <bodo@openssl.org> | 2006-10-04 06:14:36 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2006-10-04 06:14:36 +0000 |
commit | d326582cabe290fff22678af0270667b2b2761d9 (patch) | |
tree | 2915b25e258da767331861511a6583ffb0bba3e6 /crypto/asn1 | |
parent | f4c630abb3552d5c8eabe23eadc5488017325449 (diff) |
ASN1_item_verify needs to initialize ctx before any "goto err" can
happen; the new code for the OID cross reference table failed to do so.
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/a_verify.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/a_verify.c b/crypto/asn1/a_verify.c index 4885539c26..cecdb13c70 100644 --- a/crypto/asn1/a_verify.c +++ b/crypto/asn1/a_verify.c @@ -136,8 +136,9 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat int mdnid, pknid; - /* Convert signature OID into digest and public key OIDs */ + EVP_MD_CTX_init(&ctx); + /* Convert signature OID into digest and public key OIDs */ if (!OBJ_find_sigid_algs(OBJ_obj2nid(a->algorithm), &mdnid, &pknid)) { ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM); @@ -157,7 +158,6 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat goto err; } - EVP_MD_CTX_init(&ctx); if (!EVP_VerifyInit_ex(&ctx,type, NULL)) { ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB); |