Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEncryptionAlgorithmNotPBES2 = errors.New("encryption algorithm is not PBES2")
View Source
var ErrUnsupportedKeyType = errors.New("unsupported key type")
Functions ¶
func UpgradeEncryptedKey ¶
func UpgradeEncryptedKey(encryptedPKCS8DERKey, passphrase string) (securelyEncryptedPKCS8DERKey string, err error)
UpgradeEncryptedKey eventually upgrades an encrypted key to a newer encryption if its encryption is too weak for Openvpn/Openssl. If the key is encrypted using DES-CBC, it is decrypted and re-encrypted using AES-256-CBC. Otherwise, the key is returned unmodified. Note this function only supports: - PKCS8 encrypted keys - RSA and ECDSA keys - DES-CBC, 3DES, AES-128-CBC, AES-192-CBC, AES-256-CBC, AES-128-GCM, AES-192-GCM and AES-256-GCM encryption algorithms.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.