From: Aki Tuomi Date: Mon, 11 Dec 2017 09:08:08 +0000 (+0200) Subject: lib-auth: Include ssl protocol details in request when present X-Git-Tag: 2.3.9~2585 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c79de417ae66b4e54daeb9d998af2ab301151b4;p=thirdparty%2Fdovecot%2Fcore.git lib-auth: Include ssl protocol details in request when present --- diff --git a/src/lib-auth/auth-client-request.c b/src/lib-auth/auth-client-request.c index 576843e205..fd5f38c295 100644 --- a/src/lib-auth/auth-client-request.c +++ b/src/lib-auth/auth-client-request.c @@ -88,6 +88,19 @@ static void auth_server_send_new_request(struct auth_server_connection *conn, str_append(str, "\tlocal_name="); str_append_tabescaped(str, info->local_name); } + if (info->ssl_cipher_bits != 0 && info->ssl_cipher != NULL) { + str_append(str, "\tssl_cipher="); + str_append_tabescaped(str, info->ssl_cipher); + str_printfa(str, "\tssl_cipher_bits=%u", info->ssl_cipher_bits); + if (info->ssl_pfs != NULL) { + str_append(str, "\tssl_pfs="); + str_append_tabescaped(str, info->ssl_pfs); + } + } + if (info->ssl_protocol != NULL) { + str_append(str, "\tssl_protocol="); + str_append_tabescaped(str, info->ssl_protocol); + } if (info->client_id != NULL && *info->client_id != '\0') { str_append(str, "\tclient_id="); diff --git a/src/lib-auth/auth-client.h b/src/lib-auth/auth-client.h index 99bc604210..d65a58234e 100644 --- a/src/lib-auth/auth-client.h +++ b/src/lib-auth/auth-client.h @@ -46,6 +46,12 @@ struct auth_request_info { const char *local_name; const char *client_id; const char *forward_fields; + + unsigned int ssl_cipher_bits; + const char *ssl_cipher; + const char *ssl_pfs; + const char *ssl_protocol; + enum auth_request_flags flags; struct ip_addr local_ip, remote_ip, real_local_ip, real_remote_ip;