diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2021-01-30 15:10:52 +0100 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2021-01-30 15:56:28 +0100 |
commit | 2f44ef51f48d39eb42d475cf753b93838844de15 (patch) | |
tree | f71be2fd1e70eddb95fef58c54f09c3c23d2f1ff /socket.c | |
parent | f2626bc6f79d7a48da2e281ba3736504ed078e04 (diff) | |
download | fetchmail-2f44ef51f48d39eb42d475cf753b93838844de15.tar.gz fetchmail-2f44ef51f48d39eb42d475cf753b93838844de15.tar.bz2 fetchmail-2f44ef51f48d39eb42d475cf753b93838844de15.zip |
--version: print OpenSSL versions build/run-time and directories
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -10,6 +10,7 @@ #include "config.h" #include "fetchmail.h" +#include "tls-aux.h" #include <stdio.h> #include <errno.h> @@ -902,8 +903,8 @@ static const char *SSLCertGetCN(const char *mycert, return ret; } -#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x1010000fL -/* OSSL_proto_version_logic for OpenSSL 1.0.x and LibreSSL */ +#if !defined(OSSL110_API) +/* ===== implementation for OpenSSL 1.0.X and LibreSSL ===== */ static int OSSL10X_proto_version_logic(int sock, const char **myproto, int *avoid_ssl_versions) { if (!*myproto) { @@ -971,10 +972,8 @@ static int OSSL10X_proto_version_logic(int sock, const char **myproto, int *avoi return 0; } #define OSSL_proto_version_logic(a,b,c) OSSL10X_proto_version_logic((a),(b),(c)) -#undef OSSL110_API #else -/* implementation for OpenSSL 1.1.0 */ -#define OSSL110_API 1 +/* ===== implementation for OpenSSL 1.1.0 ===== */ static int OSSL110_proto_version_logic(int sock, const char **myproto, int *avoid_ssl_versions) { @@ -1072,10 +1071,8 @@ int SSLOpen(int sock, char *mycert, char *mykey, const char *myproto, int certck SSL_load_error_strings(); SSL_library_init(); OpenSSL_add_all_algorithms(); /* see Debian Bug#576430 and manpage */ - ver = SSLeay(); -#else - ver = OpenSSL_version_num(); #endif + ver = OpenSSL_version_num(); /* version switch through tls-aux.h */ if (ver < OPENSSL_VERSION_NUMBER) { report(stderr, GT_("Loaded OpenSSL library %#lx older than headers %#lx, refusing to work.\n"), (long)ver, (long)(OPENSSL_VERSION_NUMBER)); |