]> 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:43:54 +0000 (00:43 -0400)
postfix/src/tls/tls_server.c

index 89411416da7576a8477927efc7f5558415a42c1e..773f8defdb9cb9ee2368148665225c0930df6889 100644 (file)
@@ -827,10 +827,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);