sypgp

package
v3.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package sypgp implements the openpgp integration into the singularity project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskQuestion

func AskQuestion(format string, a ...interface{}) (string, error)

AskQuestion prompts the user with a question and return the response

func AskQuestionNoEcho

func AskQuestionNoEcho(format string, a ...interface{}) (string, error)

AskQuestionNoEcho works like AskQuestion() except it doesn't echo user's input

func DecryptKey

func DecryptKey(k *openpgp.Entity) error

DecryptKey decrypts a private key provided a pass phrase

func DirPath

func DirPath() string

DirPath returns a string describing the path to the sypgp home folder

func EncryptKey

func EncryptKey(k *openpgp.Entity, pass string) (err error)

EncryptKey encrypts a private key using a pass phrase

func FetchPubkey

func FetchPubkey(fingerprint, keyserverURI, authToken string, noPrompt bool) (openpgp.EntityList, error)

FetchPubkey connects to a key server and requests a specific key

func GenKeyPair

func GenKeyPair() (entity *openpgp.Entity, err error)

GenKeyPair generates an OpenPGP key pair and store them in the sypgp home folder

func GetTokenFile

func GetTokenFile() string

GetTokenFile returns a string describing the path to the stored token file

func LoadPrivKeyring

func LoadPrivKeyring() (openpgp.EntityList, error)

LoadPrivKeyring loads the private keys from local store into an EntityList

func LoadPubKeyring

func LoadPubKeyring() (openpgp.EntityList, error)

LoadPubKeyring loads the public keys from local store into an EntityList

func PathsCheck

func PathsCheck() error

PathsCheck creates the sypgp home folder, secret and public keyring files

func PrintEntity

func PrintEntity(index int, e *openpgp.Entity)

PrintEntity pretty prints an entity entry

func PrintPrivKeyring

func PrintPrivKeyring() (err error)

PrintPrivKeyring prints the secret keyring read from the public local store

func PrintPubKeyring

func PrintPubKeyring() (err error)

PrintPubKeyring prints the public keyring read from the public local store

func PublicPath

func PublicPath() string

PublicPath returns a string describing the path to the public keys store

func PushPubkey

func PushPubkey(entity *openpgp.Entity, keyserverURI, authToken string) error

PushPubkey pushes a public key to a key server

func SearchPubkey

func SearchPubkey(search, keyserverURI, authToken string) (string, error)

SearchPubkey connects to a key server and searches for a specific key

func SecretPath

func SecretPath() string

SecretPath returns a string describing the path to the private keys store

func SelectPrivKey

func SelectPrivKey(el openpgp.EntityList) (*openpgp.Entity, error)

SelectPrivKey prints a secret key list to user and returns the choice

func SelectPubKey

func SelectPubKey(el openpgp.EntityList) (*openpgp.Entity, error)

SelectPubKey prints a public key list to user and returns the choice

func StorePrivKey

func StorePrivKey(e *openpgp.Entity) (err error)

StorePrivKey stores a private entity list into the local key cache

func StorePubKey

func StorePubKey(e *openpgp.Entity) (err error)

StorePubKey stores a public key entity list into the local key cache

Types

This section is empty.

Jump to

Keyboard shortcuts

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