summaryrefslogtreecommitdiffstats
path: root/src/libnetdata/socket/security.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:33:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:34:10 +0000
commit83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch)
tree2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/libnetdata/socket/security.h
parentReleasing debian version 1.47.5-1. (diff)
downloadnetdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz
netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/libnetdata/socket/security.h')
-rw-r--r--src/libnetdata/socket/security.h26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/libnetdata/socket/security.h b/src/libnetdata/socket/security.h
index 283d81db8..7deb1d797 100644
--- a/src/libnetdata/socket/security.h
+++ b/src/libnetdata/socket/security.h
@@ -1,5 +1,5 @@
#ifndef NETDATA_SECURITY_H
-# define NETDATA_SECURITY_H
+#define NETDATA_SECURITY_H
typedef enum __attribute__((packed)) {
NETDATA_SSL_STATE_NOT_SSL = 1, // This connection is not SSL
@@ -12,27 +12,6 @@ typedef enum __attribute__((packed)) {
#define NETDATA_SSL_STREAMING_SENDER_CTX 1
#define NETDATA_SSL_EXPORTING_CTX 2
-# ifdef ENABLE_HTTPS
-
-#define OPENSSL_VERSION_095 0x00905100L
-#define OPENSSL_VERSION_097 0x0907000L
-#define OPENSSL_VERSION_110 0x10100000L
-#define OPENSSL_VERSION_111 0x10101000L
-#define OPENSSL_VERSION_300 0x30000000L
-
-# include <openssl/ssl.h>
-# include <openssl/err.h>
-# include <openssl/evp.h>
-# include <openssl/pem.h>
-# if (SSLEAY_VERSION_NUMBER >= OPENSSL_VERSION_097) && (OPENSSL_VERSION_NUMBER < OPENSSL_VERSION_110)
-# include <openssl/conf.h>
-# endif
-
-#if OPENSSL_VERSION_NUMBER >= OPENSSL_VERSION_300
-#include <openssl/core_names.h>
-#include <openssl/decoder.h>
-#endif
-
typedef struct netdata_ssl {
SSL *conn; // SSL connection
NETDATA_SSL_STATE state; // The state for SSL connection
@@ -52,7 +31,7 @@ extern const char *tls_version;
extern const char *tls_ciphers;
extern bool netdata_ssl_validate_certificate;
extern bool netdata_ssl_validate_certificate_sender;
-int ssl_security_location_for_context(SSL_CTX *ctx,char *file,char *path);
+int ssl_security_location_for_context(SSL_CTX *ctx, const char *file, const char *path);
void netdata_ssl_initialize_openssl();
void netdata_ssl_cleanup();
@@ -73,5 +52,4 @@ ssize_t netdata_ssl_write(NETDATA_SSL *ssl, const void *buf, size_t num);
ssize_t netdata_ssl_pending(NETDATA_SSL *ssl);
bool netdata_ssl_has_pending(NETDATA_SSL *ssl);
-# endif //ENABLE_HTTPS
#endif //NETDATA_SECURITY_H