diff options
author | Mark Wright <gienah@gentoo.org> | 2018-10-24 14:00:04 +0000 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2018-10-24 14:00:04 +0000 |
commit | d10007a2c61709a5b8f7ed6a5e9f4a24ac374c92 (patch) | |
tree | 5a5ca39ccbf04e12707afe8e76f50edbd145064b /url.c | |
parent | Update ChangeLog (diff) | |
download | w3m-d10007a2c61709a5b8f7ed6a5e9f4a24ac374c92.tar.gz w3m-d10007a2c61709a5b8f7ed6a5e9f4a24ac374c92.zip |
Do not use deprecated features with openssl-1.1
Diffstat (limited to 'url.c')
-rw-r--r-- | url.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -319,12 +319,16 @@ openSSLHandle(int sock, char *hostname, char **p_cert) #endif /* defined(USE_SSL_VERIFY) */ if (ssl_ctx == NULL) { int option; -#if SSLEAY_VERSION_NUMBER < 0x0800 +#if OPENSSL_VERSION_NUMBER < 0x0800 ssl_ctx = SSL_CTX_new(); X509_set_default_verify_paths(ssl_ctx->cert); #else /* SSLEAY_VERSION_NUMBER >= 0x0800 */ +#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) SSLeay_add_ssl_algorithms(); SSL_load_error_strings(); +#else + OPENSSL_init_ssl(0, NULL); +#endif if (!(ssl_ctx = SSL_CTX_new(SSLv23_client_method()))) goto eend; SSL_CTX_set_cipher_list(ssl_ctx, "DEFAULT:!LOW:!RC4:!EXP"); |