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 | |
| parent | 203713acf3489f5517e96123697dae6d26b5364f (diff) | |
| download | lynx-snapshots-e1125a158f540138a0bd7bdbbf528d9975003951.tar.gz | |
snapshot of project "lynx", label v2-8-9dev_16i
| -rw-r--r-- | CHANGES | 8 | ||||
| -rw-r--r-- | WWW/Library/Implementation/HTNews.c | 10 | ||||
| -rw-r--r-- | WWW/Library/Implementation/HTTP.c | 23 |
3 files changed, 34 insertions, 7 deletions
@@ -1,9 +1,11 @@ --- $LynxId: CHANGES,v 1.929 2018/02/22 02:04:40 tom Exp $ +-- $LynxId: CHANGES,v 1.930 2018/02/25 20:30:09 tom Exp $ =============================================================================== Changes since Lynx 2.8 release =============================================================================== -2018-02-21 (2.8.9dev.17) +2018-02-25 (2.8.9dev.17) +* additional fixes to work with LibreSSL on OpenBSD 6.2 -TD +* build-fixes for OpenSSL 1.1.0 versus 1.0.0 (patch by Quentin Minster). * modify configure script to make a quirk of NetBSD's make-program less noticeable -TD * modify configure script to work around pkgsrc's misconfiguration of shared @@ -4540,7 +4542,7 @@ recently, FreeBSD 4.1, NetBSD 1.5 and OpenBSD 2.8 (curses/ncurses). * make -stdin option a little more flexible by ifdef'ing primarily based on ttyname(), and adding fallback definitions for Win32 and VMS -TD * for slang configurations past 1.3.6, call SLsmg_touch_screen() in - start_curses to ensure that the screen is properly initialized for non-bce + start_curses to ensure that the screen is properly initialized for noce terminals -JED (John E Davis) * move call on lynx_initialize_keymaps() for slang configuration into the start_curses() function, avoiding premature reference to $TERM, especially diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c index 6e38b51e..75b7001e 100644 --- a/WWW/Library/Implementation/HTNews.c +++ b/WWW/Library/Implementation/HTNews.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTNews.c,v 1.71 2016/11/24 23:43:38 tom Exp $ + * $LynxId: HTNews.c,v 1.73 2018/02/26 00:28:40 tom Exp $ * * NEWS ACCESS HTNews.c * =========== @@ -44,6 +44,14 @@ int HTNewsMaxChunk = 40; /* Largest number of articles in one window */ #endif /* NEWS_AUTH_FILE */ #ifdef USE_SSL + +#if defined(LIBRESSL_VERSION_NUMBER) +/* OpenSSL and LibreSSL version numbers do not correspond */ +#elif (OPENSSL_VERSION_NUMBER >= 0x10100000L) +#undef SSL_load_error_strings +#define SSL_load_error_strings() /* nothing */ +#endif + static SSL *Handle = NULL; static int channel_s = 1; 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 |