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) }
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) }
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) }
func PutPrivateKeyAuthority(d Depot, key *pkix.Key) error { b, err := key.ExportPrivate() if err != nil { return err } return d.Put(AuthPrivKeyTag(), b) }