pkcs8

package
v0.0.0-...-ddd9f4d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL