Use general-purpose version-flexible SSL/TLS methods

This commit is contained in:
Pierre Pronchery 2020-01-12 09:37:55 +01:00
parent 192261743e
commit cfe4160e23

View File

@ -389,7 +389,7 @@ Mailer * mailer_new(void)
/* ssl */
SSL_load_error_strings();
SSL_library_init();
if((mailer->ssl_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL
if((mailer->ssl_ctx = SSL_CTX_new(TLS_client_method())) == NULL
|| SSL_CTX_set_cipher_list(mailer->ssl_ctx,
SSL_DEFAULT_CIPHER_LIST) != 1
|| SSL_CTX_load_verify_locations(mailer->ssl_ctx, NULL,