Fix duplicate import in SCEP provisioner

This commit is contained in:
Herman Slatman 2023-09-22 11:46:51 +02:00
parent 4fd4227b73
commit 5f8e0de1c3
No known key found for this signature in database
GPG Key ID: F4D8A44EA0A75A4F

View File

@ -14,7 +14,6 @@ import (
"github.com/pkg/errors"
"go.step.sm/crypto/kms"
"go.step.sm/crypto/kms/apiv1"
kmsapi "go.step.sm/crypto/kms/apiv1"
"go.step.sm/crypto/kms/uri"
"go.step.sm/linkedca"
@ -214,7 +213,7 @@ func (s *SCEP) Init(config Config) (err error) {
return errors.New("failed parsing decrypter key: no PEM block found")
}
opts := kms.Options{
Type: apiv1.SoftKMS,
Type: kmsapi.SoftKMS,
}
if s.keyManager, err = kms.New(context.Background(), opts); err != nil {
return fmt.Errorf("failed initializing kms: %w", err)
@ -244,12 +243,12 @@ func (s *SCEP) Init(config Config) (err error) {
if err != nil {
return fmt.Errorf("failed parsing decrypter key: %w", err)
}
var kmsType apiv1.Type
var kmsType kmsapi.Type
switch {
case u.Scheme != "":
kmsType = kms.Type(u.Scheme)
default:
kmsType = apiv1.SoftKMS
kmsType = kmsapi.SoftKMS
}
opts := kms.Options{
Type: kmsType,