summaryrefslogtreecommitdiffstats
path: root/crypto/ocsp/ocsp_srv.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ocsp/ocsp_srv.c')
-rw-r--r--crypto/ocsp/ocsp_srv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/ocsp/ocsp_srv.c b/crypto/ocsp/ocsp_srv.c
index 4187446e1c..1475bb0f7e 100644
--- a/crypto/ocsp/ocsp_srv.c
+++ b/crypto/ocsp/ocsp_srv.c
@@ -278,6 +278,8 @@ int OCSP_RESPID_set_by_key_ex(OCSP_RESPID *respid, X509 *cert,
int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert)
{
+ if (cert == NULL)
+ return 0;
return OCSP_RESPID_set_by_key_ex(respid, cert, cert->libctx, cert->propq);
}
@@ -319,5 +321,7 @@ int OCSP_RESPID_match_ex(OCSP_RESPID *respid, X509 *cert, OSSL_LIB_CTX *libctx,
int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert)
{
+ if (cert == NULL)
+ return 0;
return OCSP_RESPID_match_ex(respid, cert, cert->libctx, cert->propq);
}