Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer signs artifacts and generates COSE signatures.
func NewSigner ¶
NewSigner creates a signer with the recommended signing algorithm and a signing key bundled with a certificate chain.
func NewSignerWithCertificateChain ¶
func NewSignerWithCertificateChain(alg cose.Algorithm, key crypto.Signer, certChain []*x509.Certificate) (*Signer, error)
NewSignerWithCertificateChain creates a signer with the specified signing algorithm and a signing key bundled with a (partial) certificate chain.
type Verifier ¶
type Verifier struct {
// ResolveAlgorithm resolves the signing algorithm used to verify the
// signature according to the public key in the certificate chain.
// If not present, `AlgorithmFromKey` will be used to pick up a recommended
// algorithm.
ResolveAlgorithm func(interface{}) (cose.Algorithm, error)
// EnforceExpiryValidation enforces the verifier to verify the timestamp
// signature even if the certificate is valid.
// Reference: https://github.com/notaryproject/notaryproject/discussions/98
EnforceExpiryValidation bool
// VerifyOptions is the verify option to verify the certificate of the
// incoming signature.
// The `Intermediates` in the verify options will be ignored and
// re-contrusted using the certificates in the incoming signature.
// An empty list of `KeyUsages` in the verify options implies
// `ExtKeyUsageAny`.
VerifyOptions x509.VerifyOptions
// TSAVerifyOptions is the verify option to verify the fetched timestamp
// signature.
// The `Intermediates` in the verify options will be ignored and
// re-contrusted using the certificates in the fetched timestamp signature.
// An empty list of `KeyUsages` in the verify options implies
// `ExtKeyUsageTimeStamping`.
TSAVerifyOptions x509.VerifyOptions
}
Verifier verifies artifacts against COSE signatures.
func NewVerifier ¶
func NewVerifier() *Verifier
NewVerifier creates a verifier. Callers may be interested in options in the public field of the Verifier, especially VerifyOptions for setting up trusted certificates.
Click to show internal directories.
Click to hide internal directories.