x509

package
v2.0.0-...-d1367cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

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

func NewSignerFromFiles(keyPath, certPath string) (signature.Signer, error)

NewSignerFromFiles creates a signer from files

func NewVerifier

func NewVerifier(certs []*x509.Certificate, roots *x509.CertPool) (signature.Verifier, error)

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 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL