Versions in this module Expand all Collapse all v0 v0.2.0 Nov 1, 2018 Changes in this version + var ErrPemEncodedExpected = errors.New("expecting a PEM-encoded X509 certificate; PEM block not found") + func ActorsFromPem(mspID string, certPEMs map[string][]byte) (map[string]*CertIdentity, error) + func Certificate(c []byte) (cert *x509.Certificate, err error) + func GetDN(name *pkix.Name) string + func ID(subject, issuer string) string + func IDByCert(cert *x509.Certificate) string + func IDRaw(subject, issuer string) string + type Actors map[string]*CertIdentity + func ActorsFromPemFile(mspID string, files map[string]string, getContent GetContent) (Actors, error) + type CertIdentity struct + Cert *x509.Certificate + MspID string + func FromFile(mspID string, filename string, getContent GetContent) (ci *CertIdentity, err error) + func FromSerialized(s msp.SerializedIdentity) (ci *CertIdentity, err error) + func FromStub(stub shim.ChaincodeStubInterface) (ci *CertIdentity, err error) + func New(mspID string, certPEM []byte) (ci *CertIdentity, err error) + func (ci CertIdentity) GetID() string + func (ci CertIdentity) GetIssuer() string + func (ci CertIdentity) GetMSPID() string + func (ci CertIdentity) GetPEM() []byte + func (ci CertIdentity) GetPublicKey() interface{} + func (ci CertIdentity) GetSubject() string + func (ci CertIdentity) Is(id Identity) bool + func (ci CertIdentity) ToBytes() ([]byte, error) + func (ci CertIdentity) ToSerialized() *msp.SerializedIdentity + type Entry struct + Issuer string + MSPId string + PEM []byte + Subject string + func CreateEntry(i Identity) (g *Entry, err error) + func EntryFromSerialized(s msp.SerializedIdentity) (g *Entry, err error) + func EntryFromStub(stub shim.ChaincodeStubInterface) (g *Entry, err error) + func (e Entry) GetID() string + func (e Entry) GetIdentityEntry() Entry + func (e Entry) GetIssuer() string + func (e Entry) GetMSPID() string + func (e Entry) GetPEM() []byte + func (e Entry) GetPublicKey() interface{} + func (e Entry) GetSubject() string + func (e Entry) Is(id Identity) bool + type GetContent func(string) ([]byte, error) + type Id struct + Cert string + MSP string + type Identity interface + GetID func() string + GetIssuer func() string + GetMSPID func() string + GetPEM func() []byte + GetPublicKey func() interface{} + GetSubject func() string + Is func(i Identity) bool + type IdentityEntry interface + GetIdentityEntry func() Entry