simplesigning

package
v5.30.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSigner

func NewSigner(opts ...Option) (*signer.Signer, error)

NewSigner returns a signature.Signer which creates “simple signing” signatures using the user’s default GPG configuration ($GNUPGHOME / ~/.gnupg).

The set of options must identify a key to sign with, probably using a WithKeyFingerprint.

The caller must call Close() on the returned Signer.

Types

type Option

type Option func(*simpleSigner) error

func WithKeyFingerprint

func WithKeyFingerprint(keyFingerprint string) Option

WithKeyFingerprint returns an Option for NewSigner, specifying a key to sign with, using the provided GPG key fingerprint.

func WithPassphrase

func WithPassphrase(passphrase string) Option

WithPassphrase returns an Option for NewSigner, specifying a passphrase for the private key. If this is not specified, the system may interactively prompt using a gpg-agent / pinentry.

Jump to

Keyboard shortcuts

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