aboutsummaryrefslogtreecommitdiffstats
path: root/url.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2018-10-26 12:06:37 +0000
committerGitHub <noreply@github.com>2018-10-26 12:06:37 +0000
commitbfe9ba9275f4cb6b2b23a230b59863658e6851fa (patch)
tree5a5ca39ccbf04e12707afe8e76f50edbd145064b /url.c
parentUpdate ChangeLog (diff)
parentDo not use deprecated features with openssl-1.1 (diff)
downloadw3m-bfe9ba9275f4cb6b2b23a230b59863658e6851fa.tar.gz
w3m-bfe9ba9275f4cb6b2b23a230b59863658e6851fa.zip
Merge pull request #103 from Polynomial-C/openssl-1.1_disable_deprecated
Do not use deprecated features with openssl-1.1
Diffstat (limited to '')
-rw-r--r--url.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/url.c b/url.c
index 348f501..e1da3d9 100644
--- a/url.c
+++ b/url.c
@@ -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");