src: openssl 1.1 support for pilerimport

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2017-07-07 21:47:25 +02:00
parent 30d8861b5d
commit ae5123ac3c
2 changed files with 8 additions and 0 deletions

View File

@ -323,7 +323,11 @@ int connect_to_imap_server(int sd, int *seq, char *username, char *password, str
SSL_library_init(); SSL_library_init();
SSL_load_error_strings(); SSL_load_error_strings();
#if OPENSSL_VERSION_NUMBER < 0x10100000L
data->ctx = SSL_CTX_new(TLSv1_client_method()); 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"); CHK_NULL(data->ctx, "internal SSL error");
data->ssl = SSL_new(data->ctx); data->ssl = SSL_new(data->ctx);

View File

@ -48,7 +48,11 @@ int connect_to_pop3_server(int sd, char *username, char *password, struct __data
SSL_library_init(); SSL_library_init();
SSL_load_error_strings(); SSL_load_error_strings();
#if OPENSSL_VERSION_NUMBER < 0x10100000L
data->ctx = SSL_CTX_new(TLSv1_client_method()); 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"); CHK_NULL(data->ctx, "internal SSL error");
data->ssl = SSL_new(data->ctx); data->ssl = SSL_new(data->ctx);