]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
Sanitize non-printables in X509_NAME_oneline output
authorViktor Dukhovni <postfix-users@dukhovni.org>
Thu, 19 Jun 2014 14:58:14 +0000 (10:58 -0400)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Thu, 26 May 2016 04:41:55 +0000 (00:41 -0400)
postfix/src/tls/tls_server.c

index cc81376d4c0f63a7cc0ce4b4e6f6aea3f9f1e8f5..8d4d0c523e30d7ae8f28c5f84bef58beb8a77150 100644 (file)
@@ -863,10 +863,10 @@ TLS_SESS_STATE *tls_server_post_accept(TLS_SESS_STATE *TLScontext)
        if (TLScontext->log_mask & TLS_LOG_VERBOSE) {
            X509_NAME_oneline(X509_get_subject_name(peer),
                              buf, sizeof(buf));
-           msg_info("subject=%s", buf);
+           msg_info("subject=%s", printable(buf, '?'));
            X509_NAME_oneline(X509_get_issuer_name(peer),
                              buf, sizeof(buf));
-           msg_info("issuer=%s", buf);
+           msg_info("issuer=%s", printable(buf, '?'));
        }
        TLScontext->peer_CN = tls_peer_CN(peer, TLScontext);
        TLScontext->issuer_CN = tls_issuer_CN(peer, TLScontext);