@cryptotaxi247 / netdata-1 / commits / b27f0c653

SSL_better_name change name! (#6336)

thiagoftsm committed Jun 24, 2019 at 12:21 UTC b27f0c65342cee0463eaf62d7e53112aaa1fdbb0
3 files changed +7 -7
libnetdata/socket/security.c
+4 -4
@@ -2,7 +2,7 @@
2
3 #ifdef ENABLE_HTTPS
4
5 -SSL_CTX *netdata_cli_ctx=NULL;
5 +SSL_CTX *netdata_client_ctx=NULL;
6 SSL_CTX *netdata_srv_ctx=NULL;
7 const char *security_key=NULL;
8 const char *security_cert=NULL;
@@ -127,7 +127,7 @@ void security_start_ssl(int type) {
127 netdata_srv_ctx = security_initialize_openssl_server();
128 }
129 else {
130 - netdata_cli_ctx = security_initialize_openssl_client();
130 + netdata_client_ctx = security_initialize_openssl_client();
131 }
132 }
133
@@ -137,9 +137,9 @@ void security_clean_openssl() {
137 SSL_CTX_free(netdata_srv_ctx);
138 }
139
140 - if (netdata_cli_ctx)
140 + if (netdata_client_ctx)
141 {
142 - SSL_CTX_free(netdata_cli_ctx);
142 + SSL_CTX_free(netdata_client_ctx);
143 }
144
145 #if OPENSSL_VERSION_NUMBER < 0x10100000L
libnetdata/socket/security.h
+1 -1
@@ -24,7 +24,7 @@ struct netdata_ssl{
24 int flags;
25 };
26
27 -extern SSL_CTX *netdata_cli_ctx;
27 +extern SSL_CTX *netdata_client_ctx;
28 extern SSL_CTX *netdata_srv_ctx;
29 extern const char *security_key;
30 extern const char *security_cert;
streaming/rrdpush.c
+2 -2
@@ -463,10 +463,10 @@ static int rrdpush_sender_thread_connect_to_master(RRDHOST *host, int default_po
463 info("STREAM %s [send to %s]: initializing communication...", host->hostname, connected_to);
464
465 #ifdef ENABLE_HTTPS
466 - if( netdata_cli_ctx ){
466 + if( netdata_client_ctx ){
467 host->ssl.flags = NETDATA_SSL_START;
468 if (!host->ssl.conn){
469 - host->ssl.conn = SSL_new(netdata_cli_ctx);
469 + host->ssl.conn = SSL_new(netdata_client_ctx);
470 if(!host->ssl.conn){
471 error("Failed to allocate SSL structure.");
472 host->ssl.flags = NETDATA_SSL_NO_HANDSHAKE;