summaryrefslogtreecommitdiff
path: root/databases/openldap
diff options
context:
space:
mode:
authormanu <manu>2016-10-30 05:04:09 +0000
committermanu <manu>2016-10-30 05:04:09 +0000
commit2070ff2e6fc24fe116f84d38e9af609c6b60b3c6 (patch)
tree2faaaa3ae46d14326332e2674fa11724fd320559 /databases/openldap
parentdfeb4b1bbb03b5015f3164ef384f8118c6fffce5 (diff)
downloadpkgsrc-2070ff2e6fc24fe116f84d38e9af609c6b60b3c6.tar.gz
Use newer DES API so that smbk5pwd loads with newer OpenSSL
OpenSSL removed old DES API which used des_* functions. https://github.com/openssl/openssl/commit/24956ca00f014a917fb181a8abc39b349f3f316f In order to link with libcrypto from recent OpenSSL releases, we need to replace the older API des_* functions by the newer API DES_* functions. Submitted upstream as ITS#8525 http://www.openldap.org/its/index.cgi/Incoming?id=8525
Diffstat (limited to 'databases/openldap')
-rw-r--r--databases/openldap/distinfo3
-rw-r--r--databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c54
2 files changed, 56 insertions, 1 deletions
diff --git a/databases/openldap/distinfo b/databases/openldap/distinfo
index c83dcbdb770..f48dffcf017 100644
--- a/databases/openldap/distinfo
+++ b/databases/openldap/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.106 2016/06/17 14:01:58 jperkin Exp $
+$NetBSD: distinfo,v 1.107 2016/10/30 05:04:09 manu Exp $
SHA1 (openldap-2.4.44.tgz) = 016a738d050a68d388602a74b5e991035cdba149
RMD160 (openldap-2.4.44.tgz) = 6ea3139f630e93c6e0af60638672d88d6c535a6a
@@ -13,6 +13,7 @@ SHA1 (patch-aj) = 857bbf14855d7d2a2911457bc6373d8beb69b751
SHA1 (patch-am) = fb8f3e7699f8b2ef55c066cdc6216522c101c7f3
SHA1 (patch-an) = 3e904d05a3e69930259329ca821d3bbf7dd54eb2
SHA1 (patch-ao) = 4fcbbfd4d6be792392e3646123022aeaf25923e3
+SHA1 (patch-contrib_modules_smbk5pwd-smbk5pwd.c) = c31fc75f94778c93dfb20e7b7fc6ab8c74212942
SHA1 (patch-contrib_slapd-modules_cloak_Makefile) = 47c81def0c013a360acb549ed69e9042f0bc1be3
SHA1 (patch-contrib_slapd-modules_nops_Makefile) = c51bccf34c3f3112232a134038622d31b6315628
SHA1 (patch-contrib_slapd-modules_nops_slapo-nops.5) = f32352f19361b7e9aa5b038ae8578def7c08fa47
diff --git a/databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c b/databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c
new file mode 100644
index 00000000000..2e7f48928df
--- /dev/null
+++ b/databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c
@@ -0,0 +1,54 @@
+$NetBSD: patch-contrib_modules_smbk5pwd-smbk5pwd.c,v 1.1 2016/10/30 05:04:09 manu Exp $
+
+Submitted upstream as ITS#8525
+http://www.openldap.org/its/index.cgi/Incoming?id=8525
+
+From 1aad89bbdd1f58f3b2d794067cc8c4a60876f584 Mon Sep 17 00:00:00 2001
+From: Emmanuel Dreyfus <manu@netbsd.org>
+Date: Sun, 30 Oct 2016 05:34:58 +0100
+Subject: [PATCH] Use newer DES API so that smbk5pwd loads with newer OpenSSL
+
+OpenSSL removed old DES API which used des_* functions.
+https://github.com/openssl/openssl/commit/24956ca00f014a917fb181a8abc39b349f3f316f
+
+In order to link with libcrypto from recent OpenSSL releases, we need
+to replace the older API des_* functions by the newer API DES_* functions.
+
+Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
+---
+ contrib/slapd-modules/smbk5pwd/smbk5pwd.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git contrib/slapd-modules/smbk5pwd/smbk5pwd.c contrib/slapd-modules/smbk5pwd/smbk5pwd.c
+index bec5e1b..97e0055 100644
+--- contrib/slapd-modules/smbk5pwd/smbk5pwd.c
++++ contrib/slapd-modules/smbk5pwd/smbk5pwd.c
+@@ -154,7 +154,7 @@ static void lmPasswd_to_key(
+ k[7] = ((lpw[6]&0x7F)<<1);
+
+ #ifdef HAVE_OPENSSL
+- des_set_odd_parity( key );
++ DES_set_odd_parity( key );
+ #endif
+ }
+
+@@ -210,12 +210,12 @@ static void lmhash(
+ des_set_key( &ctx, key );
+ des_encrypt( &ctx, sizeof(key), hbuf[1], StdText );
+ #elif defined(HAVE_OPENSSL)
+- des_set_key_unchecked( &key, schedule );
+- des_ecb_encrypt( &StdText, &hbuf[0], schedule , DES_ENCRYPT );
++ DES_set_key_unchecked( &key, &schedule );
++ DES_ecb_encrypt( &StdText, &hbuf[0], &schedule , DES_ENCRYPT );
+
+ lmPasswd_to_key( &UcasePassword[7], &key );
+- des_set_key_unchecked( &key, schedule );
+- des_ecb_encrypt( &StdText, &hbuf[1], schedule , DES_ENCRYPT );
++ DES_set_key_unchecked( &key, &schedule );
++ DES_ecb_encrypt( &StdText, &hbuf[1], &schedule , DES_ENCRYPT );
+ #endif
+
+ hexify( (char *)hbuf, hash );
+--
+2.3.2
+