Esempio n. 1
0
func GetEncryptedPrivateKeyHost(d Depot, name string, passphrase []byte) (key *pkix.Key, err error) {
	b, err := d.Get(HostPrivKeyTag(name))
	if err != nil {
		return nil, err
	}
	return pkix.NewKeyFromEncryptedPrivateKeyPEM(b, passphrase)
}
Esempio n. 2
0
func GetEncryptedPrivateKeyAuthority(d Depot, passphrase []byte) (key *pkix.Key, err error) {
	b, err := d.Get(AuthPrivKeyTag())
	if err != nil {
		return nil, err
	}
	return pkix.NewKeyFromEncryptedPrivateKeyPEM(b, passphrase)
}