Check for a failure return from EVP_MD_CTX_new() in OCSP_basic_sign().
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7087)
This commit is contained in:
parent
59701e6363
commit
a8d3dbe19b
1 changed files with 3 additions and 0 deletions
|
@ -237,6 +237,9 @@ int OCSP_basic_sign(OCSP_BASICRESP *brsp,
|
|||
EVP_PKEY_CTX *pkctx = NULL;
|
||||
int i;
|
||||
|
||||
if (ctx == NULL)
|
||||
return 0;
|
||||
|
||||
if (!EVP_DigestSignInit(ctx, &pkctx, dgst, NULL, key)) {
|
||||
EVP_MD_CTX_free(ctx);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue