--- a/configure.ac +++ a/configure.ac @@ -1123,6 +1123,9 @@ else if test "$cf_result" != yes; then AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[SSLeay_add_ssl_algorithms()]])],[cf_result=yes],[cf_result=no]) fi + if test "$cf_result" != yes; then + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[OPENSSL_init_ssl(0, NULL)]])],[cf_result=yes],[cf_result=no]) + fi fi done --- a/src/network/ssl/socket.c +++ a/src/network/ssl/socket.c @@ -247,7 +247,11 @@ static int match_uri_host_ip(const unsigned char *uri_host, ASN1_OCTET_STRING *cert_host_asn1) { +#if OPENSSL_VERSION_NUMBER < 0x10100000L const unsigned char *cert_host_addr = ASN1_STRING_data(cert_host_asn1); +#else + const unsigned char *cert_host_addr = ASN1_STRING_get0_data(cert_host_asn1); +#endif struct in_addr uri_host_in; #ifdef CONFIG_IPV6 struct in6_addr uri_host_in6; --- a/src/network/ssl/ssl.c +++ a/src/network/ssl/ssl.c @@ -95,7 +95,9 @@ init_openssl(struct module *module) } #endif +#if OPENSSL_VERSION_NUMBER < 0x10100000L SSLeay_add_ssl_algorithms(); +#endif context = SSL_CTX_new(SSLv23_client_method()); SSL_CTX_set_options(context, SSL_OP_ALL); SSL_CTX_set_default_verify_paths(context); @@ -471,7 +473,11 @@ void random_nonce(unsigned char buf[], size_t size) { #ifdef USE_OPENSSL +#if OPENSSL_VERSION_NUMBER < 0x10100000L RAND_pseudo_bytes(buf, size); +#else + RAND_bytes(buf, size); +#endif #elif defined(CONFIG_GNUTLS) gcry_create_nonce(buf, size); #else