Esempio n. 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)
}
Esempio n. 2
0
func PutPrivateKeyHost(d Depot, name string, key *pkix.Key) error {
	b, err := key.ExportPrivate()
	if err != nil {
		return err
	}
	return d.Put(HostPrivKeyTag(name), b)
}
Esempio n. 3
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)
}
Esempio n. 4
0
func PutPrivateKeyAuthority(d Depot, key *pkix.Key) error {
	b, err := key.ExportPrivate()
	if err != nil {
		return err
	}
	return d.Put(AuthPrivKeyTag(), b)
}