summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElta Koepp <elta_koepp@gmail.com>2019-04-05 10:04:12 -0400
committerElta Koepp <elta_koepp@gmail.com>2019-04-05 10:55:06 -0400
commit9aadf6182a9b497f29f1497fcf354c098174d27c (patch)
tree0d7c56fb59ee8e63b6e0375219708bd361403875
parent29e66d5a4160ab309870df34e85c06df6fc867c6 (diff)
downloadgnutls-9aadf6182a9b497f29f1497fcf354c098174d27c.tar.gz
[OSCP] Fix : null pointer resp
Signed-off-by: Elta Koepp <elta_koepp@gmail.com>
-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,