summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/x509/ocsp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c
index 735959765c..7ac7f65c1d 100644
--- a/lib/x509/ocsp.c
+++ b/lib/x509/ocsp.c
@@ -1392,6 +1392,9 @@ gnutls_ocsp_resp_check_crt(gnutls_ocsp_resp_t resp,
gnutls_datum_t dn = { NULL, 0 };
uint8_t cdn_hash[MAX_HASH_SIZE];
size_t t, hash_len;
+
+ if (resp == NULL)
+ return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
ret =
gnutls_ocsp_resp_get_single(resp, indx, &digest, &rdn_hash,