Skip to content

Commit a55fee0

Browse files
author
roman
committed
session server tls BUGFIX add missing cert check
1 parent d0fe595 commit a55fee0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/session_server_tls.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,11 @@ nc_tls_ctx_set_server_cert_key(SSL_CTX *tls_ctx, struct nc_server_tls_opts *opts
883883
return -1;
884884
}
885885
}
886+
if (!cert_data || !privkey_data) {
887+
ERR(NULL, "Server certificate not configured.");
888+
ret = -1;
889+
goto cleanup;
890+
}
886891

887892
/* load the cert */
888893
cert = base64der_to_cert(cert_data);

0 commit comments

Comments
 (0)