Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions certinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,12 @@ func CertificateText(cert *x509.Certificate) (string, error) {
} else {
fmt.Fprint(buf, "\n")
}
fmt.Fprintf(buf, "%16skeyid", "")
for _, val := range cert.AuthorityKeyId {
fmt.Fprintf(buf, ":%02X", val)
for i, val := range cert.AuthorityKeyId {
if i == 0 {
fmt.Fprintf(buf, "%16s%02X", "", val)
} else {
fmt.Fprintf(buf, ":%02X", val)
}
}
fmt.Fprint(buf, "\n")
case 37:
Expand Down
10 changes: 5 additions & 5 deletions test_certs/leaf1.cert.pem
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ Certificate:
a2:fc:4a:27:87
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
Netscape Comment:
Netscape Comment:
This is a test certificate only
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
61:2E:64:28:69:1D:0A:03:87:0E:BC:FB:0A:4C:44:D0:8D:25:7F:B4
X509v3 Authority Key Identifier:
keyid:7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
X509v3 Authority Key Identifier:
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E

Signature Algorithm: sha256WithRSAEncryption
8c:37:d9:86:6c:fc:29:6d:fe:87:68:a9:c3:22:98:71:57:57:
Expand Down
2 changes: 1 addition & 1 deletion test_certs/leaf1.cert.text
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Certificate:
X509v3 Subject Key Identifier:
61:2E:64:28:69:1D:0A:03:87:0E:BC:FB:0A:4C:44:D0:8D:25:7F:B4
X509v3 Authority Key Identifier:
keyid:7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
Signature Algorithm: SHA256-RSA
8c:37:d9:86:6c:fc:29:6d:fe:87:68:a9:c3:22:98:71:57:57:
fd:65:45:d1:c6:f3:0b:75:6f:3f:fd:5e:74:1b:87:fa:9a:91:
Expand Down
3 changes: 2 additions & 1 deletion test_certs/leaf2.cert.pem
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ Certificate:
X509v3 Subject Key Identifier:
8E:15:36:91:A2:96:AE:6B:9B:A3:6A:7C:30:7A:ED:1E:77:4E:16:64
X509v3 Authority Key Identifier:
keyid:7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E


Signature Algorithm: sha256WithRSAEncryption
4f:9c:7e:54:4c:cd:3f:92:0d:d1:04:a6:86:08:a0:4e:b0:5b:
Expand Down
2 changes: 1 addition & 1 deletion test_certs/leaf2.cert.text
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Certificate:
X509v3 Subject Key Identifier:
8E:15:36:91:A2:96:AE:6B:9B:A3:6A:7C:30:7A:ED:1E:77:4E:16:64
X509v3 Authority Key Identifier:
keyid:7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
Signature Algorithm: SHA256-RSA
4f:9c:7e:54:4c:cd:3f:92:0d:d1:04:a6:86:08:a0:4e:b0:5b:
eb:78:02:76:81:d7:05:8e:54:b3:3a:fe:7f:b1:50:7e:30:a3:
Expand Down
2 changes: 1 addition & 1 deletion test_certs/leaf3.cert.pem
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Certificate:
X509v3 Subject Key Identifier:
01:27:7C:0E:46:3D:5B:DA:40:EF:37:5B:B6:B4:4A:30:58:A8:4C:76
X509v3 Authority Key Identifier:
keyid:7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E

Signature Algorithm: sha256WithRSAEncryption
4c:66:23:bd:22:0d:20:f4:d1:ce:ad:f6:55:ff:9e:6c:e5:fb:
Expand Down
2 changes: 1 addition & 1 deletion test_certs/leaf3.cert.text
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Certificate:
X509v3 Subject Key Identifier:
01:27:7C:0E:46:3D:5B:DA:40:EF:37:5B:B6:B4:4A:30:58:A8:4C:76
X509v3 Authority Key Identifier:
keyid:7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
Signature Algorithm: SHA256-RSA
4c:66:23:bd:22:0d:20:f4:d1:ce:ad:f6:55:ff:9e:6c:e5:fb:
09:08:e6:2f:ad:a7:db:85:67:a8:d5:c6:1c:83:6c:8f:68:7c:
Expand Down
2 changes: 1 addition & 1 deletion test_certs/leaf4.cert.text
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Certificate:
X509v3 Subject Key Identifier:
66:52:36:55:36:A8:43:9C:41:89:62:6B:57:D4:6B:A6:47:3B:F4:F5
X509v3 Authority Key Identifier:
keyid:17:8F:7C:D2:64:44:F1:C4:20:31:14:D5:06:25:03:D8:AF:BD:49:0B
17:8F:7C:D2:64:44:F1:C4:20:31:14:D5:06:25:03:D8:AF:BD:49:0B
X509v3 Subject Alternative Name:
DNS:router.example.com, DNS:bastion.example.com
IP Address:192.168.1.1
Expand Down
2 changes: 1 addition & 1 deletion test_certs/leaf5.cert.pem
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Certificate:
X509v3 Subject Key Identifier:
B8:CE:91:DD:54:67:4A:1C:21:3E:56:8E:4C:41:49:0E:6A:00:46:12
X509v3 Authority Key Identifier:
keyid:7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E

Signature Algorithm: sha1WithRSAEncryption
98:7e:71:29:a3:a6:48:06:0b:ab:3a:ae:84:e7:4b:3c:74:01:
Expand Down
2 changes: 1 addition & 1 deletion test_certs/leaf5.cert.text
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Certificate:
X509v3 Subject Key Identifier:
B8:CE:91:DD:54:67:4A:1C:21:3E:56:8E:4C:41:49:0E:6A:00:46:12
X509v3 Authority Key Identifier:
keyid:7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
Signature Algorithm: SHA1-RSA
98:7e:71:29:a3:a6:48:06:0b:ab:3a:ae:84:e7:4b:3c:74:01:
6b:0e:b2:8b:3d:24:f0:ef:76:3c:b8:7b:93:0d:fc:ad:cf:c5:
Expand Down
2 changes: 1 addition & 1 deletion test_certs/root1.cert.pem
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Certificate:
X509v3 Subject Key Identifier:
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
X509v3 Authority Key Identifier:
keyid:7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E

Signature Algorithm: sha256WithRSAEncryption
60:bd:b4:c4:9a:09:0d:7a:d7:b4:6b:e2:85:3b:78:0b:97:de:
Expand Down
2 changes: 1 addition & 1 deletion test_certs/root1.cert.text
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Certificate:
X509v3 Subject Key Identifier:
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
X509v3 Authority Key Identifier:
keyid:7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
7C:0F:26:9D:ED:C8:7A:C0:05:1E:99:A3:5D:A5:9E:8D:A6:A6:96:5E
Signature Algorithm: SHA256-RSA
60:bd:b4:c4:9a:09:0d:7a:d7:b4:6b:e2:85:3b:78:0b:97:de:
57:47:34:19:37:2a:82:1a:79:c3:3f:0b:71:46:fe:9b:db:ce:
Expand Down
2 changes: 1 addition & 1 deletion test_certs/sigstore1.cert.text
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Certificate:
X509v3 Subject Key Identifier:
5D:11:E8:9B:0C:80:A2:77:F5:F3:97:18:27:CC:29:17:D2:63:57:2E
X509v3 Authority Key Identifier:
keyid:58:C0:1E:5F:91:45:A5:66:A9:7A:CC:90:A1:93:22:D0:2A:C5:C5:FA
58:C0:1E:5F:91:45:A5:66:A9:7A:CC:90:A1:93:22:D0:2A:C5:C5:FA
X509v3 Subject Alternative Name:
URI:https://github.com/hslatman/symfony-cli/.github/workflows/releaser.yml@refs/tags/v5.3.0-exp-sign-4
Sigstore GitHub Workflow Repository:
Expand Down
2 changes: 1 addition & 1 deletion test_certs/sigstore2.cert.text
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Certificate:
X509v3 Subject Key Identifier:
3B:2D:8C:D6:F0:71:10:EB:DF:7A:B9:4E:DD:24:52:33:CB:AC:6D:2C
X509v3 Authority Key Identifier:
keyid:DF:33:25:1A:5F:FE:27:51:DE:8A:17:F3:6A:32:27:90:42:50:51:A3
DF:33:25:1A:5F:FE:27:51:DE:8A:17:F3:6A:32:27:90:42:50:51:A3
X509v3 Subject Alternative Name: critical
Sigstore Identity: foo!127.0.0.1
Sigstore OIDC Issuer:
Expand Down