From: Viktor Dukhovni Date: Thu, 19 Jun 2014 14:58:14 +0000 (-0400) Subject: Sanitize non-printables in X509_NAME_oneline output X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fnosslintern;p=thirdparty%2Fpostfix.git Sanitize non-printables in X509_NAME_oneline output --- diff --git a/postfix/src/tls/tls_server.c b/postfix/src/tls/tls_server.c index 0beb74598..0e3104624 100644 --- a/postfix/src/tls/tls_server.c +++ b/postfix/src/tls/tls_server.c @@ -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);