apps/cms.c, apps/ocsp.c: Added NULL pointer checks
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27059)
(cherry picked from commit 952d9b83b2
)
This commit is contained in:
parent
e6fd45a947
commit
0e2ae38df2
2 changed files with 5 additions and 1 deletions
|
@ -983,7 +983,7 @@ int cms_main(int argc, char **argv)
|
|||
goto end;
|
||||
|
||||
pctx = CMS_RecipientInfo_get0_pkey_ctx(ri);
|
||||
if (kparam != NULL) {
|
||||
if (pctx != NULL && kparam != NULL) {
|
||||
if (!cms_set_pkey_param(pctx, kparam->param))
|
||||
goto end;
|
||||
}
|
||||
|
|
|
@ -1049,6 +1049,10 @@ static void make_ocsp_response(BIO *err, OCSP_RESPONSE **resp, OCSP_REQUEST *req
|
|||
}
|
||||
|
||||
bs = OCSP_BASICRESP_new();
|
||||
if (bs == NULL) {
|
||||
*resp = OCSP_response_create(OCSP_RESPONSE_STATUS_INTERNALERROR, bs);
|
||||
goto end;
|
||||
}
|
||||
thisupd = X509_gmtime_adj(NULL, 0);
|
||||
if (ndays != -1)
|
||||
nextupd = X509_time_adj_ex(NULL, ndays, nmin * 60, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue