aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjohans <johans@FreeBSD.org>2015-03-10 03:45:00 +0800
committerjohans <johans@FreeBSD.org>2015-03-10 03:45:00 +0800
commit1de3308d8a2ab1cf874e1b508580c3b7e12b3183 (patch)
tree7d3833ac8467776794e814523fce769e0de01a2f
parente7cc3322c23e42c839afe0d91a6b0789ef81fef2 (diff)
downloadfreebsd-ports-gnome-1de3308d8a2ab1cf874e1b508580c3b7e12b3183.tar.gz
freebsd-ports-gnome-1de3308d8a2ab1cf874e1b508580c3b7e12b3183.tar.zst
freebsd-ports-gnome-1de3308d8a2ab1cf874e1b508580c3b7e12b3183.zip
security/pidentd uses deprecated des_ methods and types that were marked
deprecated by OpenSSL 0.9.7 and will be removed in OpenSSL 1.1.0. This patch replaces the des_ methods and types with their new DES_ counterparts. PR: 198364 Submitted by: Bernard Spil <spil.oss@gmail.com>
-rw-r--r--security/pidentd/Makefile2
-rw-r--r--security/pidentd/files/patch-src_idecrypt.c46
-rw-r--r--security/pidentd/files/patch-src_pides.c52
3 files changed, 99 insertions, 1 deletions
diff --git a/security/pidentd/Makefile b/security/pidentd/Makefile
index 341b84a8d911..80667891af20 100644
--- a/security/pidentd/Makefile
+++ b/security/pidentd/Makefile
@@ -3,7 +3,7 @@
PORTNAME= pidentd
PORTVERSION= 3.0.19
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security ipv6
MASTER_SITES= ftp://ftp.lysator.liu.se/pub/unix/ident/servers/ \
ftp://ftp.stack.nl/pub/users/johans/pidentd/
diff --git a/security/pidentd/files/patch-src_idecrypt.c b/security/pidentd/files/patch-src_idecrypt.c
new file mode 100644
index 000000000000..7d3d2624ebf1
--- /dev/null
+++ b/security/pidentd/files/patch-src_idecrypt.c
@@ -0,0 +1,46 @@
+--- src/idecrypt.c.orig 2015-02-28 20:14:56.633084000 +0100
++++ src/idecrypt.c 2015-02-28 20:19:20.661476344 +0100
+@@ -100,8 +100,8 @@
+ char buf1[40], buf2[40];
+ struct sockaddr_gen ip_local, ip_remote;
+ int keyfile_fd;
+- des_cblock key_bin;
+- des_key_schedule sched;
++ DES_cblock key_bin;
++ DES_key_schedule sched;
+ static char readable[256];
+
+
+@@ -118,8 +118,8 @@
+ while (read(keyfile_fd, keybuf, sizeof(keybuf)-1) == sizeof(keybuf)-1)
+ {
+ keybuf[sizeof(keybuf)-1] = '\0';
+- des_string_to_key(keybuf, &key_bin);
+- des_set_key(&key_bin, sched);
++ DES_string_to_key(keybuf, &key_bin);
++ DES_set_key(&key_bin, &sched);
+
+ count = (len == 32) ? 24 : 48;
+ for (i = 0, j = 0; i < count; i += 3, j += 4)
+@@ -131,15 +131,15 @@
+
+ count = (len == 32) ? 2 : 8;
+ for (i = count; i >= 0; i -= 2) {
+- des_ecb_encrypt((des_cblock *)&(r.longs[i+2]),
+- (des_cblock *)&(r.longs[i+2]),
+- sched, DES_DECRYPT);
++ DES_ecb_encrypt((DES_cblock *)&(r.longs[i+2]),
++ (DES_cblock *)&(r.longs[i+2]),
++ &sched, DES_DECRYPT);
+ r.longs[i+2] ^= r.longs[i ];
+ r.longs[i+3] ^= r.longs[i+1];
+ }
+- des_ecb_encrypt((des_cblock *)&(r.longs[0]),
+- (des_cblock *)&(r.longs[0]),
+- sched, DES_DECRYPT);
++ DES_ecb_encrypt((DES_cblock *)&(r.longs[0]),
++ (DES_cblock *)&(r.longs[0]),
++ &sched, DES_DECRYPT);
+
+ count = (len == 32) ? 6 : 12;
+ for (i = 1; i < count; i++)
diff --git a/security/pidentd/files/patch-src_pides.c b/security/pidentd/files/patch-src_pides.c
new file mode 100644
index 000000000000..d102e7053918
--- /dev/null
+++ b/security/pidentd/files/patch-src_pides.c
@@ -0,0 +1,52 @@
+--- src/pdes.c.orig 2015-02-28 20:14:56.633084000 +0100
++++ src/pdes.c 2015-02-28 20:17:14.869504878 +0100
+@@ -46,7 +46,7 @@
+
+
+
+-static des_key_schedule sched;
++static DES_key_schedule sched;
+
+
+
+@@ -55,7 +55,7 @@
+ {
+ char keybuf[1024+1];
+ int fd, res;
+- des_cblock key_bin;
++ DES_cblock key_bin;
+
+
+ if (keyfile == NULL)
+@@ -100,8 +100,8 @@
+ }
+
+ keybuf[sizeof(keybuf)-1] = '\0';
+- des_string_to_key(keybuf, &key_bin);
+- des_set_key(&key_bin, sched);
++ DES_string_to_key(keybuf, &key_bin);
++ DES_set_key(&key_bin, &sched);
+
+ return 0;
+ }
+@@ -162,16 +162,16 @@
+ for (i = 1; i < count; i++)
+ r.longs[0] ^= r.longs[i];
+
+- des_ecb_encrypt((des_cblock *)&(r.longs[0]), (des_cblock *)&(r.longs[0]),
+- sched, DES_ENCRYPT);
++ DES_ecb_encrypt((DES_cblock *)&(r.longs[0]), (DES_cblock *)&(r.longs[0]),
++ &sched, DES_ENCRYPT);
+
+ count = (family == AF_INET) ? 4 : 10;
+ for (i = 0; i < count; i += 2) {
+ r.longs[i+2] ^= r.longs[i ];
+ r.longs[i+3] ^= r.longs[i+1];
+
+- des_ecb_encrypt((des_cblock *)&(r.longs[i+2]),
+- (des_cblock *)&(r.longs[i+2]), sched, DES_ENCRYPT);
++ DES_ecb_encrypt((DES_cblock *)&(r.longs[i+2]),
++ (DES_cblock *)&(r.longs[i+2]), &sched, DES_ENCRYPT);
+ }
+
+ count = (family == AF_INET) ? 24 : 48;