certificate

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingFlag and ErrNoBackends are the spine's, re-exported so the two
	// commands share one declaration rather than a copy each.
	ErrMissingFlag = oprun.ErrMissingFlag
	ErrNoBackends  = oprun.ErrNoBackends

	// ErrUnsupportedCurve reports a key on a curve OpenPGP algorithm 18 does
	// not admit.
	ErrUnsupportedCurve = errors.New("unsupported curve")

	// ErrReproducibleNeedsTime means --reproducible was set without --signed-at.
	ErrReproducibleNeedsTime = errors.New("--reproducible requires --signed-at")
)
View Source
var ErrNoPublicKey = encryption.ErrNoPublicKey

ErrNoPublicKey means the chosen backend cannot expose the encryption key's public half, which a certificate must carry as its subkey.

The core's sentinel, re-exported, so this command wraps the same error a backend returns rather than declaring a parallel one with the same meaning — the drift the design review flagged as a class. errors.Is against either the core value or this one matches.

View Source
var ErrOutputOverInput = opdest.ErrOutputOverInput

ErrOutputOverInput means --output names a key file this run is reading.

Re-exported from opdest so `errors.Is(err, certificate.ErrOutputOverInput)` works for a caller holding this package, and so it is the SAME sentinel the decrypt command uses. Two independently declared errors with identical text is how the guard came to exist in one command and not the other.

Functions

func NewCmdCertificate

func NewCmdCertificate(props *props.Props) *setup.Command

func RunCertificate

func RunCertificate(ctx context.Context, p *props.Props, opts *CertificateOptions, _ []string) error

RunCertificate assembles a publishable OpenPGP certificate whose primary and encryption subkey are both held by a key service.

Both signatures are made remotely. No private key material exists in this process at any point.

Types

type CertificateOptions

type CertificateOptions struct {
	UserId         string
	CertifyKey     string
	EncryptKey     string
	Backend        string
	Created        string
	Armor          bool
	SignedAt       string
	Reproducible   bool
	Output         string
	FollowSymlinks bool
}

Jump to

Keyboard shortcuts

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