File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ func (result *Result) Out() {
61
61
62
62
// Top level result Root Certificates actually don't have a trust chain, so we'll have to print it here
63
63
if cert .IsRootCert () && ! result .hidePEMOutput {
64
- fmt .Printf ("\n \t Root CA Certificate - " + cert .Certificate .Subject .CommonName + ":\n \n %s\n \n " , result .dos2unixString (string (* cert .PemBlock )))
64
+ fmt .Printf ("\n \t Root CA Certificate - " + cert .Certificate .Subject .String () + ":\n \n %s\n \n " , result .dos2unixString (string (* cert .PemBlock )))
65
65
}
66
66
67
67
var sb = strings.Builder {}
@@ -103,11 +103,11 @@ func (result *Result) Out() {
103
103
for _ , cert = range chain {
104
104
if cert .Type == certificate .TypeServerCertificate ||
105
105
cert .Type == certificate .TypeSelfSignedServerCertificate {
106
- sb .WriteString ("Server Certificate - " + cert .Certificate .Subject .CommonName + ":\n \n " )
106
+ sb .WriteString ("Server Certificate - " + cert .Certificate .Subject .String () + ":\n \n " )
107
107
} else if cert .Type == certificate .TypeIntermediateCertificate {
108
- sb .WriteString ("Intermediate Certificate - " + cert .Certificate .Subject .CommonName + ":\n \n " )
108
+ sb .WriteString ("Intermediate Certificate - " + cert .Certificate .Subject .String () + ":\n \n " )
109
109
} else {
110
- sb .WriteString ("Root CA Certificate - " + cert .Certificate .Subject .CommonName + ":\n \n " )
110
+ sb .WriteString ("Root CA Certificate - " + cert .Certificate .Subject .String () + ":\n \n " )
111
111
}
112
112
113
113
// This caters for the case if the certificate was actually a system root certificate
You can’t perform that action at this time.
0 commit comments