summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_verify.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/a_verify.c')
-rw-r--r--src/lib/libcrypto/asn1/a_verify.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/lib/libcrypto/asn1/a_verify.c b/src/lib/libcrypto/asn1/a_verify.c
index 18ef0acf00..da2a0a6d69 100644
--- a/src/lib/libcrypto/asn1/a_verify.c
+++ b/src/lib/libcrypto/asn1/a_verify.c
@@ -142,13 +142,6 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
142 goto err; 142 goto err;
143 } 143 }
144 144
145 if (!EVP_VerifyInit_ex(&ctx,type, NULL))
146 {
147 ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB);
148 ret=0;
149 goto err;
150 }
151
152 inl = ASN1_item_i2d(asn, &buf_in, it); 145 inl = ASN1_item_i2d(asn, &buf_in, it);
153 146
154 if (buf_in == NULL) 147 if (buf_in == NULL)
@@ -157,6 +150,7 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
157 goto err; 150 goto err;
158 } 151 }
159 152
153 EVP_VerifyInit_ex(&ctx,type, NULL);
160 EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl); 154 EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
161 155
162 OPENSSL_cleanse(buf_in,(unsigned int)inl); 156 OPENSSL_cleanse(buf_in,(unsigned int)inl);