Fixed a bug that prevented adding a mandatory SAN if the certificate type is server.

This commit is contained in:
2025-08-03 07:37:55 +02:00
parent 176901d960
commit 8114d667ec

2
ca.go
View File

@@ -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)
} }