From: Stephan Bosch Date: Fri, 9 Feb 2018 22:57:29 +0000 (+0100) Subject: lib-http: server: Recreate connection IO after streams change. X-Git-Tag: 2.3.9~2295 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef45e8bfe4a04f3485e1ddae9a8df5b54f5f6cf0;p=thirdparty%2Fdovecot%2Fcore.git lib-http: server: Recreate connection IO after streams change. --- diff --git a/src/lib-http/http-server-connection.c b/src/lib-http/http-server-connection.c index 15a358f331..c2e46483d5 100644 --- a/src/lib-http/http-server-connection.c +++ b/src/lib-http/http-server-connection.c @@ -401,6 +401,7 @@ http_server_connection_ssl_init(struct http_server_connection *conn) if (conn->server->set.debug) http_server_connection_debug(conn, "Starting SSL handshake"); + http_server_connection_input_halt(conn); if (master_service_ssl_init(master_service, &conn->conn.input, &conn->conn.output, &conn->ssl_iostream, &error) < 0) { @@ -408,6 +409,8 @@ http_server_connection_ssl_init(struct http_server_connection *conn) "Couldn't initialize SSL server for %s: %s", conn->conn.name, error); return -1; } + http_server_connection_input_resume(conn); + if (ssl_iostream_handshake(conn->ssl_iostream) < 0) { http_server_connection_error(conn,"SSL handshake failed: %s", ssl_iostream_get_last_error(conn->ssl_iostream));