Skip to content

Commit e36f98f

Browse files
authored
Amend HSM cert usage (#151)
There was an issue with invalid key types when verifying cosign signed registry sigs with a fulcio cert generated using the fuclio createca command This PR makes the resulting createca generated cert have partity to GCA generated certs The result is a HSM / createca root cert can be used to both sign and verify registry entries Resolves: #150 Signed-off-by: Luke Hinds <[email protected]>
1 parent d2344e5 commit e36f98f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmd/app/createca.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,8 @@ certificate authority for an instance of sigstore fulcio`,
9191
NotBefore: time.Now(),
9292
NotAfter: time.Now().AddDate(10, 0, 0),
9393
IsCA: true,
94-
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth},
95-
KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
96-
BasicConstraintsValid: true,
94+
KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageCRLSign,
95+
BasicConstraintsValid: true, MaxPathLen: 1,
9796
}
9897

9998
caBytes, err := x509.CreateCertificate(rand.Reader, rootCA, rootCA, pubKey, privKey)

0 commit comments

Comments
 (0)