diff --git a/authority/provisioner/scep.go b/authority/provisioner/scep.go index a5825b9b..bedf1733 100644 --- a/authority/provisioner/scep.go +++ b/authority/provisioner/scep.go @@ -2,7 +2,6 @@ package provisioner import ( "context" - "fmt" "time" "github.com/pkg/errors" @@ -88,7 +87,7 @@ func (s *SCEP) Init(config Config) (err error) { } if s.MinimumPublicKeyLength%8 != 0 { - return fmt.Errorf("only minimum public keys exactly divisible by 8 are supported; %d is not exactly divisibly by 8", s.MinimumPublicKeyLength) + return errors.Errorf("only minimum public keys exactly divisible by 8 are supported; %d is not exactly divisibly by 8", s.MinimumPublicKeyLength) } // TODO: add other, SCEP specific, options? diff --git a/authority/provisioner/sign_options.go b/authority/provisioner/sign_options.go index 20b6f8c0..764916b6 100644 --- a/authority/provisioner/sign_options.go +++ b/authority/provisioner/sign_options.go @@ -8,7 +8,6 @@ import ( "crypto/x509/pkix" "encoding/asn1" "encoding/json" - "fmt" "net" "net/url" "reflect" @@ -139,7 +138,7 @@ func (v publicKeyMinimumLengthValidator) Valid(req *x509.CertificateRequest) err case *rsa.PublicKey: minimumLengthInBytes := v.length / 8 if k.Size() < minimumLengthInBytes { - return fmt.Errorf("rsa key in CSR must be at least %d bits (%d bytes)", v.length, minimumLengthInBytes) + return errors.Errorf("rsa key in CSR must be at least %d bits (%d bytes)", v.length, minimumLengthInBytes) } case *ecdsa.PublicKey, ed25519.PublicKey: default: