Documentation ¶
Index ¶
- func NewFileCertStore(cryptoConfigMSPPath string) (core.KVStore, error)
- func NewFileKeyStore(cryptoConfigMSPPath string) (core.KVStore, error)
- type CAClientImpl
- func (c *CAClientImpl) Enroll(enrollmentID string, enrollmentSecret string) error
- func (c *CAClientImpl) Reenroll(enrollmentID string) error
- func (c *CAClientImpl) Register(request *api.RegistrationRequest) (string, error)
- func (c *CAClientImpl) Revoke(request *api.RevocationRequest) (*api.RevocationResponse, error)
- type CertFileUserStore
- type IdentityManager
- type MemoryKeyStore
- type MemoryUserStore
- type User
- func (u *User) EnrollmentCertificate() []byte
- func (u *User) Identifier() *msp.IdentityIdentifier
- func (u *User) PrivateKey() core.Key
- func (u *User) PublicVersion() msp.Identity
- func (u *User) Serialize() ([]byte, error)
- func (u *User) Sign(msg []byte) ([]byte, error)
- func (u *User) Verify(msg []byte, sig []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileCertStore ¶
NewFileCertStore ...
Types ¶
type CAClientImpl ¶
type CAClientImpl struct {
// contains filtered or unexported fields
}
CAClientImpl implements api/msp/CAClient
func NewCAClient ¶
func NewCAClient(orgName string, identityManager msp.IdentityManager, userStore msp.UserStore, cryptoSuite core.CryptoSuite, config core.Config) (*CAClientImpl, error)
NewCAClient creates a new CA CAClient instance
func (*CAClientImpl) Enroll ¶
func (c *CAClientImpl) Enroll(enrollmentID string, enrollmentSecret string) error
Enroll a registered user in order to receive a signed X509 certificate. A new key pair is generated for the user. The private key and the enrollment certificate issued by the CA are stored in SDK stores. They can be retrieved by calling IdentityManager.GetSigningIdentity().
enrollmentID The registered ID to use for enrollment enrollmentSecret The secret associated with the enrollment ID
func (*CAClientImpl) Reenroll ¶
func (c *CAClientImpl) Reenroll(enrollmentID string) error
Reenroll an enrolled user in order to obtain a new signed X509 certificate
func (*CAClientImpl) Register ¶
func (c *CAClientImpl) Register(request *api.RegistrationRequest) (string, error)
Register a User with the Fabric CA request: Registration Request Returns Enrolment Secret
func (*CAClientImpl) Revoke ¶
func (c *CAClientImpl) Revoke(request *api.RevocationRequest) (*api.RevocationResponse, error)
Revoke a User with the Fabric CA registrar: The User that is initiating the revocation request: Revocation Request
type CertFileUserStore ¶
type CertFileUserStore struct {
// contains filtered or unexported fields
}
CertFileUserStore stores each user in a separate file. Only user's enrollment cert is stored, in pem format. File naming is <user>@<org>-cert.pem
func NewCertFileUserStore ¶
func NewCertFileUserStore(path string) (*CertFileUserStore, error)
NewCertFileUserStore creates a new instance of CertFileUserStore
func NewCertFileUserStore1 ¶
func NewCertFileUserStore1(store core.KVStore) (*CertFileUserStore, error)
NewCertFileUserStore1 creates a new instance of CertFileUserStore
func (*CertFileUserStore) Delete ¶
func (s *CertFileUserStore) Delete(key msp.IdentityIdentifier) error
Delete deletes a User from store
func (*CertFileUserStore) Load ¶
func (s *CertFileUserStore) Load(key msp.IdentityIdentifier) (*msp.UserData, error)
Load returns the User stored in the store for a key.
type IdentityManager ¶
type IdentityManager struct {
// contains filtered or unexported fields
}
IdentityManager implements fab/IdentityManager
func NewIdentityManager ¶
func NewIdentityManager(orgName string, userStore msp.UserStore, cryptoSuite core.CryptoSuite, config config.Config) (*IdentityManager, error)
NewIdentityManager creates a new instance of IdentityManager
func (*IdentityManager) GetSigningIdentity ¶
func (mgr *IdentityManager) GetSigningIdentity(id string) (msp.SigningIdentity, error)
GetSigningIdentity returns a signing identity for the given id
type MemoryKeyStore ¶
type MemoryKeyStore struct {
// contains filtered or unexported fields
}
MemoryKeyStore is in-memory implementation of BCCSP key store
func NewMemoryKeyStore ¶
func NewMemoryKeyStore(password []byte) *MemoryKeyStore
NewMemoryKeyStore creates a new MemoryKeyStore instance
func (*MemoryKeyStore) GetKey ¶
func (s *MemoryKeyStore) GetKey(ski []byte) (bccsp.Key, error)
GetKey returns a key for the provided SKI
func (*MemoryKeyStore) ReadOnly ¶
func (s *MemoryKeyStore) ReadOnly() bool
ReadOnly returns always false
type MemoryUserStore ¶
type MemoryUserStore struct {
// contains filtered or unexported fields
}
MemoryUserStore is in-memory implementation of UserStore
func NewMemoryUserStore ¶
func NewMemoryUserStore() *MemoryUserStore
NewMemoryUserStore creates a new MemoryUserStore instance
func (*MemoryUserStore) Load ¶
func (s *MemoryUserStore) Load(id msp.IdentityIdentifier) (*msp.UserData, error)
Load loads a user from store
type User ¶
type User struct {
// contains filtered or unexported fields
}
User is a representation of a Fabric user
func (*User) EnrollmentCertificate ¶
EnrollmentCertificate Returns the underlying ECert representing this user’s identity.
func (*User) Identifier ¶
func (u *User) Identifier() *msp.IdentityIdentifier
Identifier returns user identifier
func (*User) PrivateKey ¶
PrivateKey returns the crypto suite representation of the private key
func (*User) PublicVersion ¶
PublicVersion returns the public parts of this identity
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
test
|
|
mockmspapi
Package mockmspapi is a generated GoMock package.
|
Package mockmspapi is a generated GoMock package. |