summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_verify.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2005-04-26 23:21:49 +0000
committerDr. Stephen Henson <steve@openssl.org>2005-04-26 23:21:49 +0000
commit2deadf1672b11e352a596629643e45611e5a6962 (patch)
treecb0fa4c446cd8b7649ebc28ecb16182ff63f7993 /crypto/asn1/a_verify.c
parent9ea862e0b37b82734e890fdc735eb00aeda80d5c (diff)
Port from stable branch.
Diffstat (limited to 'crypto/asn1/a_verify.c')
-rw-r--r--crypto/asn1/a_verify.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/crypto/asn1/a_verify.c b/crypto/asn1/a_verify.c
index e7ba32f3f1..05329277a2 100644
--- a/crypto/asn1/a_verify.c
+++ b/crypto/asn1/a_verify.c
@@ -142,6 +142,13 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
goto err;
}
+ if (!EVP_VerifyInit_ex(&ctx,type, NULL))
+ {
+ ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB);
+ ret=0;
+ goto err;
+ }
+
inl = ASN1_item_i2d(asn, &buf_in, it);
if (buf_in == NULL)
@@ -150,12 +157,6 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
goto err;
}
- if (!EVP_VerifyInit_ex(&ctx,type, NULL))
- {
- ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB);
- ret=0;
- goto err;
- }
EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
OPENSSL_cleanse(buf_in,(unsigned int)inl);