msp

package
v0.4.33 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCustomIdentityManager

func NewCustomIdentityManager(orgName string, cryptoProvider coreApi.CryptoSuite, config fabApi.EndpointConfig, mspConfigPath string) (mspApi.IdentityManager, error)

NewCustomIdentityManager Constructor for a custom identity manager.

Types

type CustomIdentityManager

type CustomIdentityManager struct {
	*msp.IdentityManager
	// contains filtered or unexported fields
}

CustomIdentityManager is used for retriving user's identity manager

func (*CustomIdentityManager) GetSigningIdentity

func (c *CustomIdentityManager) GetSigningIdentity(id string) (mspApi.SigningIdentity, error)

GetSigningIdentity will sign the given object with provided key,

func (*CustomIdentityManager) GetUser

func (c *CustomIdentityManager) GetUser(userName string) (*User, error)

GetUser returns a user for the given user name

type CustomMSPProvider

type CustomMSPProvider struct {
	msppvdr.MSPProvider
	// contains filtered or unexported fields
}

CustomMSPProvider will provide custom msp provider

func (*CustomMSPProvider) IdentityManager

func (p *CustomMSPProvider) IdentityManager(orgName string) (mspApi.IdentityManager, bool)

IdentityManager returns the organization's identity manager

type CustomMspPkg

type CustomMspPkg struct {
	defmsp.ProviderFactory
	CryptoPath string
}

CustomMspPkg is will provide custom msp pkg

func (*CustomMspPkg) CreateIdentityManagerProvider

func (m *CustomMspPkg) CreateIdentityManagerProvider(config fabApi.EndpointConfig, cryptoProvider coreApi.CryptoSuite, userStore mspApi.UserStore) (msp.IdentityManagerProvider, error)

CreateIdentityManagerProvider returns a new custom implementation of msp provider

type User

type User struct {
	// contains filtered or unexported fields
}

User is representation of a Fabric user

func (*User) EnrollmentCertificate

func (u *User) EnrollmentCertificate() []byte

EnrollmentCertificate return enrollment certificate

func (*User) Identifier

func (u *User) Identifier() *mspApi.IdentityIdentifier

Identifier returns user identifier

func (*User) PrivateKey

func (u *User) PrivateKey() coreApi.Key

PrivateKey return private key

func (*User) PublicVersion

func (u *User) PublicVersion() mspApi.Identity

PublicVersion returns the public parts of this identity

func (*User) Serialize

func (u *User) Serialize() ([]byte, error)

Serialize return serialized identity

func (*User) Sign

func (u *User) Sign(msg []byte) ([]byte, error)

Sign the message

func (*User) Verify

func (u *User) Verify(msg []byte, sig []byte) error

Verify a signature over some message using this identity as reference

Jump to

Keyboard shortcuts

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