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

index 7511c95e14eb83207fc8c3d42b1350e20333eaee..5d81e5c4922a75699319d46826eaee130dfaadea 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);