Kaynağa Gözat

Add variable with the default implementation.

Mariano Cano 5 yıl önce
ebeveyn
işleme
822a1e3bdb
1 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 4 1
      kms/kms.go

+ 4 - 1
kms/kms.go

@@ -8,7 +8,7 @@ import (
 	"github.com/smallstep/certificates/kms/apiv1"
 	"github.com/smallstep/certificates/kms/apiv1"
 
 
 	// Enable default implementation
 	// Enable default implementation
-	_ "github.com/smallstep/certificates/kms/softkms"
+	"github.com/smallstep/certificates/kms/softkms"
 )
 )
 
 
 // KeyManager is the interface implemented by all the KMS.
 // KeyManager is the interface implemented by all the KMS.
@@ -21,6 +21,9 @@ type CertificateManager = apiv1.CertificateManager
 // Options are the KMS options. They represent the kms object in the ca.json.
 // Options are the KMS options. They represent the kms object in the ca.json.
 type Options = apiv1.Options
 type Options = apiv1.Options
 
 
+// Default is the implementation of the default KMS.
+var Default = &softkms.SoftKMS{}
+
 // New initializes a new KMS from the given type.
 // New initializes a new KMS from the given type.
 func New(ctx context.Context, opts apiv1.Options) (KeyManager, error) {
 func New(ctx context.Context, opts apiv1.Options) (KeyManager, error) {
 	if err := opts.Validate(); err != nil {
 	if err := opts.Validate(); err != nil {