sign

package
v0.0.0-...-320551d Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetachSign

func DetachSign(keyringPath, msg string, signer string) (string, string, error)

func EntityListToSlice

func EntityListToSlice(keyring openpgp.EntityList) []*openpgp.Entity

func FindSignerKey

func FindSignerKey(keyring openpgp.EntityList, signer string) *openpgp.Entity

func GetFirstIdentity

func GetFirstIdentity(signer *openpgp.Entity) *openpgp.Identity

func LoadKeyRing

func LoadKeyRing(keyringPath string) (openpgp.EntityList, error)

func MatchIdentity

func MatchIdentity(idt *openpgp.Identity, signer string) bool

Types

type Signer

type Signer struct {
	Email              string `json:"email,omitempty"`
	Name               string `json:"name,omitempty"`
	Comment            string `json:"comment,omitempty"`
	Uid                string `json:"uid,omitempty"`
	Country            string `json:"country,omitempty"`
	Organization       string `json:"organization,omitempty"`
	OrganizationalUnit string `json:"organizationalUnit,omitempty"`
	Locality           string `json:"locality,omitempty"`
	Province           string `json:"province,omitempty"`
	StreetAddress      string `json:"streetAddress,omitempty"`
	PostalCode         string `json:"postalCode,omitempty"`
	CommonName         string `json:"commonName,omitempty"`
	SerialNumber       string `json:"serialNumber,omitempty"`
}

func GetSignersFromEntityList

func GetSignersFromEntityList(keyring openpgp.EntityList) []*Signer

func NewSignerFromUserId

func NewSignerFromUserId(uid *packet.UserId) *Signer

func VerifySignature

func VerifySignature(keyringPath, msg, sig string) (bool, string, *Signer, error)

func (*Signer) EqualTo

func (s *Signer) EqualTo(s2 *Signer) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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