Documentation ¶
Index ¶
- Constants
- func NewSigner(key libtrust.PrivateKey, certs []*x509.Certificate) (signature.Signer, error)
- func NewSignerFromFiles(keyPath, certPath string) (signature.Signer, error)
- func NewVerifier(certs []*x509.Certificate, roots *x509.CertPool) (signature.Verifier, error)
- func ReadCertificateFile(path string) ([]*x509.Certificate, error)
- func ReadPrivateKeyFile(path string) (libtrust.PrivateKey, error)
- type Header
- type Parameters
Constants ¶
View Source
const Type = "x509"
Type indicates the signature type
Variables ¶
This section is empty.
Functions ¶
func NewSigner ¶
func NewSigner(key libtrust.PrivateKey, certs []*x509.Certificate) (signature.Signer, error)
NewSigner creates a signer
func NewSignerFromFiles ¶
NewSignerFromFiles creates a signer from files
func NewVerifier ¶
NewVerifier creates a verifier
func ReadCertificateFile ¶
func ReadCertificateFile(path string) ([]*x509.Certificate, error)
ReadCertificateFile reads a certificate PEM file
func ReadPrivateKeyFile ¶
func ReadPrivateKeyFile(path string) (libtrust.PrivateKey, error)
ReadPrivateKeyFile reads a key PEM file as a libtrust key
Types ¶
type Header ¶
type Header struct { signature.Header Parameters }
Header defines the signature header
type Parameters ¶
type Parameters struct { Algorithm string `json:"alg,omitempty"` KeyID string `json:"kid,omitempty"` X5c [][]byte `json:"x5c,omitempty"` }
Parameters defines the signature parameters
Click to show internal directories.
Click to hide internal directories.