summaryrefslogtreecommitdiffstats
path: root/lib/libtls/tls_ocsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libtls/tls_ocsp.c')
-rw-r--r--lib/libtls/tls_ocsp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libtls/tls_ocsp.c b/lib/libtls/tls_ocsp.c
index ce7098bb9ca..9f6f940ecfb 100644
--- a/lib/libtls/tls_ocsp.c
+++ b/lib/libtls/tls_ocsp.c
@@ -173,8 +173,11 @@ tls_ocsp_setup_from_peer(struct tls *ctx)
}
ocsp_urls = X509_get1_ocsp(ocsp->main_cert);
- if (ocsp_urls == NULL)
+ if (ocsp_urls == NULL) {
+ tls_set_errorx(ctx, "no OCSP URLs in peer certificate");
goto failed;
+ }
+
ocsp->ocsp_url = strdup(sk_OPENSSL_STRING_value(ocsp_urls, 0));
if (ocsp->ocsp_url == NULL) {
tls_set_errorx(ctx, "out of memory");