Răsfoiți Sursa

Merge pull request #1287 from smallstep/max/linting-errors

Fix linting errors
Max 3 ani în urmă
părinte
comite
6915feaae9
3 a modificat fișierele cu 2 adăugiri și 3 ștergeri
  1. 1 1
      authority/policy.go
  2. 1 1
      authority/policy_test.go
  3. 0 1
      cmd/step-ca/main.go

+ 1 - 1
authority/policy.go

@@ -248,7 +248,7 @@ func isAllowed(engine authPolicy.X509Policy, sans []string) error {
 		if isNamePolicyError && policyErr.Reason == policy.NotAllowed {
 		if isNamePolicyError && policyErr.Reason == policy.NotAllowed {
 			return &PolicyError{
 			return &PolicyError{
 				Typ: AdminLockOut,
 				Typ: AdminLockOut,
-				Err: fmt.Errorf("the provided policy would lock out %s from the CA. Please create an x509 policy to include %s as an allowed DNS name.", sans, sans),
+				Err: fmt.Errorf("the provided policy would lock out %s from the CA. Please create an x509 policy to include %s as an allowed DNS name", sans, sans),
 			}
 			}
 		}
 		}
 		return &PolicyError{
 		return &PolicyError{

+ 1 - 1
authority/policy_test.go

@@ -127,7 +127,7 @@ func TestAuthority_checkPolicy(t *testing.T) {
 				},
 				},
 				err: &PolicyError{
 				err: &PolicyError{
 					Typ: AdminLockOut,
 					Typ: AdminLockOut,
-					Err: errors.New("the provided policy would lock out [otherAdmin] from the CA. Please update your policy to include [otherAdmin] as an allowed name"),
+					Err: errors.New("the provided policy would lock out [otherAdmin] from the CA. Please create an x509 policy to include [otherAdmin] as an allowed DNS name"),
 				},
 				},
 			}
 			}
 		},
 		},

+ 0 - 1
cmd/step-ca/main.go

@@ -52,7 +52,6 @@ var (
 func init() {
 func init() {
 	step.Set("Smallstep CA", Version, BuildTime)
 	step.Set("Smallstep CA", Version, BuildTime)
 	authority.GlobalVersion.Version = Version
 	authority.GlobalVersion.Version = Version
-	//nolint:staticcheck // deprecated in Go 1.20
 	rand.Seed(time.Now().UnixNano())
 	rand.Seed(time.Now().UnixNano())
 	// Add support for asking passwords
 	// Add support for asking passwords
 	pemutil.PromptPassword = func(msg string) ([]byte, error) {
 	pemutil.PromptPassword = func(msg string) ([]byte, error) {