Skip to content

Commit

Permalink
lib-smtp: server: STARTTLS command: Call smtp_server_connection_set_s…
Browse files Browse the repository at this point in the history
…sl_streams() after calling the conn_start_tls() connection callback.

This is called instead smtp_server_connection_set_streams(), so that the connection is now marked as SSL-secured.
This fixes a submission-login bug that prevented client login when ssl=required.
  • Loading branch information
stephanbosch authored and sirainen committed Dec 22, 2017
1 parent d076bd9 commit 7adffef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-smtp/smtp-server-cmd-starttls.c
Expand Up @@ -30,7 +30,7 @@ static int cmd_starttls_start(struct smtp_server_connection *conn)
if (!smtp_server_connection_unref(&tmp_conn) || ret < 0)
return -1;

smtp_server_connection_set_streams(conn, input, output);
smtp_server_connection_set_ssl_streams(conn, input, output);
} else if (smtp_server_connection_ssl_init(conn) < 0) {
smtp_server_connection_close(&conn,
"SSL Initialization failed");
Expand Down

0 comments on commit 7adffef

Please sign in to comment.