Skip to content

Commit e7abca4

Browse files
committed
Read Issuer.Organization cert field
1 parent 97048ee commit e7abca4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/ssl-pinning-fetcher/main.go

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ func main() {
4848
hashHex := hex.EncodeToString(hash[:])
4949

5050
// Print the base64 encoded hash
51+
subjectCommonName := cert.Subject.CommonName
52+
issuerOrganization := cert.Issuer.Organization
53+
fmt.Println("CN", subjectCommonName)
54+
fmt.Println("Issuer O", issuerOrganization)
5155
fmt.Println("Base64 encoded SHA-256 hash of the certificate:", hashBase64)
5256
fmt.Println("Hex encoded SHA-256 hash of the certificate:", hashHex)
5357
}

0 commit comments

Comments
 (0)