sslv3 fix

This commit is contained in:
SJ 2014-10-15 22:53:09 +02:00
parent 636f673d3f
commit 3aa0ebe4a6
2 changed files with 4 additions and 1 deletions

View File

@ -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; }

View File

@ -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;