Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 3393a83

Browse files
committed
Make self-signed cert a CA
1 parent c76d689 commit 3393a83

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/cloud/packet/ca/ca.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ func GenerateSelfSigned(cn, hosts string) ([]byte, *rsa.PrivateKey, error) {
4343
NotBefore: notBefore,
4444
NotAfter: notAfter,
4545

46-
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
47-
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
46+
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
47+
MaxPathLenZero: true,
4848
BasicConstraintsValid: true,
49+
MaxPathLen: 0,
50+
IsCA: true,
4951
}
5052
hostnames := strings.Split(hosts, ",")
5153
for _, h := range hostnames {

0 commit comments

Comments
 (0)