certificates/kms/pkcs11/pkcs11_no_cgo.go
2021-01-26 20:15:57 -08:00

19 lines
414 B
Go

// +build !cgo
package pkcs11
import (
"context"
"os"
"path/filepath"
"github.com/pkg/errors"
"github.com/smallstep/certificates/kms/apiv1"
)
func init() {
apiv1.Register(apiv1.PKCS11, func(ctx context.Context, opts apiv1.Options) (apiv1.KeyManager, error) {
name := filepath.Base(os.Args[0])
return nil, errors.Errorf("unsupported kms type 'pkcs11': %s is compiled without cgo support", name)
})
}