import "github.com/hyperledger/fabric/common/crypto"
const ( // NonceSize is the default NonceSize NonceSize = 24 )
ExpiresAt returns when the given identity expires, or a zero time.Time in case we cannot determine that
GetRandomBytes returns len random looking bytes
GetRandomNonce returns a random byte array of length NonceSize
func TrackExpiration(tls bool, serverCert []byte, clientCertChain [][]byte, sIDBytes []byte, warn WarnFunc, now time.Time, s Scheduler)
TrackExpiration warns a week before one of the certificates expires
Scheduler invokes f after d time, and can be replaced with time.AfterFunc.
WarnFunc notifies a warning happened with the given format, and can be replaced with Warnf of a logger.
Path | Synopsis |
---|---|
tlsgen |
Package crypto imports 7 packages (graph) and is imported by 89 packages. Updated 2019-11-20. Refresh now. Tools for package owners.