diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_digest.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_digest.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/a_digest.c b/src/lib/libcrypto/asn1/a_digest.c index d00d9e22b1..cbdeea6ac0 100644 --- a/src/lib/libcrypto/asn1/a_digest.c +++ b/src/lib/libcrypto/asn1/a_digest.c | |||
@@ -87,7 +87,8 @@ int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, | |||
87 | p=str; | 87 | p=str; |
88 | i2d(data,&p); | 88 | i2d(data,&p); |
89 | 89 | ||
90 | EVP_Digest(str, i, md, len, type, NULL); | 90 | if (!EVP_Digest(str, i, md, len, type, NULL)) |
91 | return 0; | ||
91 | OPENSSL_free(str); | 92 | OPENSSL_free(str); |
92 | return(1); | 93 | return(1); |
93 | } | 94 | } |
@@ -104,7 +105,8 @@ int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, | |||
104 | i=ASN1_item_i2d(asn,&str, it); | 105 | i=ASN1_item_i2d(asn,&str, it); |
105 | if (!str) return(0); | 106 | if (!str) return(0); |
106 | 107 | ||
107 | EVP_Digest(str, i, md, len, type, NULL); | 108 | if (!EVP_Digest(str, i, md, len, type, NULL)) |
109 | return 0; | ||
108 | OPENSSL_free(str); | 110 | OPENSSL_free(str); |
109 | return(1); | 111 | return(1); |
110 | } | 112 | } |