Fix mixed DNS and IP SANs in Order

This commit is contained in:
Herman Slatman 2021-06-03 22:45:24 +02:00
parent af615db6b5
commit 76dcf542d4
No known key found for this signature in database
GPG key ID: F4D8A44EA0A75A4F
2 changed files with 44 additions and 23 deletions

View file

@ -33,7 +33,7 @@ func (n *NewOrderRequest) Validate() error {
return acme.NewError(acme.ErrorMalformedType, "identifier type unsupported: %s", id.Type)
}
if id.Type == "ip" && net.ParseIP(id.Value) == nil {
return acme.NewError(acme.ErrorMalformedType, "%s is not a valid IP address", id.Value)
return acme.NewError(acme.ErrorMalformedType, "invalid IP address: %s", id.Value)
}
}
return nil