mirror of
https://github.com/FiloSottile/mkcert.git
synced 2025-10-13 16:31:41 +08:00
Add serverAuth EKU to client certs for Service Mesh mTLS setups
This commit is contained in:

committed by
Filippo Valsorda

parent
ff17118210
commit
574ea52743
2
cert.go
2
cert.go
@@ -80,7 +80,7 @@ func (m *mkcert) makeCert(hosts []string) {
|
||||
}
|
||||
|
||||
if m.client {
|
||||
tpl.ExtKeyUsage = []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}
|
||||
tpl.ExtKeyUsage = []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}
|
||||
} else if len(tpl.IPAddresses) > 0 || len(tpl.DNSNames) > 0 {
|
||||
tpl.ExtKeyUsage = []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}
|
||||
}
|
||||
|
Reference in New Issue
Block a user