Documentation
¶
Index ¶
- Constants
- func ExpiresAt(identityBytes []byte) time.Time
- func GetRandomBytes(len int) ([]byte, error)
- func GetRandomNonce() ([]byte, error)
- func TrackExpiration(tls bool, serverCert []byte, clientCertChain [][]byte, sIDBytes []byte, ...)
- type IdentitySerializer
- type LocalSigner
- type Scheduler
- type SignatureHeaderCreator
- type SignatureHeaderMaker
- type Signer
- type SignerSupport
- type WarnFunc
Constants ¶
const (
// NonceSize is the default NonceSize
NonceSize = 24
)
Variables ¶
This section is empty.
Functions ¶
func ExpiresAt ¶
ExpiresAt returns when the given identity expires, or a zero time.Time in case we cannot determine that
func GetRandomBytes ¶
GetRandomBytes returns len random looking bytes
func GetRandomNonce ¶
GetRandomNonce returns a random byte array of length NonceSize
Types ¶
type IdentitySerializer ¶
type IdentitySerializer interface {
// Serialize converts an identity to bytes
Serialize() ([]byte, error)
}
IdentitySerializer serializes identities
type LocalSigner ¶
type LocalSigner interface {
SignatureHeaderMaker
Signer
}
LocalSigner is a temporary stub interface which will be implemented by the local MSP
type SignatureHeaderCreator ¶
type SignatureHeaderCreator struct {
SignerSupport
}
SignatureHeaderCreator creates signature headers
func NewSignatureHeaderCreator ¶
func NewSignatureHeaderCreator(ss SignerSupport) *SignatureHeaderCreator
NewSignatureHeaderCreator creates new signature headers
func (*SignatureHeaderCreator) NewSignatureHeader ¶
func (bs *SignatureHeaderCreator) NewSignatureHeader() (*cb.SignatureHeader, error)
NewSignatureHeader creates a SignatureHeader with the correct signing identity and a valid nonce
type SignatureHeaderMaker ¶
type SignatureHeaderMaker interface {
// NewSignatureHeader creates a SignatureHeader with the correct signing identity and a valid nonce
NewSignatureHeader() (*cb.SignatureHeader, error)
}
SignatureHeaderMaker creates a new SignatureHeader
type Signer ¶
type Signer interface {
// Sign a message and return the signature over the digest, or error on failure
Sign(message []byte) ([]byte, error)
}
Signer signs messages
type SignerSupport ¶
type SignerSupport interface {
Signer
IdentitySerializer
}
SignerSupport implements the needed support for LocalSigner