starttls fix

Change-Id: I271bb3bb0db4308254fe193efddcdb19fd0ab9f0
Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
SJ 2017-05-12 20:57:06 +02:00
parent 961ae7afee
commit a831d8cd2e

View File

@ -209,7 +209,10 @@ void process_command_starttls(struct smtp_session *session){
session->starttls = 1;
send_smtp_response(session, SMTP_RESP_220_READY_TO_START_TLS);
session->protocol_state = SMTP_STATE_INIT;
session->use_ssl = 1;
if(session->starttls == 1 && session->use_ssl == 0)
wait_for_ssl_accept(session);
return;
} syslog(LOG_PRIORITY, "%s: SSL_set_fd() failed", session->ttmpfile);
} syslog(LOG_PRIORITY, "%s: SSL_new() failed", session->ttmpfile);