github.com/49746628/fabric-ca-gm@v2.0.0-alpha.0.20200822143404-8a07eefa7452+incompatible/lib/keyrequestnopkcs11.go (about) 1 // +build !pkcs11 2 3 /* 4 Copyright IBM Corp. All Rights Reserved. 5 6 SPDX-License-Identifier: Apache-2.0 7 */ 8 9 package lib 10 11 import "github.com/hyperledger/fabric-ca/internal/pkg/api" 12 13 // GetKeyRequest constructs and returns api.KeyRequest object based on the bccsp 14 // configuration options 15 func GetKeyRequest(cfg *CAConfig) *api.KeyRequest { 16 if cfg.CSP.SwOpts != nil { 17 return &api.KeyRequest{Algo: "ecdsa", Size: cfg.CSP.SwOpts.SecLevel} 18 } 19 return api.NewKeyRequest() 20 }