x509

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeystoreFullFolder = "keystoreFull"
	PrivateKeyFileName = "priv_sk"
	KeystoreFolder     = "keystore"
	ExtraPathElement   = "msp"
)
View Source
const (
	IdentityType identity.Type = "x509"
)

Variables

This section is empty.

Functions

func NewKeyStore

func NewKeyStore(kvs idriver.Keystore) crypto.KeyStore

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 {
	EnrollmentID string
}

func (*AuditInfoMatcher) Match

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

type AuditMatcherDeserializer

type AuditMatcherDeserializer struct{}

func (*AuditMatcherDeserializer) GetAuditInfoMatcher

func (a *AuditMatcherDeserializer) GetAuditInfoMatcher(owner driver.Identity, auditInfo []byte) (driver.Matcher, error)

type IdentityDeserializer

type IdentityDeserializer struct{}

IdentityDeserializer takes an identity and returns an ECDSA verifier

func (*IdentityDeserializer) DeserializeVerifier

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

type KeyManager

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

func NewKeyManager

func NewKeyManager(
	path string,
	signerService SignerService,
	bccspConfig *crypto.BCCSP,
	keyStore crypto.KeyStore,
) (*KeyManager, *crypto.Config, 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 *crypto.Config,
	configPath, keyStoreDirName string,
	signerService SignerService,
	bccspConfig *crypto.BCCSP,
	keyStore crypto.KeyStore,
) (*KeyManager, *crypto.Config, 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(context.Context, []byte) (driver.Identity, []byte, error)

func (*KeyManager) IdentityType

func (p *KeyManager) IdentityType() identity.Type

func (*KeyManager) Info

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

func (*KeyManager) IsRemote

func (p *KeyManager) IsRemote() bool

func (*KeyManager) SigningIdentity

func (p *KeyManager) SigningIdentity() driver.SigningIdentity

func (*KeyManager) String

func (p *KeyManager) String() string

type KeyManagerProvider

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

func NewKeyManagerProvider

func NewKeyManagerProvider(config idriver.Config, signerService idriver.SigService, keyStore crypto.KeyStore, ignoreVerifyOnlyWallet bool) *KeyManagerProvider

func (*KeyManagerProvider) Get

type SignerService

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

Directories

Path Synopsis
csp

Jump to

Keyboard shortcuts

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