Documentation
¶
Overview ¶
Package pki handles PGP for pillar content
Index ¶
- Constants
- type Pki
- func (p *Pki) DecryptSecret(cipherText string) (plainText string, err error)
- func (p *Pki) EncryptSecret(plainText string) (string, error)
- func (p *Pki) ExpandTilde(path string) (string, error)
- func (p *Pki) GetKeyByID(keyring *openpgp.EntityList, id interface{}) *openpgp.Entity
- func (p *Pki) KeyUsedForEncryptedFile(file string) (string, error)
Constants ¶
View Source
const PGPHeader string = "-----BEGIN PGP MESSAGE-----"
PGPHeader header const
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pki ¶
type Pki struct {
PublicKey *openpgp.Entity
SecretKey *openpgp.Entity
PubRing *openpgp.EntityList
SecRing *openpgp.EntityList
PublicKeyRing string
SecretKeyRing string
PgpKeyName string
// contains filtered or unexported fields
}
Pki pki info
func (*Pki) DecryptSecret ¶
DecryptSecret returns decrypted cipherText
func (*Pki) EncryptSecret ¶
EncryptSecret returns encrypted plainText
func (*Pki) ExpandTilde ¶
ExpandTilde expands tilde paths and validates against directory traversal
func (*Pki) GetKeyByID ¶
func (p *Pki) GetKeyByID(keyring *openpgp.EntityList, id interface{}) *openpgp.Entity
GetKeyByID returns a keyring by the given ID
Click to show internal directories.
Click to hide internal directories.