Skip to content

Commit

Permalink
session server tls BUGFIX add missing cert check
Browse files Browse the repository at this point in the history
  • Loading branch information
roman committed Mar 21, 2024
1 parent d0fe595 commit a55fee0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/session_server_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,11 @@ nc_tls_ctx_set_server_cert_key(SSL_CTX *tls_ctx, struct nc_server_tls_opts *opts
return -1;
}
}
if (!cert_data || !privkey_data) {
ERR(NULL, "Server certificate not configured.");
ret = -1;
goto cleanup;
}

/* load the cert */
cert = base64der_to_cert(cert_data);
Expand Down

0 comments on commit a55fee0

Please sign in to comment.