mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-11 02:51:18 +02:00
create bsd12 branch
This commit is contained in:
61
perl/p5-Crypt-OpenSSL-RSA/files/_patch-x-RSA.pm
Normal file
61
perl/p5-Crypt-OpenSSL-RSA/files/_patch-x-RSA.pm
Normal file
@@ -0,0 +1,61 @@
|
||||
--- ./RSA.pm.orig 2011-08-25 02:00:07.000000000 +0300
|
||||
+++ ./RSA.pm 2017-03-24 23:24:34.636751000 +0200
|
||||
@@ -14,8 +14,31 @@
|
||||
|
||||
bootstrap Crypt::OpenSSL::RSA $VERSION;
|
||||
|
||||
+sub new_private_key {
|
||||
+
|
||||
+ my ($self, $keystring, $passin) = @_;
|
||||
+
|
||||
+ if (length ($passin) > 0 ) {
|
||||
+ return $self->_new_enc_private_key($keystring, $passin);
|
||||
+ }
|
||||
+ return $self->_new_private_key($keystring);
|
||||
+}
|
||||
+
|
||||
+sub get_private_key_string {
|
||||
+
|
||||
+ my ($self, $passout, $cipher) = @_;
|
||||
+
|
||||
+ if (length ($passout) > 0 && length ($cipher) > 0) {
|
||||
+ return $self->_get_enc_private_key_string($passout, $cipher);
|
||||
+ } elsif (length $passout > 0) {
|
||||
+ return $self->_get_enc_private_key_string($passout, "aes-256-cbc");
|
||||
+ }
|
||||
+ return $self->_get_private_key_string();
|
||||
+}
|
||||
+
|
||||
BEGIN { eval { require Crypt::OpenSSL::Bignum; }; }
|
||||
|
||||
+
|
||||
1;
|
||||
|
||||
__END__
|
||||
@@ -96,7 +119,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
-=item new_private_key
|
||||
+=item new_private_key(privkey_string)
|
||||
+=cut
|
||||
+=item new_private_key(privkey_string, password)
|
||||
|
||||
Create a new Crypt::OpenSSL::RSA object by loading a private key in
|
||||
from an string containing the Base64/DER encoding of the PKCS1
|
||||
@@ -179,8 +204,14 @@
|
||||
and is the format that is produced by running C<openssl rsa -pubout>.
|
||||
|
||||
=item get_private_key_string
|
||||
+=cut
|
||||
+=item get_enc_private_key_string(password)
|
||||
+=cut
|
||||
+=item get_enc_private_key_string(password, cipher)
|
||||
|
||||
-Return the DER-encoded PKCS1 representation of the private key.
|
||||
+Return the unencripted or encripted DER-encoded PKCS1 representation
|
||||
+of the private key. For stoping of potential leak unencrypted private key
|
||||
+if cipher name is unknown will use DES3 (DES-EDE3) cipher.
|
||||
|
||||
=item encrypt
|
||||
|
||||
Reference in New Issue
Block a user