소스 검색

Enable softkms and cloudkms.

Mariano Cano 6 년 전
부모
커밋
7d61c0003c
1개의 변경된 파일과 8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      kms/kms.go

+ 8 - 1
kms/kms.go

@@ -6,6 +6,13 @@ import (
 
 
 	"github.com/pkg/errors"
 	"github.com/pkg/errors"
 	"github.com/smallstep/certificates/kms/apiv1"
 	"github.com/smallstep/certificates/kms/apiv1"
+
+	// Enabled kms interfaces.
+	_ "github.com/smallstep/certificates/kms/cloudkms"
+	_ "github.com/smallstep/certificates/kms/softkms"
+
+	// Experimental kms interfaces.
+	_ "github.com/smallstep/certificates/kms/yubikey"
 )
 )
 
 
 // KeyManager is the interface implemented by all the KMS.
 // KeyManager is the interface implemented by all the KMS.
@@ -28,7 +35,7 @@ func New(ctx context.Context, opts apiv1.Options) (KeyManager, error) {
 
 
 	fn, ok := apiv1.LoadKeyManagerNewFunc(t)
 	fn, ok := apiv1.LoadKeyManagerNewFunc(t)
 	if !ok {
 	if !ok {
-		return nil, errors.Errorf("unsupported kms type '%s'", opts.Type)
+		return nil, errors.Errorf("unsupported kms type '%s'", t)
 	}
 	}
 	return fn(ctx, opts)
 	return fn(ctx, opts)
 }
 }