fabric: github.com/hyperledger/fabric/gossip/identity Index | Files

package identity

import "github.com/hyperledger/fabric/gossip/identity"

Index

Package Files

identity.go

func GetIdentityUsageThreshold Uses

func GetIdentityUsageThreshold() time.Duration

GetIdentityUsageThreshold returns the usage threshold of identities. Identities that are not used at least once during the usage threshold duration are purged.

func SetIdentityUsageThreshold Uses

func SetIdentityUsageThreshold(duration time.Duration)

SetIdentityUsageThreshold sets the usage threshold of identities. Identities that are not used at least once during the given time are purged

type Mapper Uses

type Mapper interface {
    // Put associates an identity to its given pkiID, and returns an error
    // in case the given pkiID doesn't match the identity
    Put(pkiID common.PKIidType, identity api.PeerIdentityType) error

    // Get returns the identity of a given pkiID, or error if such an identity
    // isn't found
    Get(pkiID common.PKIidType) (api.PeerIdentityType, error)

    // Sign signs a message, returns a signed message on success
    // or an error on failure
    Sign(msg []byte) ([]byte, error)

    // Verify verifies a signed message
    Verify(vkID, signature, message []byte) error

    // GetPKIidOfCert returns the PKI-ID of a certificate
    GetPKIidOfCert(api.PeerIdentityType) common.PKIidType

    // SuspectPeers re-validates all peers that match the given predicate
    SuspectPeers(isSuspected api.PeerSuspector)

    // IdentityInfo returns information known peer identities
    IdentityInfo() api.PeerIdentitySet

    // Stop stops all background computations of the Mapper
    Stop()
}

Mapper holds mappings between pkiID to certificates(identities) of peers

func NewIdentityMapper Uses

func NewIdentityMapper(mcs api.MessageCryptoService, selfIdentity api.PeerIdentityType, onPurge purgeTrigger, sa api.SecurityAdvisor) Mapper

NewIdentityMapper method, all we need is a reference to a MessageCryptoService

Package identity imports 7 packages (graph) and is imported by 2 packages. Updated 2018-12-14. Refresh now. Tools for package owners.