diff options
Diffstat (limited to 'src/lib/libssl/src/crypto/asn1/a_verify.c')
-rw-r--r-- | src/lib/libssl/src/crypto/asn1/a_verify.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/src/crypto/asn1/a_verify.c b/src/lib/libssl/src/crypto/asn1/a_verify.c index da2a0a6d69..18ef0acf00 100644 --- a/src/lib/libssl/src/crypto/asn1/a_verify.c +++ b/src/lib/libssl/src/crypto/asn1/a_verify.c | |||
@@ -142,6 +142,13 @@ 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 | |||
145 | inl = ASN1_item_i2d(asn, &buf_in, it); | 152 | inl = ASN1_item_i2d(asn, &buf_in, it); |
146 | 153 | ||
147 | if (buf_in == NULL) | 154 | if (buf_in == NULL) |
@@ -150,7 +157,6 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat | |||
150 | goto err; | 157 | goto err; |
151 | } | 158 | } |
152 | 159 | ||
153 | EVP_VerifyInit_ex(&ctx,type, NULL); | ||
154 | EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl); | 160 | EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl); |
155 | 161 | ||
156 | OPENSSL_cleanse(buf_in,(unsigned int)inl); | 162 | OPENSSL_cleanse(buf_in,(unsigned int)inl); |