aboutsummaryrefslogtreecommitdiffstats
path: root/tls-aux.h
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2021-11-20 16:48:10 +0100
committerMatthias Andree <matthias.andree@gmx.de>2021-11-21 00:33:34 +0100
commitcc5c80eb4d6f98b94f20e5abd4cd50c5bf0e5a44 (patch)
tree337fa4b5691643fea540e5026a4c64dc8a9a3509 /tls-aux.h
parent9dadc0e51c91e98d4f23b3385fd2ef20fbdb3358 (diff)
downloadfetchmail-cc5c80eb4d6f98b94f20e5abd4cd50c5bf0e5a44.tar.gz
fetchmail-cc5c80eb4d6f98b94f20e5abd4cd50c5bf0e5a44.tar.bz2
fetchmail-cc5c80eb4d6f98b94f20e5abd4cd50c5bf0e5a44.zip
wolfSSL: support 5.0.0+.
Diffstat (limited to 'tls-aux.h')
-rw-r--r--tls-aux.h38
1 files changed, 25 insertions, 13 deletions
diff --git a/tls-aux.h b/tls-aux.h
index 696020a3..0d6bac48 100644
--- a/tls-aux.h
+++ b/tls-aux.h
@@ -1,25 +1,37 @@
#ifndef TLS_AUX_H
#define TLS_AUX_H 1
+#undef LIBWOLFSSL_VERSION_STRING
+
#include "config.h"
#include "fetchmail.h"
-
#ifdef SSL_ENABLE
-#include <openssl/opensslv.h>
-# if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x1010000fL
-# undef OSSL110_API
-# else
-# define OSSL110_API 1
-# endif
-# if OPENSSL_VERSION_NUMBER < 0x1010000fL
-# define OpenSSL_version(t) SSLeay_version((t))
-# define OpenSSL_version_num() SSLeay()
-# define OPENSSL_VERSION (SSLEAY_VERSION)
-# define OPENSSL_DIR (SSLEAY_DIR)
-# define OPENSSL_ENGINES_DIR (-1)
+# ifdef HAVE_WOLFSSL_OPTIONS_H
+# include <wolfssl/options.h>
# endif
+
+# include <openssl/ssl.h>
+
+# undef USING_WOLFSSL
+# ifdef LIBWOLFSSL_VERSION_HEX
+# define USING_WOLFSSL 1
+# define OSSL110_API 1
+# else
+# if OPENSSL_VERSION_NUMBER < 0x1010000fL
+# undef OSSL110_API
+# else
+# define OSSL110_API 1
+# endif
+# if OPENSSL_VERSION_NUMBER < 0x1010000fL
+# define OpenSSL_version(t) SSLeay_version((t))
+# define OpenSSL_version_num() SSLeay()
+# define OPENSSL_VERSION (SSLEAY_VERSION)
+# define OPENSSL_DIR (SSLEAY_DIR)
+# define OPENSSL_ENGINES_DIR (-1)
+# endif
+# endif /* LIBWOLFSSL_VERSION_STRING */
#endif /* SSL_ENABLE */
#endif /* TLS_AUX_H */