Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GPGGetPrivateKey ¶
func GPGGetPrivateKey(descs []ocispec.Descriptor, gpgClient GPGClient, gpgVault GPGVault, mustFindKey bool) (gpgPrivKeys [][]byte, gpgPrivKeysPwds [][]byte, err error)
GPGGetPrivateKey walks the list of layerInfos and tries to decrypt the wrapped symmetric keys. For this it determines whether a private key is in the GPGVault or on this system and prompts for the passwords for those that are available. If we do not find a private key on the system for getting to the symmetric key of a layer then an error is generated.
Types ¶
type GPGClient ¶
type GPGClient interface { ReadGPGPubRingFile() ([]byte, error) GetGPGPrivateKey(keyid uint64, passphrase string) ([]byte, error) GetSecretKeyDetails(keyid uint64) ([]byte, bool, error) GetKeyDetails(keyid uint64) ([]byte, bool, error) ResolveRecipients([]string) []string }
func NewGPGClient ¶
type GPGVault ¶
type GPGVault interface { // AddSecretKeyRingData adds a secret keyring via its raw byte array AddSecretKeyRingData(gpgSecretKeyRingData []byte) error // AddSecretKeyRingDataArray adds secret keyring via its raw byte arrays AddSecretKeyRingDataArray(gpgSecretKeyRingDataArray [][]byte) error // AddSecretKeyRingFiles adds secret keyrings given their filenames AddSecretKeyRingFiles(filenames []string) error // GetGPGPrivateKey gets the private key bytes of a keyid given a passphrase GetGPGPrivateKey(keyid uint64) ([]openpgp.Key, []byte) }
GPGVault defines an interface for wrapping multiple secret key rings
type GPGVersion ¶
type GPGVersion int
const ( GPGv2 GPGVersion = iota GPGv1 GPGVersionUndetermined )
func GuessGPGVersion ¶
func GuessGPGVersion() GPGVersion
Click to show internal directories.
Click to hide internal directories.