From: Adam Shannon Date: Thu, 28 Jun 2018 02:40:22 +0000 (-0500) Subject: crypto/x509: better debug output for verify-cert calls X-Git-Tag: go1.11beta2~265 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1a3957b828389fb38df0f60d43f08da15bc125c1;p=gostls13.git crypto/x509: better debug output for verify-cert calls Now that pkix.Name offers String() we should use that as some CN's are blank. Updates #24084 Change-Id: I268196f04b98c2bd4d5d0cf1fecd2c9bafeec0f1 Reviewed-on: https://go-review.googlesource.com/121357 Reviewed-by: Brad Fitzpatrick --- diff --git a/src/crypto/x509/root_darwin.go b/src/crypto/x509/root_darwin.go index bc35a1cf21..9d7b3a6ffb 100644 --- a/src/crypto/x509/root_darwin.go +++ b/src/crypto/x509/root_darwin.go @@ -181,12 +181,12 @@ func verifyCertWithSystem(block *pem.Block, cert *Certificate) bool { } if err := cmd.Run(); err != nil { if debugExecDarwinRoots { - println(fmt.Sprintf("crypto/x509: verify-cert rejected %s: %q", cert.Subject.CommonName, bytes.TrimSpace(stderr.Bytes()))) + println(fmt.Sprintf("crypto/x509: verify-cert rejected %s: %q", cert.Subject, bytes.TrimSpace(stderr.Bytes()))) } return false } if debugExecDarwinRoots { - println(fmt.Sprintf("crypto/x509: verify-cert approved %s", cert.Subject.CommonName)) + println(fmt.Sprintf("crypto/x509: verify-cert approved %s", cert.Subject)) } return true }