Exemple #1
0
func PutEncryptedPrivateKeyHost(d Depot, name string, key *pkix.Key, passphrase []byte) error {
	b, err := key.ExportEncryptedPrivate(passphrase)
	if err != nil {
		return err
	}
	return d.Put(HostPrivKeyTag(name), b)
}
Exemple #2
0
func PutEncryptedPrivateKeyAuthority(d Depot, key *pkix.Key, passphrase []byte) error {
	b, err := key.ExportEncryptedPrivate(passphrase)
	if err != nil {
		return err
	}
	return d.Put(AuthPrivKeyTag(), b)
}