x509

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeystoreFullFolder = "keystoreFull"
	PrivateKeyFileName = "priv_sk"
	KeystoreFolder     = "keystore"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditInfo

type AuditInfo struct {
	EID string
	RH  []byte
}

func (*AuditInfo) Bytes

func (a *AuditInfo) Bytes() ([]byte, error)

func (*AuditInfo) EnrollmentID

func (a *AuditInfo) EnrollmentID() string

func (*AuditInfo) FromBytes

func (a *AuditInfo) FromBytes(raw []byte) error

func (*AuditInfo) RevocationHandle

func (a *AuditInfo) RevocationHandle() string

type AuditInfoDeserializer

type AuditInfoDeserializer struct{}

func (*AuditInfoDeserializer) DeserializeAuditInfo

func (a *AuditInfoDeserializer) DeserializeAuditInfo(raw []byte) (driver2.AuditInfo, error)

type AuditInfoMatcher

type AuditInfoMatcher struct {
	CommonName string
}

func (*AuditInfoMatcher) Match

func (a *AuditInfoMatcher) Match(id []byte) error

type AuditMatcherDeserializer

type AuditMatcherDeserializer struct{}

func (*AuditMatcherDeserializer) GetOwnerMatcher

func (a *AuditMatcherDeserializer) GetOwnerMatcher(raw []byte) (driver.Matcher, error)

type KeyManager

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

func NewKeyManager

func NewKeyManager(mspConfigPath, keyStorePath, mspID string, signerService SignerService, bccspConfig *msp2.BCCSP) (*KeyManager, *msp.MSPConfig, error)

NewKeyManager returns a new X509 provider with the passed BCCSP configuration. If the configuration path contains the secret key, then the provider can generate also signatures, otherwise it cannot.

func NewKeyManagerFromConf

func NewKeyManagerFromConf(conf *msp.MSPConfig, mspConfigPath, keyStorePath, mspID string, signerService SignerService, bccspConfig *msp2.BCCSP) (*KeyManager, *msp.MSPConfig, error)

func (*KeyManager) Anonymous

func (p *KeyManager) Anonymous() bool

func (*KeyManager) DeserializeSigner

func (p *KeyManager) DeserializeSigner(raw []byte) (driver.Signer, error)

func (*KeyManager) DeserializeVerifier

func (p *KeyManager) DeserializeVerifier(raw []byte) (driver.Verifier, error)

func (*KeyManager) EnrollmentID

func (p *KeyManager) EnrollmentID() string

func (*KeyManager) Identity

func (p *KeyManager) Identity([]byte) (driver.Identity, []byte, error)

func (*KeyManager) Info

func (p *KeyManager) Info(raw []byte, auditInfo []byte) (string, error)

func (*KeyManager) IsRemote

func (p *KeyManager) IsRemote() bool

func (*KeyManager) SerializedIdentity

func (p *KeyManager) SerializedIdentity() (driver.SigningIdentity, error)

func (*KeyManager) String

func (p *KeyManager) String() string

type KeyManagerProvider

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

func NewKeyManagerProvider

func NewKeyManagerProvider(config driver2.Config, mspID string, signerService driver2.SigService, ignoreVerifyOnlyWallet bool) *KeyManagerProvider

func (*KeyManagerProvider) Get

type MSPIdentityDeserializer

type MSPIdentityDeserializer struct{}

MSPIdentityDeserializer takes as MSP identity and returns an ECDSA verifier

func (*MSPIdentityDeserializer) DeserializeVerifier

func (d *MSPIdentityDeserializer) DeserializeVerifier(id driver.Identity) (driver.Verifier, error)

type SignerService

type SignerService interface {
	RegisterSigner(identity driver.Identity, signer driver.Signer, verifier driver.Verifier, signerInfo []byte) error
}

Directories

Path Synopsis
msp

Jump to

Keyboard shortcuts

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