sectokia has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

Does anyone know if there is a module to do the equivalent of:

openssl pkcs8 -in encrypted.private.key -out private.key

(the above prompts for the encryption password, and does the decryption)

Replies are listed 'Best First'.
Re: pkcs8 decrypt cpan module?
by hippo (Archbishop) on Mar 17, 2022 at 11:01 UTC

    Not directly, but Crypt::OpenSSL::CA::PrivateKey claims to be able to decrypt a private key given the passphrase, so that might be a possible starting point. I've not used this class so this isn't a recommendation - just the results of a quick search. HTH.


    🦛