diff --git a/src/piler.c b/src/piler.c index c3d0fdf6..d3330dcb 100644 --- a/src/piler.c +++ b/src/piler.c @@ -260,7 +260,7 @@ int init_ssl(){ SSL_library_init(); SSL_load_error_strings(); - data.ctx = SSL_CTX_new(SSLv23_server_method()); + data.ctx = SSL_CTX_new(TLSv1_server_method()); if(data.ctx == NULL){ syslog(LOG_PRIORITY, "SSL_CTX_new() failed"); return ERR; } diff --git a/src/session.c b/src/session.c index aef91ad2..e13c4169 100644 --- a/src/session.c +++ b/src/session.c @@ -370,6 +370,9 @@ AFTER_PERIOD: if(data->ctx){ data->ssl = SSL_new(data->ctx); if(data->ssl){ + + SSL_set_options(data->ssl, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3); + if(SSL_set_fd(data->ssl, new_sd) == 1){ strncat(resp, SMTP_RESP_220_READY_TO_START_TLS, MAXBUFSIZE-1); starttls = 1;