Created attachment 183629 [details] patch I added - new_private_key(privkey_string) and new_private_key(privkey_string, password) a) Create and b) parse existed encrypted private RSA key from privkey_string - get_enc_private_key_string(password) - get_enc_private_key_string(password, cipher) Encrypt and return encrypted PEM PKCS coded RSA private key Already existing functionality of the package was not broken, as far as I can verify. I use this patch into web CA http://minica.unix7.org/
testbuilds@work
A commit references this bug: Author: pi Date: Mon Jun 19 18:14:55 UTC 2017 New revision: 443905 URL: https://svnweb.freebsd.org/changeset/ports/443905 Log: security/p5-Crypt-OpenSSL-RSA: add functions to work with private keys - new_private_key(privkey_string) Create encrypted private RSA key from privkey_string - new_private_key(privkey_string, password) parse existed encrypted private RSA key from privkey_string - get_enc_private_key_string(password) - get_enc_private_key_string(password, cipher) Encrypt and return encrypted PEM PKCS coded RSA private key PR: 220136 Submitted by: Borodin Oleg <onborodin@gmail.com> Changes: head/security/p5-Crypt-OpenSSL-RSA/Makefile head/security/p5-Crypt-OpenSSL-RSA/files/ head/security/p5-Crypt-OpenSSL-RSA/files/patch-RSA.pm head/security/p5-Crypt-OpenSSL-RSA/files/patch-RSA.xs head/security/p5-Crypt-OpenSSL-RSA/files/patch-t_rsa.t
Committed, thanks!
Patch was also sent upstream: https://rt.cpan.org/Ticket/Display.html?id=122135
Which was moved to https://github.com/toddr/Crypt-OpenSSL-RSA/issues/16