Fixed a bug that prevented adding a mandatory SAN if the certificate type is server.
This commit is contained in:
2
ca.go
2
ca.go
@@ -477,7 +477,7 @@ func issueSingleCertificate(def CertificateDefinition) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add default dns SAN for server/server-only if none specified
|
// Add default dns SAN for server/server-only if none specified
|
||||||
if (def.Type == "server" || def.Type == "server-only") && len(def.SAN) == 0 {
|
if strings.Contains(def.Type, "server") && len(def.SAN) == 0 {
|
||||||
def.SAN = append(def.SAN, "dns:"+def.Subject)
|
def.SAN = append(def.SAN, "dns:"+def.Subject)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user