[packages/perl-Crypt-OpenSSL-CA] - openssl 1.1 fix
adwol
adwol at pld-linux.org
Fri Nov 16 16:07:11 CET 2018
commit 974a7543a1c042d49006425b972631e76478c6a0
Author: Adam Osuchowski <adwol at pld-linux.org>
Date: Fri Nov 16 15:32:48 2018 +0100
- openssl 1.1 fix
perl-Crypt-OpenSSL-CA-openssl111.patch | 50 ++++++++++++++++++++++++++++++++++
perl-Crypt-OpenSSL-CA.spec | 4 ++-
2 files changed, 53 insertions(+), 1 deletion(-)
---
diff --git a/perl-Crypt-OpenSSL-CA.spec b/perl-Crypt-OpenSSL-CA.spec
index 922f78a..c285e38 100644
--- a/perl-Crypt-OpenSSL-CA.spec
+++ b/perl-Crypt-OpenSSL-CA.spec
@@ -7,12 +7,13 @@
Summary: Crypt::OpenSSL::CA - The crypto parts of an X509v3 Certification Authority
Name: perl-Crypt-OpenSSL-CA
Version: 0.24
-Release: 1
+Release: 2
# same as perl
License: GPL v1+ or Artistic
Group: Development/Languages/Perl
Source0: http://www.cpan.org/modules/by-module/Crypt/%{pdir}-%{pnam}-%{version}.tar.gz
# Source0-md5: 0b290daa5b9287d603ebf5bb21ea4d78
+Patch0: %{name}-openssl111.patch
URL: http://search.cpan.org/dist/Crypt-OpenSSL-CA/
BuildRequires: perl-devel >= 1:5.8.0
BuildRequires: rpm-perlprov >= 4.1-13
@@ -57,6 +58,7 @@ been left out for maximum flexibility.
%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch0 -p1
%build
%{__perl} Build.PL \
diff --git a/perl-Crypt-OpenSSL-CA-openssl111.patch b/perl-Crypt-OpenSSL-CA-openssl111.patch
new file mode 100644
index 0000000..4825a57
--- /dev/null
+++ b/perl-Crypt-OpenSSL-CA-openssl111.patch
@@ -0,0 +1,50 @@
+diff -ruNp Crypt-OpenSSL-CA-0.24.orig/lib/Crypt/OpenSSL/CA.pm Crypt-OpenSSL-CA-0.24/lib/Crypt/OpenSSL/CA.pm
+--- Crypt-OpenSSL-CA-0.24.orig/lib/Crypt/OpenSSL/CA.pm 2016-01-03 21:29:16.000000000 +0100
++++ Crypt-OpenSSL-CA-0.24/lib/Crypt/OpenSSL/CA.pm 2018-11-16 15:29:35.096214322 +0100
+@@ -499,13 +499,13 @@ SV* to_PEM(SV* sv_self) {
+ if (! (mem = BIO_new(BIO_s_mem()))) {
+ croak("Cannot allocate BIO");
+ }
+- if (self->type == EVP_PKEY_RSA) {
+- printstatus = PEM_write_bio_RSA_PUBKEY(mem, self->pkey.rsa);
+- } else if (self->type == EVP_PKEY_DSA) {
+- printstatus = PEM_write_bio_DSA_PUBKEY(mem, self->pkey.dsa);
++ if (EVP_PKEY_id(self) == EVP_PKEY_RSA) {
++ printstatus = PEM_write_bio_RSA_PUBKEY(mem, EVP_PKEY_get0_RSA(self));
++ } else if (EVP_PKEY_id(self) == EVP_PKEY_DSA) {
++ printstatus = PEM_write_bio_DSA_PUBKEY(mem, EVP_PKEY_get0_DSA(self));
+ } else {
+ BIO_free(mem);
+- croak("Unknown public key type %d", self->type);
++ croak("Unknown public key type %d", EVP_PKEY_id(self));
+ }
+ printstatus = printstatus && ( BIO_write(mem, "\\0", 1) > 0 );
+ if (! printstatus) {
+@@ -540,13 +540,13 @@ SV* get_modulus(SV* sv_self) {
+ croak("Cannot allocate BIO");
+ }
+
+- if (self->type == EVP_PKEY_RSA) {
+- printstatus = BN_print(mem,self->pkey.rsa->n);
+- } else if (self->type == EVP_PKEY_DSA) {
+- printstatus = BN_print(mem,self->pkey.rsa->n);
++ if (EVP_PKEY_id(self) == EVP_PKEY_RSA) {
++ printstatus = BN_print(mem,RSA_get0_n(EVP_PKEY_get0_RSA(self)));
++ } else if (EVP_PKEY_id(self) == EVP_PKEY_DSA) {
++ printstatus = BN_print(mem,DSA_get0_p(EVP_PKEY_get0_DSA(self)));
+ } else {
+ BIO_free(mem);
+- croak("Unknown public key type %d", self->type);
++ croak("Unknown public key type %d", EVP_PKEY_id(self));
+ }
+
+ printstatus = printstatus && ( BIO_write(mem, "\\0", 1) > 0 );
+@@ -1263,7 +1263,7 @@ SV* new_freshestCRL(char* class, char* v
+ self = X509V3_EXT_nconf_nid
+ (config, &ctx, NID_crl_distribution_points, value);
+ if (!self) { sslcroak("X509V3_EXT_conf_nid failed"); }
+- self->object = OBJ_nid2obj(nid_freshest_crl);
++ X509_EXTENSION_set_object(self, OBJ_nid2obj(nid_freshest_crl));
+ return perl_wrap("${\__PACKAGE__}", self);
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Crypt-OpenSSL-CA.git/commitdiff/974a7543a1c042d49006425b972631e76478c6a0
More information about the pld-cvs-commit
mailing list