diff --git a/src/imap.c b/src/imap.c index 3e343c9..95e083a 100644 --- a/src/imap.c +++ b/src/imap.c @@ -323,7 +323,11 @@ SSL_library_init(); SSL_load_error_strings(); + #if OPENSSL_VERSION_NUMBER < 0x10100000L data->ctx = SSL_CTX_new(TLSv1_client_method()); + #else + data->ctx = SSL_CTX_new(TLS_client_method()); + #endif CHK_NULL(data->ctx, "internal SSL error"); data->ssl = SSL_new(data->ctx); diff --git a/src/pop3.c b/src/pop3.c index 3e7eb37..7daf342 100644 --- a/src/pop3.c +++ b/src/pop3.c @@ -48,7 +48,11 @@ SSL_library_init(); SSL_load_error_strings(); + #if OPENSSL_VERSION_NUMBER < 0x10100000L data->ctx = SSL_CTX_new(TLSv1_client_method()); + #else + data->ctx = SSL_CTX_new(TLS_client_method()); + #endif CHK_NULL(data->ctx, "internal SSL error"); data->ssl = SSL_new(data->ctx);