aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_verify.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2001-07-30 23:57:25 +0000
committerBen Laurie <ben@openssl.org>2001-07-30 23:57:25 +0000
commitdbad169019598981174ff46c7a9bf58373b0e53a (patch)
treece8ca1188d5614648f24b03967785543f1edc8f5 /crypto/asn1/a_verify.c
parent3ba5d1cf2eb6ef28ac5f6d9f3d28020d00c5be50 (diff)
downloadopenssl-dbad169019598981174ff46c7a9bf58373b0e53a.tar.gz
Really add the EVP and all of the DES changes.
Diffstat (limited to 'crypto/asn1/a_verify.c')
-rw-r--r--crypto/asn1/a_verify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/asn1/a_verify.c b/crypto/asn1/a_verify.c
index 4b4a240f50..59ba322839 100644
--- a/crypto/asn1/a_verify.c
+++ b/crypto/asn1/a_verify.c
@@ -81,6 +81,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
unsigned char *p,*buf_in=NULL;
int ret= -1,i,inl;
+ EVP_MD_CTX_init(&ctx);
i=OBJ_obj2nid(a->algorithm);
type=EVP_get_digestbyname(OBJ_nid2sn(i));
if (type == NULL)
@@ -117,6 +118,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
/* memset(&ctx,0,sizeof(ctx)); */
ret=1;
err:
+ EVP_MD_CTX_cleanup(&ctx);
return(ret);
}
@@ -131,6 +133,7 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
unsigned char *buf_in=NULL;
int ret= -1,i,inl;
+ EVP_MD_CTX_init(&ctx);
i=OBJ_obj2nid(a->algorithm);
type=EVP_get_digestbyname(OBJ_nid2sn(i));
if (type == NULL)
@@ -165,6 +168,7 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signat
/* memset(&ctx,0,sizeof(ctx)); */
ret=1;
err:
+ EVP_MD_CTX_cleanup(&ctx);
return(ret);
}