Skip to content

Commit d2718a0

Browse files
committed
mbedtls: dont try to use absent ssl
1 parent e3aec58 commit d2718a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/tls/mbedtls/mbedtls-x509.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ lws_tls_peer_cert_info(struct lws *wsi, enum lws_tls_cert_info type,
293293

294294
wsi = lws_get_network_wsi(wsi);
295295

296+
if (!wsi->tls.ssl)
297+
return -1;
298+
296299
x509 = ssl_get_peer_mbedtls_x509_crt(wsi->tls.ssl);
297300

298301
if (!x509)

0 commit comments

Comments
 (0)