mirror of
https://github.com/netdata/netdata.git
synced 2025-05-02 00:19:52 +00:00
fix potential crash bug. (#15605)
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
This commit is contained in:
parent
a615db0bc4
commit
b2ae9258a3
1 changed files with 4 additions and 0 deletions
|
@ -73,6 +73,10 @@ static int ssl_init()
|
||||||
#else
|
#else
|
||||||
accept_ctx.ssl_ctx = SSL_CTX_new(TLS_server_method());
|
accept_ctx.ssl_ctx = SSL_CTX_new(TLS_server_method());
|
||||||
#endif
|
#endif
|
||||||
|
if (!accept_ctx.ssl_ctx) {
|
||||||
|
netdata_log_error("Could not allocate a new SSL_CTX");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
SSL_CTX_set_options(accept_ctx.ssl_ctx, SSL_OP_NO_SSLv2);
|
SSL_CTX_set_options(accept_ctx.ssl_ctx, SSL_OP_NO_SSLv2);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue