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

index 0beb74598471eb6e3279d6459314a935854b0719..0e31046245a4e408f7975fde64da6290ebf812b7 100644 (file)
@@ -865,10 +865,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);