示例#1
0
文件: pkix.go 项目: jmcarbo/etcd-ca
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)
}
示例#2
0
文件: pkix.go 项目: jmcarbo/etcd-ca
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)
}