[packages/conserver] - rel 4; fix openssl 1.1.1 build

arekm arekm at pld-linux.org
Thu Sep 20 10:21:56 CEST 2018


commit 596c637985e39be6b398e09f0dc0c5832f4c631f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Sep 20 10:21:50 2018 +0200

    - rel 4; fix openssl 1.1.1 build

 conserver.spec |  4 +++-
 openssl.patch  | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+), 1 deletion(-)
---
diff --git a/conserver.spec b/conserver.spec
index ec97942..e6d6612 100644
--- a/conserver.spec
+++ b/conserver.spec
@@ -4,7 +4,7 @@ Summary:	Console server
 Summary(pl.UTF-8):	Serwer konsoli
 Name:		conserver
 Version:	8.1.18
-Release:	3
+Release:	4
 License:	BSD-like
 Group:		Daemons
 Source0:	http://www.conserver.com/%{name}-%{version}.tar.gz
@@ -15,6 +15,7 @@ Source3:	%{name}.logrotate
 Source4:	%{name}.pam
 Source5:	%{name}.service
 Patch0:		%{name}-locks.patch
+Patch1:		openssl.patch
 URL:		http://www.conserver.com/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -46,6 +47,7 @@ podstawową funkcjonalność.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__aclocal}
diff --git a/openssl.patch b/openssl.patch
new file mode 100644
index 0000000..49ee7e8
--- /dev/null
+++ b/openssl.patch
@@ -0,0 +1,70 @@
+--- conserver-8.1.18/conserver/main.c~	2018-09-20 10:14:38.000000000 +0200
++++ conserver-8.1.18/conserver/main.c	2018-09-20 10:17:58.968897256 +0200
+@@ -108,12 +108,13 @@ GetDH512()
+ 	0x02,
+     };
+     DH *dh;
++    BIGNUM *dhp_bn, *dhg_bn;
+ 
+     if ((dh = DH_new()) == NULL)
+ 	return (NULL);
+-    dh->p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL);
+-    dh->g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL);
+-    if ((dh->p == NULL) || (dh->g == NULL)) {
++    dhp_bn = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL);
++    dhg_bn = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL);
++    if (dhp_bn == NULL || dhg_bn == NULL || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) {
+ 	DH_free(dh);
+ 	return (NULL);
+     }
+@@ -147,12 +147,13 @@ GetDH1024()
+ 	0x02,
+     };
+     DH *dh;
++    BIGNUM *dhp_bn, *dhg_bn;
+ 
+     if ((dh = DH_new()) == NULL)
+ 	return (NULL);
+-    dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
+-    dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
+-    if ((dh->p == NULL) || (dh->g == NULL)) {
++    dhp_bn = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
++    dhg_bn = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
++    if (dhp_bn == NULL || dhg_bn == NULL || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) {
+ 	DH_free(dh);
+ 	return (NULL);
+     }
+@@ -198,12 +199,13 @@ GetDH2048()
+ 	0x02,
+     };
+     DH *dh;
++    BIGNUM *dhp_bn, *dhg_bn;
+ 
+     if ((dh = DH_new()) == NULL)
+ 	return (NULL);
+-    dh->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
+-    dh->g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);
+-    if ((dh->p == NULL) || (dh->g == NULL)) {
++    dhp_bn = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
++    dhg_bn = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);
++    if (dhp_bn == NULL || dhg_bn == NULL || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) {
+ 	DH_free(dh);
+ 	return (NULL);
+     }
+@@ -275,12 +277,13 @@ GetDH4096()
+ 	0x02,
+     };
+     DH *dh;
++    BIGNUM *dhp_bn, *dhg_bn;
+ 
+     if ((dh = DH_new()) == NULL)
+ 	return (NULL);
+-    dh->p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), NULL);
+-    dh->g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), NULL);
+-    if ((dh->p == NULL) || (dh->g == NULL)) {
++    dhp_bn = BN_bin2bn(dh4096_p, sizeof(dh4096_p), NULL);
++    dhg_bn = BN_bin2bn(dh4096_g, sizeof(dh4096_g), NULL);
++    if (dhp_bn == NULL || dhg_bn == NULL || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn)) {
+ 	DH_free(dh);
+ 	return (NULL);
+     }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/conserver.git/commitdiff/596c637985e39be6b398e09f0dc0c5832f4c631f



More information about the pld-cvs-commit mailing list