summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asn1/a_sign.c')
-rw-r--r--crypto/asn1/a_sign.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/asn1/a_sign.c b/crypto/asn1/a_sign.c
index 1081950..4dee45f 100644
--- a/crypto/asn1/a_sign.c
+++ b/crypto/asn1/a_sign.c
@@ -267,7 +267,12 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
goto err;
}
- EVP_SignInit_ex(&ctx,type, NULL);
+ if (!EVP_SignInit_ex(&ctx,type, NULL))
+ {
+ outl=0;
+ ASN1err(ASN1_F_ASN1_ITEM_SIGN,ERR_R_EVP_LIB);
+ goto err;
+ }
EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl);
if (!EVP_SignFinal(&ctx,(unsigned char *)buf_out,
(unsigned int *)&outl,pkey))
OpenPOWER on IntegriCloud