diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2018-02-26 00:28:40 +0000 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2018-02-26 00:28:40 +0000 |
commit | e1125a158f540138a0bd7bdbbf528d9975003951 (patch) | |
tree | 2dce02181b067f27b9186b9780ff1faf40b25e4e /WWW/Library/Implementation/HTTP.c | |
parent | 203713acf3489f5517e96123697dae6d26b5364f (diff) | |
download | lynx-snapshots-e1125a158f540138a0bd7bdbbf528d9975003951.tar.gz |
snapshot of project "lynx", label v2-8-9dev_16i
Diffstat (limited to 'WWW/Library/Implementation/HTTP.c')
-rw-r--r-- | WWW/Library/Implementation/HTTP.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index 581cb5e6..ebdf28e6 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTP.c,v 1.163 2016/11/24 23:56:50 tom Exp $ + * $LynxId: HTTP.c,v 1.166 2018/02/26 00:21:47 tom Exp $ * * HyperText Tranfer Protocol - Client implementation HTTP.c * ========================== @@ -46,13 +46,30 @@ #include <LYCurses.h> #ifdef USE_SSL + #ifdef USE_OPENSSL_INCL #include <openssl/x509v3.h> #endif + +#if defined(LIBRESSL_VERSION_NUMBER) +/* OpenSSL and LibreSSL version numbers do not correspond */ +#elif defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100000L) +#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER +#undef SSL_load_error_strings +#undef SSLeay_add_ssl_algorithms +#define ASN1_STRING_data ASN1_STRING_get0_data +#define TLS_client_method() SSLv23_client_method() +#define SSL_load_error_strings() /* nothing */ +#define SSLeay_add_ssl_algorithms() /* nothing */ +#elif defined(SSLEAY_VERSION_NUMBER) +#define TLS_client_method() SSLv23_client_method() +#endif + #ifdef USE_GNUTLS_INCL #include <gnutls/x509.h> #endif -#endif + +#endif /* USE_SSL */ BOOLEAN reloading = FALSE; /* Reloading => send no-cache pragma to proxy */ char *redirecting_url = NULL; /* Location: value. */ @@ -174,7 +191,7 @@ SSL *HTGetSSLHandle(void) } #else SSLeay_add_ssl_algorithms(); - if ((ssl_ctx = SSL_CTX_new(SSLv23_client_method())) != NULL) { + if ((ssl_ctx = SSL_CTX_new(TLS_client_method())) != NULL) { #ifdef SSL_OP_NO_SSLv2 SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2); #else |