]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth: Include ssl protocol details in request when present
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 11 Dec 2017 09:08:08 +0000 (11:08 +0200)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 28 Dec 2017 14:01:50 +0000 (16:01 +0200)
src/lib-auth/auth-client-request.c
src/lib-auth/auth-client.h

index 576843e205f8c8d2bd56962a28b10e6ad524f3fd..fd5f38c295e2a47ef35c904a5d85cd326e0cba4f 100644 (file)
@@ -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=");
index 99bc604210605c62f90e8b816f00e9ee1b5b14fc..d65a58234e8fa47222d47974ffd015983a076186 100644 (file)
@@ -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;