summaryrefslogtreecommitdiffstats
path: root/libnetdata
diff options
context:
space:
mode:
authorAndrew Moss <1043609+amoss@users.noreply.github.com>2020-03-10 12:21:32 +0100
committerGitHub <noreply@github.com>2020-03-10 12:21:32 +0100
commit4acc880bab388c6ea61a1016dcbc44e387dd932c (patch)
treeb553a306024f2c5048e81db934902d8673e2c83f /libnetdata
parent3e272d1cffae08312496b2451adea7115a7aae8f (diff)
Improve ACLK according to results of the smoke-test. (#8358)
* Cleaning up the ACLK part 2 (#8187) * Initial proxy support implementation (#8146) * Implement the ACLK Challenge-Response Authentication (#8317) Co-authored-by: Timo <6674623+underhood@users.noreply.github.com>
Diffstat (limited to 'libnetdata')
-rw-r--r--libnetdata/config/appconfig.h1
-rw-r--r--libnetdata/socket/security.c2
-rw-r--r--libnetdata/socket/security.h1
-rw-r--r--libnetdata/socket/socket.c2
-rw-r--r--libnetdata/socket/socket.h1
5 files changed, 5 insertions, 2 deletions
diff --git a/libnetdata/config/appconfig.h b/libnetdata/config/appconfig.h
index 50c137ddb9..4688760514 100644
--- a/libnetdata/config/appconfig.h
+++ b/libnetdata/config/appconfig.h
@@ -93,6 +93,7 @@
#define CONFIG_SECTION_STREAM "stream"
#define CONFIG_SECTION_EXPORTING "exporting:global"
#define CONFIG_SECTION_HOST_LABEL "host labels"
+#define CONFIG_SECTION_ACLK "agent_cloud_link"
#define EXPORTING_CONF "exporting.conf"
// these are used to limit the configuration names and values lengths
diff --git a/libnetdata/socket/security.c b/libnetdata/socket/security.c
index ab324a1691..6781dc6f5b 100644
--- a/libnetdata/socket/security.c
+++ b/libnetdata/socket/security.c
@@ -84,7 +84,7 @@ void security_openssl_common_options(SSL_CTX *ctx) {
*
* @return It returns the context on success or NULL otherwise
*/
-static SSL_CTX * security_initialize_openssl_client() {
+SSL_CTX * security_initialize_openssl_client() {
SSL_CTX *ctx;
#if OPENSSL_VERSION_NUMBER < 0x10100000L
ctx = SSL_CTX_new(SSLv23_client_method());
diff --git a/libnetdata/socket/security.h b/libnetdata/socket/security.h
index 697e0fda1f..741135c1f9 100644
--- a/libnetdata/socket/security.h
+++ b/libnetdata/socket/security.h
@@ -41,6 +41,7 @@ void security_clean_openssl();
void security_start_ssl(int selector);
int security_process_accept(SSL *ssl,int msg);
int security_test_certificate(SSL *ssl);
+SSL_CTX * security_initialize_openssl_client();
# endif //ENABLE_HTTPS
#endif //NETDATA_SECURITY_H
diff --git a/libnetdata/socket/socket.c b/libnetdata/socket/socket.c
index 2289bf4c46..73eb8e6629 100644
--- a/libnetdata/socket/socket.c
+++ b/libnetdata/socket/socket.c
@@ -607,7 +607,7 @@ static inline int connect_to_unix(const char *path, struct timeval *timeout) {
// service the service name or port to connect to
// timeout the timeout for establishing a connection
-static inline int connect_to_this_ip46(int protocol, int socktype, const char *host, uint32_t scope_id, const char *service, struct timeval *timeout) {
+int connect_to_this_ip46(int protocol, int socktype, const char *host, uint32_t scope_id, const char *service, struct timeval *timeout) {
struct addrinfo hints;
struct addrinfo *ai_head = NULL, *ai = NULL;
diff --git a/libnetdata/socket/socket.h b/libnetdata/socket/socket.h
index eb09b3f9a7..a40d801ddd 100644
--- a/libnetdata/socket/socket.h
+++ b/libnetdata/socket/socket.h
@@ -56,6 +56,7 @@ extern void listen_sockets_close(LISTEN_SOCKETS *sockets);
extern int connect_to_this(const char *definition, int default_port, struct timeval *timeout);
extern int connect_to_one_of(const char *destination, int default_port, struct timeval *timeout, size_t *reconnects_counter, char *connected_to, size_t connected_to_size);
+int connect_to_this_ip46(int protocol, int socktype, const char *host, uint32_t scope_id, const char *service, struct timeval *timeout);
#ifdef ENABLE_HTTPS
extern ssize_t recv_timeout(struct netdata_ssl *ssl,int sockfd, void *buf, size_t len, int flags, int timeout);