identity

package
v2.0.8-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEnrollIdentity

func NewEnrollIdentity(privateKey interface{}) (api.Identity, error)

func NewMSPIdentity

func NewMSPIdentity(mspId string, certPath string, keyPath string) (api.Identity, error)

func NewMSPIdentityBytes

func NewMSPIdentityBytes(mspId string, certBytes []byte, keyBytes []byte) (api.Identity, error)

func NewMSPIdentityFromPath

func NewMSPIdentityFromPath(mspId string, mspPath string) (api.Identity, error)

func NewMSPIdentityRaw

func NewMSPIdentityRaw(mspId string, cert *x509.Certificate, privateKey interface{}) (api.Identity, error)

Types

type MSPIdentities

type MSPIdentities struct {
	// identity from 'signcerts'
	MSP api.Identity
	// identities from 'admincerts'
	Admins []api.Identity
	// identities from 'users'
	Users []api.Identity
}

MSPIdentities - contains all parsed identities from msp folder Should be used instead of single `api.Identity` which contains ONLY msp identity

func NewMSPIdentitiesFromPath

func NewMSPIdentitiesFromPath(mspID string, mspPath string) (*MSPIdentities, error)

NewMSPIdentitiesFromPath - parse all certificates(msp,admins,users) from MSP folder. Came to replace legacy `util.LoadKeyPairFromMSP` method

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL