Skip to content

Commit

Permalink
use_wolfssl: Address (partially) netdata#17516 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagoftsm committed Apr 26, 2024
1 parent 98a634f commit a3ca0ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 29 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ set(LIBNETDATA_FILES
src/libnetdata/required_dummies.h
src/libnetdata/socket/security.c
src/libnetdata/socket/security.h
src/libnetdata/ssl/ssl.h
src/libnetdata/simple_pattern/simple_pattern.c
src/libnetdata/simple_pattern/simple_pattern.h
src/libnetdata/socket/socket.c
Expand Down
1 change: 1 addition & 0 deletions src/libnetdata/libnetdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ extern char *netdata_configured_host_prefix;
#include "popen/popen.h"
#include "simple_pattern/simple_pattern.h"
#ifdef ENABLE_HTTPS
# include "ssl/ssl.h"
# include "socket/security.h"
#endif
#include "socket/socket.h"
Expand Down
30 changes: 1 addition & 29 deletions src/libnetdata/socket/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,7 @@ typedef enum __attribute__((packed)) {

# ifdef ENABLE_HTTPS

#if defined(ENABLE_WOLFSSL)
#include <wolfssl/options.h>
#include <wolfssl/version.h>
#include <wolfssl/ssl.h>
#include <wolfssl/error-ssl.h>

#include <wolfssl/openssl/ssl.h>
#include <wolfssl/openssl/sha.h>
#include <wolfssl/openssl/evp.h>
#elif defined(ENABLE_OPENSSL)
#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
#endif // ENABLE_OPENSSL
#include "../ssl/ssl.h"

typedef struct netdata_ssl {
SSL *conn; // SSL connection
Expand Down

0 comments on commit a3ca0ff

Please sign in to comment.