diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-09-23 23:43:49 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-09-23 23:43:49 +0000 |
commit | b6dcdbfc94c482f6c15ba725754fc9e827e41851 (patch) | |
tree | 9fec84d4564530bc97b42d56e01a64abb96adac3 /crypto/asn1/t_x509.c | |
parent | cd4f7cddc7994d23d48b86cf638541c6e2310c2d (diff) | |
download | openssl-b6dcdbfc94c482f6c15ba725754fc9e827e41851.tar.gz |
Audit libcrypto for unchecked return values: fix all cases enountered
Diffstat (limited to 'crypto/asn1/t_x509.c')
-rw-r--r-- | crypto/asn1/t_x509.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c index e061f2ffad..01cf9e427a 100644 --- a/crypto/asn1/t_x509.c +++ b/crypto/asn1/t_x509.c @@ -255,7 +255,8 @@ int X509_ocspid_print (BIO *bp, X509 *x) goto err; i2d_X509_NAME(x->cert_info->subject, &dertmp); - EVP_Digest(der, derlen, SHA1md, NULL, EVP_sha1(), NULL); + if (!EVP_Digest(der, derlen, SHA1md, NULL, EVP_sha1(), NULL)) + goto err; for (i=0; i < SHA_DIGEST_LENGTH; i++) { if (BIO_printf(bp,"%02X",SHA1md[i]) <= 0) goto err; @@ -268,8 +269,10 @@ int X509_ocspid_print (BIO *bp, X509 *x) if (BIO_printf(bp,"\n Public key OCSP hash: ") <= 0) goto err; - EVP_Digest(x->cert_info->key->public_key->data, - x->cert_info->key->public_key->length, SHA1md, NULL, EVP_sha1(), NULL); + if (!EVP_Digest(x->cert_info->key->public_key->data, + x->cert_info->key->public_key->length, + SHA1md, NULL, EVP_sha1(), NULL)) + goto err; for (i=0; i < SHA_DIGEST_LENGTH; i++) { if (BIO_printf(bp,"%02X",SHA1md[i]) <= 0) |