mirror of
https://github.com/smallstep/certificates.git
synced 2024-11-17 15:29:21 +00:00
Fix linting issues
This commit is contained in:
parent
6440870a80
commit
ff08b5055e
@ -31,8 +31,7 @@ type NamePolicyError struct {
|
||||
}
|
||||
|
||||
func (e NamePolicyError) Error() string {
|
||||
switch e.Reason {
|
||||
case NotAuthorizedForThisName:
|
||||
if e.Reason == NotAuthorizedForThisName {
|
||||
return "not authorized to sign for this name: " + e.Detail
|
||||
}
|
||||
return "unknown error"
|
||||
@ -340,7 +339,7 @@ func (e *NamePolicyEngine) validateNames(dnsNames []string, ips []net.IP, emailA
|
||||
if e.numberOfPrincipalConstraints == 0 && e.totalNumberOfPermittedConstraints > 0 {
|
||||
return NamePolicyError{
|
||||
Reason: NotAuthorizedForThisName,
|
||||
Detail: fmt.Sprintf("username principal %q is not explicity permitted by any constraint", username),
|
||||
Detail: fmt.Sprintf("username principal %q is not explicitly permitted by any constraint", username),
|
||||
}
|
||||
}
|
||||
// TODO: some validation? I.e. allowed characters?
|
||||
|
Loading…
Reference in New Issue
Block a user