gpg

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Overview

Package gpg creates deterministic aggregate APT and RPM metadata signatures with a configured GnuPG home, key identity, and owner-only passphrase file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Path overrides the gpg executable. Empty resolves "gpg" from PATH.
	Path string
	// Home is the absolute GnuPG home containing the aggregate metadata key.
	Home string
	// KeyID selects the aggregate metadata signing key.
	KeyID string
	// PassphraseFile is the absolute owner-only file containing the key passphrase.
	PassphraseFile string
	// Environ is the child process environment. Nil inherits the parent.
	Environ []string
	// Stderr receives live GnuPG diagnostics. Nil discards them.
	Stderr io.Writer
}

Options configures a Signer.

type Signer

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

Signer creates deterministic aggregate APT and RPM OpenPGP signatures.

The passphrase is supplied by file path and never appears as an argument, environment value, returned error, or adapter output.

func New

func New(options Options) *Signer

New constructs a Signer. Configuration is validated when signing.

func (*Signer) ClearSign

func (s *Signer) ClearSign(ctx context.Context, request pkgrepo.SignRequest) error

ClearSign implements pkgrepo.Signer.

func (*Signer) DetachSign

func (s *Signer) DetachSign(ctx context.Context, request pkgrepo.SignRequest) error

DetachSign implements pkgrepo.Signer.

Directories

Path Synopsis
Package mocks provides generated OpenPGP signing test doubles.
Package mocks provides generated OpenPGP signing test doubles.

Jump to

Keyboard shortcuts

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