Documentation ¶
Index ¶
- Constants
- func GetBCCSPFromConf(dir string, conf *config.BCCSP) (bccsp.BCCSP, bccsp.KeyStore, error)
- func GetEnrollmentID(id []byte) (string, error)
- func GetPKCS11BCCSP(conf *config.BCCSP) (bccsp.BCCSP, bccsp.KeyStore, error)
- func GetSWBCCSP(dir string) (bccsp.BCCSP, bccsp.KeyStore, error)
- func GetSigningIdentity(mspConfigPath, mspID string, bccspConfig *config.BCCSP) (driver.SigningIdentity, error)
- func IsLowS(k *ecdsa.PublicKey, s *big.Int) (bool, error)
- func LoadLocalMSPAt(dir, id, mspType string, bccspConfig *config.BCCSP) (msp.MSP, error)
- func LoadLocalMSPSignerCert(dir string) ([]byte, error)
- func LoadVerifyingMSPAt(dir, id, mspType string) (msp.MSP, error)
- func NewIdentityFromBytes(raw []byte) (view.Identity, driver.Verifier, error)
- func NewProvider(mspConfigPath, mspID string, signerService SignerService) (*provider, error)
- func NewProviderWithBCCSPConfig(mspConfigPath, mspID string, signerService SignerService, ...) (*provider, error)
- func NewSigner() (view.Identity, driver.Signer, driver.Verifier, error)
- func NewVerifier(pk *ecdsa.PublicKey) *edsaVerifier
- func PemDecodeCert(pemBytes []byte) (*x509.Certificate, error)
- func PemDecodeKey(keyBytes []byte) (interface{}, error)
- func PemEncodeKey(key interface{}) ([]byte, error)
- func Serialize(mspID string, certPath string) ([]byte, error)
- func SerializeFromMSP(mspID string, path string) ([]byte, error)
- func SerializeRaw(mspID string, raw []byte) ([]byte, error)
- func ToBCCSPOpts(boxed interface{}) (*config.BCCSP, error)
- func ToLowS(k *ecdsa.PublicKey, s *big.Int) (*big.Int, bool, error)
- type Deserializer
- type FolderIdentityLoader
- type IdentityLoader
- type SignerService
Constants ¶
const ( MSPType = "bccsp" BCCSPOptField = "BCCSP" )
const ( BCCSPType = "bccsp" SignCerts = "signcerts" )
Variables ¶
This section is empty.
Functions ¶
func GetBCCSPFromConf ¶
GetBCCSPFromConf returns a BCCSP instance and its relative key store from the passed configuration. If no configuration is passed, the default one is used, namely the `SW` provider.
func GetEnrollmentID ¶
func GetPKCS11BCCSP ¶
GetPKCS11BCCSP returns a new instance of the HSM-based BCCSP
func GetSWBCCSP ¶
GetSWBCCSP returns a new instance of the software-based BCCSP
func GetSigningIdentity ¶
func GetSigningIdentity(mspConfigPath, mspID string, bccspConfig *config.BCCSP) (driver.SigningIdentity, error)
GetSigningIdentity retrieves a signing identity from the passed arguments
func LoadLocalMSPAt ¶
LoadLocalMSPAt loads an MSP whose configuration is stored at 'dir', and whose id and type are the passed as arguments.
func LoadLocalMSPSignerCert ¶
func LoadVerifyingMSPAt ¶
LoadVerifyingMSPAt loads a verifying MSP whose configuration is stored at 'dir', and whose id and type are the passed as arguments.
func NewIdentityFromBytes ¶
func NewProvider ¶
func NewProvider(mspConfigPath, mspID string, signerService SignerService) (*provider, error)
func NewProviderWithBCCSPConfig ¶
func NewProviderWithBCCSPConfig(mspConfigPath, mspID string, signerService SignerService, bccspConfig *config.BCCSP) (*provider, error)
func NewVerifier ¶
func PemDecodeCert ¶
func PemDecodeCert(pemBytes []byte) (*x509.Certificate, error)
func PemDecodeKey ¶
PemDecodeKey takes bytes and returns a Go key
func PemEncodeKey ¶
PemEncodeKey takes a Go key and converts it to bytes
func ToBCCSPOpts ¶ added in v0.2.0
Types ¶
type Deserializer ¶
type Deserializer struct{}
func (*Deserializer) DeserializeSigner ¶
func (i *Deserializer) DeserializeSigner(raw []byte) (driver.Signer, error)
func (*Deserializer) DeserializeVerifier ¶
func (i *Deserializer) DeserializeVerifier(raw []byte) (driver.Verifier, error)
func (*Deserializer) Info ¶
func (i *Deserializer) Info(raw []byte, auditInfo []byte) (string, error)
func (*Deserializer) String ¶
func (i *Deserializer) String() string
type FolderIdentityLoader ¶ added in v0.2.0
type FolderIdentityLoader struct {
*IdentityLoader
}
type IdentityLoader ¶ added in v0.2.0
type IdentityLoader struct{}