pki

package
v1.3.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SupportedFormats added in v0.3.0

func SupportedFormats() []string

Types

type ArtifactFactory

type ArtifactFactory struct {
	// contains filtered or unexported fields
}

func NewArtifactFactory

func NewArtifactFactory(format Format) (*ArtifactFactory, error)

func (ArtifactFactory) NewPublicKey

func (a ArtifactFactory) NewPublicKey(r io.Reader) (PublicKey, error)

func (ArtifactFactory) NewSignature

func (a ArtifactFactory) NewSignature(r io.Reader) (Signature, error)

type Format added in v0.3.0

type Format string
const (
	PGP      Format = "pgp"
	Minisign Format = "minisign"
	SSH      Format = "ssh"
	X509     Format = "x509"
	PKCS7    Format = "pkcs7"
	Tuf      Format = "tuf"
)

type PublicKey

type PublicKey interface {
	CanonicalValue() ([]byte, error)
	// Deprecated: EmailAddresses() will be deprecated in favor of Subjects() which will
	// also return Subject URIs present in public keys.
	EmailAddresses() []string
	Subjects() []string
	// Identities returns a list of typed keys and certificates.
	Identities() ([]identity.Identity, error)
}

PublicKey Generic object representing a public key (regardless of format & algorithm)

type Signature

type Signature interface {
	CanonicalValue() ([]byte, error)
	Verify(r io.Reader, k interface{}, opts ...sigsig.VerifyOption) error
}

Signature Generic object representing a signature (regardless of format & algorithm)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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