Submitted by: Mounir IDRASSI <mounir.idrassi@idrix.net>
Approved by: steve@openssl.org

Check return value of ECDSA_sign() properly.
This commit is contained in:
Dr. Stephen Henson 2009-11-30 13:53:42 +00:00
parent e274c8fb72
commit 9117b9d17a

View File

@ -143,7 +143,7 @@ static int pkey_ec_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
ret = ECDSA_sign(type, tbs, tbslen, sig, &sltmp, ec);
if (ret < 0)
if (ret <= 0)
return ret;
*siglen = (size_t)sltmp;
return 1;