Documentation
¶
Overview ¶
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- Variables
- func GetIdemixMspConfig(dir string, ID string) (*msp.MSPConfig, error)
- func GetLocalMspConfig(dir string, bccspConfig *factory.FactoryOpts, ID string) (*msp.MSPConfig, error)
- func GetLocalMspConfigWithType(dir string, bccspConfig *factory.FactoryOpts, ID, mspType string) (*msp.MSPConfig, error)
- func GetRoleMaskFromIdemixRole(role Role) int
- func GetVerifyingMspConfig(dir, ID, mspType string) (*msp.MSPConfig, error)
- func NewSerializedIdentity(mspID string, certPEM []byte) ([]byte, error)
- func ProviderTypeToString(id ProviderType) string
- func SetupBCCSPKeystoreConfig(bccspConfig *factory.FactoryOpts, keystoreDir string) *factory.FactoryOpts
- type BCCSPNewOpts
- type Configuration
- type IdemixNewOpts
- type Identity
- type IdentityDeserializer
- type IdentityIdentifier
- type MSP
- type MSPManager
- type MSPVersion
- type NewBaseOpts
- type NewOpts
- type NodeOUs
- type OUIdentifier
- type OrganizationalUnitIdentifiersConfiguration
- type ProviderType
- type Role
- type SigningIdentity
Constants ¶
View Source
const ( IdemixConfigDirMsp = "msp" IdemixConfigDirUser = "user" IdemixConfigFileIssuerPublicKey = "IssuerPublicKey" IdemixConfigFileRevocationPublicKey = "RevocationPublicKey" IdemixConfigFileSigner = "SignerConfig" )
View Source
const ( MSPv1_0 = iota MSPv1_1 MSPv1_3 MSPv1_4_2 )
View Source
const ( AttributeIndexOU = iota AttributeIndexRole AttributeIndexEnrollmentId AttributeIndexRevocationHandle )
View Source
const ( AttributeNameOU = "OU" AttributeNameRole = "Role" AttributeNameEnrollmentId = "EnrollmentID" AttributeNameRevocationHandle = "RevocationHandle" )
Variables ¶
View Source
var Options = map[string]NewOpts{ ProviderTypeToString(FABRIC): &BCCSPNewOpts{NewBaseOpts: NewBaseOpts{Version: MSPv1_0}}, ProviderTypeToString(IDEMIX): &IdemixNewOpts{NewBaseOpts: NewBaseOpts{Version: MSPv1_1}}, }
Functions ¶
func GetLocalMspConfig ¶
func GetVerifyingMspConfig ¶
func NewSerializedIdentity ¶
func ProviderTypeToString ¶
func ProviderTypeToString(id ProviderType) string
func SetupBCCSPKeystoreConfig ¶
func SetupBCCSPKeystoreConfig(bccspConfig *factory.FactoryOpts, keystoreDir string) *factory.FactoryOpts
Types ¶
type BCCSPNewOpts ¶
type BCCSPNewOpts struct {
NewBaseOpts
}
type Configuration ¶
type Configuration struct { OrganizationalUnitIdentifiers []*OrganizationalUnitIdentifiersConfiguration `yaml:"OrganizationalUnitIdentifiers,omitempty"` NodeOUs *NodeOUs `yaml:"NodeOUs,omitempty"` }
type IdemixNewOpts ¶
type IdemixNewOpts struct {
NewBaseOpts
}
type Identity ¶
type Identity interface { ExpiresAt() time.Time GetIdentifier() *IdentityIdentifier GetMSPIdentifier() string Validate() error GetOrganizationalUnits() []*OUIdentifier Anonymous() bool Verify(msg []byte, sig []byte) error Serialize() ([]byte, error) SatisfiesPrincipal(principal *msp.MSPPrincipal) error }
type IdentityDeserializer ¶
type IdentityIdentifier ¶
type MSP ¶
type MSP interface { IdentityDeserializer Setup(config *msp.MSPConfig) error GetVersion() MSPVersion GetType() ProviderType GetIdentifier() (string, error) GetSigningIdentity(identifier *IdentityIdentifier) (SigningIdentity, error) GetDefaultSigningIdentity() (SigningIdentity, error) GetTLSRootCerts() [][]byte GetTLSIntermediateCerts() [][]byte Validate(id Identity) error SatisfiesPrincipal(id Identity, principal *msp.MSPPrincipal) error }
func NewBccspMspWithKeyStore ¶
type MSPManager ¶
type MSPManager interface { IdentityDeserializer Setup(msps []MSP) error GetMSPs() (map[string]MSP, error) }
func NewMSPManager ¶
func NewMSPManager() MSPManager
type MSPVersion ¶
type MSPVersion int
type NewBaseOpts ¶
type NewBaseOpts struct {
Version MSPVersion
}
func (*NewBaseOpts) GetVersion ¶
func (o *NewBaseOpts) GetVersion() MSPVersion
type NewOpts ¶
type NewOpts interface {
GetVersion() MSPVersion
}
type NodeOUs ¶
type NodeOUs struct { Enable bool `yaml:"Enable,omitempty"` ClientOUIdentifier *OrganizationalUnitIdentifiersConfiguration `yaml:"ClientOUIdentifier,omitempty"` PeerOUIdentifier *OrganizationalUnitIdentifiersConfiguration `yaml:"PeerOUIdentifier,omitempty"` AdminOUIdentifier *OrganizationalUnitIdentifiersConfiguration `yaml:"AdminOUIdentifier,omitempty"` OrdererOUIdentifier *OrganizationalUnitIdentifiersConfiguration `yaml:"OrdererOUIdentifier,omitempty"` }
type OUIdentifier ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.