Bug 220136

Summary: security/p5-Crypt-OpenSSL-RSA: Additional functions
Product: Ports & Packages Reporter: onborodin
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Only Me CC: pi
Priority: --- Keywords: security
Version: LatestFlags: pi: maintainer-feedback+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch none

Description onborodin 2017-06-19 14:38:58 UTC
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/
Comment 1 Kurt Jaeger freebsd_committer 2017-06-19 18:07:08 UTC
testbuilds@work
Comment 2 commit-hook freebsd_committer 2017-06-19 18:15:01 UTC
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
Comment 3 Kurt Jaeger freebsd_committer 2017-06-19 18:15:24 UTC
Committed, thanks!
Comment 4 Kurt Jaeger freebsd_committer 2017-06-19 18:24:43 UTC
Patch was also sent upstream:

https://rt.cpan.org/Ticket/Display.html?id=122135