summaryrefslogtreecommitdiff
path: root/security/cyrus-sasl2
diff options
context:
space:
mode:
authorrecht <recht@pkgsrc.org>2003-08-16 09:06:41 +0000
committerrecht <recht@pkgsrc.org>2003-08-16 09:06:41 +0000
commita4ec41985a8bd855d3baa50bbb63a9513a575df6 (patch)
tree6b18a9b462eb387d0a54dc6293ae480238390f18 /security/cyrus-sasl2
parentac0258dd3cb43d7851d44bde98ed32c1e22ff6d2 (diff)
downloadpkgsrc-a4ec41985a8bd855d3baa50bbb63a9513a575df6.tar.gz
Update to 2.1.15.
changes: Fix build on NetBSD-current with OpenSSL 0.9.7. New in 2.1.15 ------------- * Fix a number of build issues * Add a doc/components.html that hopefully describes how things interact better. New in 2.1.14 ------------- * OS X 10.2 support * Support for the Sun SEAM GSSAPI implementation * Support for MySQL 4 * A number of build fixes * Other minor bugfixes OK'ed by chris@
Diffstat (limited to 'security/cyrus-sasl2')
-rw-r--r--security/cyrus-sasl2/Makefile6
-rw-r--r--security/cyrus-sasl2/Makefile.common4
-rw-r--r--security/cyrus-sasl2/PLIST.common19
-rw-r--r--security/cyrus-sasl2/PLIST.krb54
-rw-r--r--security/cyrus-sasl2/PLIST.plugins14
-rw-r--r--security/cyrus-sasl2/distinfo14
-rw-r--r--security/cyrus-sasl2/patches/patch-aa16
-rw-r--r--security/cyrus-sasl2/patches/patch-ac25
-rw-r--r--security/cyrus-sasl2/patches/patch-ad8
-rw-r--r--security/cyrus-sasl2/patches/patch-ai60
-rw-r--r--security/cyrus-sasl2/patches/patch-as198
11 files changed, 251 insertions, 117 deletions
diff --git a/security/cyrus-sasl2/Makefile b/security/cyrus-sasl2/Makefile
index f7d60cb0b36..29a9a70c3b0 100644
--- a/security/cyrus-sasl2/Makefile
+++ b/security/cyrus-sasl2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2003/03/19 22:25:05 jlam Exp $
+# $NetBSD: Makefile,v 1.11 2003/08/16 09:06:41 recht Exp $
.include "Makefile.common"
@@ -18,6 +18,10 @@ CONFIGURE_ARGS+= --with-rc4
CONFIGURE_ARGS+= --with-openssl=${SSLBASE}
.include "../../security/openssl/buildlink2.mk"
+.if exists(/dev/urandom)
+CONFIGURE_ARGS+= --with-devrandom=/dev/urandom
+.endif
+
# saslauthd needs to find libraries for different authentication mechanisms.
.if defined(USE_PAM)
. include "../../security/PAM/buildlink2.mk"
diff --git a/security/cyrus-sasl2/Makefile.common b/security/cyrus-sasl2/Makefile.common
index ff4d2e27ba8..13258fb8fd9 100644
--- a/security/cyrus-sasl2/Makefile.common
+++ b/security/cyrus-sasl2/Makefile.common
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile.common,v 1.4 2003/07/17 22:52:53 grant Exp $
+# $NetBSD: Makefile.common,v 1.5 2003/08/16 09:06:41 recht Exp $
#
# This Makefile fragment should be included _below_ and SASL_PLUGIN
# definition and _above_ any CONFIGURE_ARGS definitions.
-DISTNAME= cyrus-sasl-2.1.13
+DISTNAME= cyrus-sasl-2.1.15
CATEGORIES= security
MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \
ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/sasl/
diff --git a/security/cyrus-sasl2/PLIST.common b/security/cyrus-sasl2/PLIST.common
index 69ffae14982..4001b3b7953 100644
--- a/security/cyrus-sasl2/PLIST.common
+++ b/security/cyrus-sasl2/PLIST.common
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST.common,v 1.8 2003/05/26 06:53:07 martti Exp $
+@comment $NetBSD: PLIST.common,v 1.9 2003/08/16 09:06:41 recht Exp $
etc/rc.d/saslauthd
include/sasl/hmac-md5.h
include/sasl/md5.h
@@ -11,7 +11,7 @@ lib/libsasl2.a
lib/libsasl2.la
lib/libsasl2.so
lib/libsasl2.so.2
-lib/libsasl2.so.2.13
+lib/libsasl2.so.2.15
man/cat8/saslauthd.8
man/man3/sasl.3
man/man3/sasl_authorize_t.3
@@ -55,18 +55,21 @@ man/man3/sasl_setpass.3
man/man3/sasl_setprop.3
man/man3/sasl_user_exists.3
man/man3/sasl_verifyfile_t.3
+man/man8/sasldblistusers2.8
+man/man8/saslpasswd2.8
sbin/saslauthd
sbin/sasldblistusers2
sbin/saslpasswd2
share/doc/html/cyrus-sasl/advanced.html
share/doc/html/cyrus-sasl/appconvert.html
-share/doc/html/cyrus-sasl/draft-burdis-cat-srp-sasl-06.txt
+share/doc/html/cyrus-sasl/draft-burdis-cat-srp-sasl-08.txt
share/doc/html/cyrus-sasl/draft-ietf-cat-sasl-gssapi-05.txt
-share/doc/html/cyrus-sasl/draft-ietf-sasl-anon-00.txt
-share/doc/html/cyrus-sasl/draft-ietf-sasl-plain-00.txt
-share/doc/html/cyrus-sasl/draft-ietf-sasl-rfc2831bis-00.txt
-share/doc/html/cyrus-sasl/draft-myers-saslrev-02.txt
-share/doc/html/cyrus-sasl/draft-nerenberg-sasl-crammd5-03.txt
+share/doc/html/cyrus-sasl/draft-ietf-sasl-anon-02.txt
+share/doc/html/cyrus-sasl/draft-ietf-sasl-crammd5-00.txt
+share/doc/html/cyrus-sasl/draft-ietf-sasl-plain-02.txt
+share/doc/html/cyrus-sasl/draft-ietf-sasl-rfc2222bis-01.txt
+share/doc/html/cyrus-sasl/draft-ietf-sasl-rfc2831bis-02.txt
+share/doc/html/cyrus-sasl/draft-ietf-sasl-saslprep-03.txt
share/doc/html/cyrus-sasl/draft-newman-sasl-c-api-01.txt
share/doc/html/cyrus-sasl/draft-sasl-login.txt
share/doc/html/cyrus-sasl/gssapi.html
diff --git a/security/cyrus-sasl2/PLIST.krb5 b/security/cyrus-sasl2/PLIST.krb5
index fcd4fa1b00d..8211b507010 100644
--- a/security/cyrus-sasl2/PLIST.krb5
+++ b/security/cyrus-sasl2/PLIST.krb5
@@ -1,6 +1,6 @@
-@comment $NetBSD: PLIST.krb5,v 1.5 2003/05/26 06:53:08 martti Exp $
+@comment $NetBSD: PLIST.krb5,v 1.6 2003/08/16 09:06:41 recht Exp $
lib/sasl2/libgssapiv2.a
lib/sasl2/libgssapiv2.la
lib/sasl2/libgssapiv2.so
lib/sasl2/libgssapiv2.so.2
-lib/sasl2/libgssapiv2.so.2.13
+lib/sasl2/libgssapiv2.so.2.15
diff --git a/security/cyrus-sasl2/PLIST.plugins b/security/cyrus-sasl2/PLIST.plugins
index 12fbda83495..db3bbe18507 100644
--- a/security/cyrus-sasl2/PLIST.plugins
+++ b/security/cyrus-sasl2/PLIST.plugins
@@ -1,31 +1,31 @@
-@comment $NetBSD: PLIST.plugins,v 1.4 2003/05/26 06:53:08 martti Exp $
+@comment $NetBSD: PLIST.plugins,v 1.5 2003/08/16 09:06:41 recht Exp $
lib/sasl2/libanonymous.a
lib/sasl2/libanonymous.la
lib/sasl2/libanonymous.so
lib/sasl2/libanonymous.so.2
-lib/sasl2/libanonymous.so.2.13
+lib/sasl2/libanonymous.so.2.15
lib/sasl2/libcrammd5.a
lib/sasl2/libcrammd5.la
lib/sasl2/libcrammd5.so
lib/sasl2/libcrammd5.so.2
-lib/sasl2/libcrammd5.so.2.13
+lib/sasl2/libcrammd5.so.2.15
lib/sasl2/libdigestmd5.a
lib/sasl2/libdigestmd5.la
lib/sasl2/libdigestmd5.so
lib/sasl2/libdigestmd5.so.2
-lib/sasl2/libdigestmd5.so.2.13
+lib/sasl2/libdigestmd5.so.2.15
lib/sasl2/libotp.a
lib/sasl2/libotp.la
lib/sasl2/libotp.so
lib/sasl2/libotp.so.2
-lib/sasl2/libotp.so.2.13
+lib/sasl2/libotp.so.2.15
lib/sasl2/libplain.a
lib/sasl2/libplain.la
lib/sasl2/libplain.so
lib/sasl2/libplain.so.2
-lib/sasl2/libplain.so.2.13
+lib/sasl2/libplain.so.2.15
lib/sasl2/libsasldb.a
lib/sasl2/libsasldb.la
lib/sasl2/libsasldb.so
lib/sasl2/libsasldb.so.2
-lib/sasl2/libsasldb.so.2.13
+lib/sasl2/libsasldb.so.2.15
diff --git a/security/cyrus-sasl2/distinfo b/security/cyrus-sasl2/distinfo
index 4621db56757..e68b9a9c59a 100644
--- a/security/cyrus-sasl2/distinfo
+++ b/security/cyrus-sasl2/distinfo
@@ -1,12 +1,12 @@
-$NetBSD: distinfo,v 1.6 2003/05/26 06:53:08 martti Exp $
+$NetBSD: distinfo,v 1.7 2003/08/16 09:06:41 recht Exp $
-SHA1 (cyrus-sasl-2.1.13.tar.gz) = fccd1650b5b540380c4c5f87c6de76633a30bdca
-Size (cyrus-sasl-2.1.13.tar.gz) = 1367992 bytes
-SHA1 (patch-aa) = 61aaff78b38b5fa27cd210bb75f95dc9e62ee6fa
-SHA1 (patch-ac) = 14cb581d5a72886bef53424190257edb301fed73
-SHA1 (patch-ad) = 1811fd87ccee6de8a151e8e684344e6f3a7a8830
+SHA1 (cyrus-sasl-2.1.15.tar.gz) = 747101ffec482ca566f00a9d34124ec8e79f6589
+Size (cyrus-sasl-2.1.15.tar.gz) = 1390131 bytes
+SHA1 (patch-aa) = f5a772976839388078a26f287844ba35bdf1a3b7
+SHA1 (patch-ad) = 808255d61cb9340fc500a12f74a91d9c8dceda4c
SHA1 (patch-ae) = cfd176eea2e1dba320be14a7d9bf2a4426ba39ad
SHA1 (patch-af) = 2b4dc8b7871ee17101f618aaa955826d1c161954
SHA1 (patch-ah) = 50ff4e8ec0f4232bd8c2121b105d4818b978b950
-SHA1 (patch-ai) = c16575830080e5a63e48daee12a1468ef7d1ce9a
+SHA1 (patch-ai) = 687bc372ef32af473668b63d465dc59a73700181
SHA1 (patch-aj) = e841641a92dacd0f38fc0f86391b54b394e5a54c
+SHA1 (patch-as) = c8d35da93afe8be5e535b88681b23b169e813c02
diff --git a/security/cyrus-sasl2/patches/patch-aa b/security/cyrus-sasl2/patches/patch-aa
index b2af04e3fca..4b78563b01a 100644
--- a/security/cyrus-sasl2/patches/patch-aa
+++ b/security/cyrus-sasl2/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.3 2003/05/26 06:53:09 martti Exp $
+$NetBSD: patch-aa,v 1.4 2003/08/16 09:06:42 recht Exp $
---- configure.in.orig 2003-04-14 20:59:44.000000000 +0300
-+++ configure.in 2003-05-21 09:11:03.000000000 +0300
+--- configure.in.orig 2003-07-15 17:39:21.000000000 +0200
++++ configure.in 2003-07-26 12:28:18.000000000 +0200
@@ -114,6 +114,13 @@
dnl ltconfig might not have found support for shared libs
@@ -16,13 +16,3 @@ $NetBSD: patch-aa,v 1.3 2003/05/26 06:53:09 martti Exp $
if test "$ac_cv_can_build_shared" = no; then
enable_shared=no
enable_static=yes
-@@ -805,6 +812,9 @@
- AC_SUBST(LIBOBJS)
- AC_SUBST(LTLIBOBJS)
-
-+dnl Check for /dev/urandom
-+AC_CHECK_FILE(/dev/urandom, AC_DEFINE_UNQUOTED(SASL_DEV_RANDOM, "/dev/urandom"))
-+
- AC_C_CONST
- AC_C_INLINE
- AC_TYPE_MODE_T
diff --git a/security/cyrus-sasl2/patches/patch-ac b/security/cyrus-sasl2/patches/patch-ac
deleted file mode 100644
index 270b6e29e17..00000000000
--- a/security/cyrus-sasl2/patches/patch-ac
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2003/05/26 06:53:09 martti Exp $
-
---- acconfig.h.orig 2003-02-13 21:55:48.000000000 +0200
-+++ acconfig.h 2003-05-21 09:11:26.000000000 +0300
-@@ -205,6 +205,9 @@
- /* do we use doors for IPC? */
- #undef USE_DOORS
-
-+/* location of the random number generator */
-+#undef SASL_DEV_RANDOM
-+
- @BOTTOM@
-
- /* Create a struct iovec if we need one */
-@@ -220,7 +223,9 @@
- #endif
-
- /* location of the random number generator */
--#ifndef DEV_RANDOM
-+#ifdef SASL_DEV_RANDOM
-+#define DEV_RANDOM SASL_DEV_RANDOM
-+#else
- #define DEV_RANDOM "/dev/random"
- #endif
-
diff --git a/security/cyrus-sasl2/patches/patch-ad b/security/cyrus-sasl2/patches/patch-ad
index 8c2ce98030d..a7103e40963 100644
--- a/security/cyrus-sasl2/patches/patch-ad
+++ b/security/cyrus-sasl2/patches/patch-ad
@@ -1,7 +1,7 @@
-$NetBSD: patch-ad,v 1.1.1.1 2002/10/27 15:09:00 chris Exp $
+$NetBSD: patch-ad,v 1.2 2003/08/16 09:06:42 recht Exp $
---- include/hmac-md5.h.orig Sun Oct 27 14:14:03 2002
-+++ include/hmac-md5.h Sun Oct 27 14:14:14 2002
+--- include/hmac-md5.h.orig 2003-05-13 23:34:28.000000000 +0200
++++ include/hmac-md5.h 2003-07-26 12:24:25.000000000 +0200
@@ -15,8 +15,8 @@
* values stored in network byte order (Big Endian)
*/
@@ -12,4 +12,4 @@ $NetBSD: patch-ad,v 1.1.1.1 2002/10/27 15:09:00 chris Exp $
+ uint32_t ostate[4];
} HMAC_MD5_STATE;
- /* One step hmac computation
+ #ifdef __cplusplus
diff --git a/security/cyrus-sasl2/patches/patch-ai b/security/cyrus-sasl2/patches/patch-ai
index 4924a030879..b4f38f4e5f7 100644
--- a/security/cyrus-sasl2/patches/patch-ai
+++ b/security/cyrus-sasl2/patches/patch-ai
@@ -1,8 +1,8 @@
-$NetBSD: patch-ai,v 1.3 2003/05/26 06:53:09 martti Exp $
+$NetBSD: patch-ai,v 1.4 2003/08/16 09:06:42 recht Exp $
---- configure.orig 2003-04-14 21:07:48.000000000 +0300
-+++ configure 2003-05-21 10:00:35.000000000 +0300
-@@ -673,6 +673,7 @@
+--- configure.orig 2003-07-15 17:42:27.000000000 +0200
++++ configure 2003-07-26 12:21:14.000000000 +0200
+@@ -675,6 +675,7 @@
echo "$ac_t""$host" 1>&6
@@ -10,12 +10,12 @@ $NetBSD: patch-ai,v 1.3 2003/05/26 06:53:09 martti Exp $
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
-@@ -840,16 +841,16 @@
+@@ -842,29 +843,29 @@
missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
--echo "configure:845: checking for working aclocal" >&5
+-echo "configure:847: checking for working aclocal" >&5
+echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
+echo "configure:846: checking for working aclocal-${am__api_version}" >&5
# Run test in a subshell; some versions of sh will print an error if
@@ -32,29 +32,25 @@ $NetBSD: patch-ai,v 1.3 2003/05/26 06:53:09 martti Exp $
echo "$ac_t""missing" 1>&6
fi
-@@ -866,16 +867,16 @@
- echo "$ac_t""missing" 1>&6
- fi
-
--echo $ac_n "checking for working automake""... $ac_c" 1>&6
--echo "configure:871: checking for working automake" >&5
+-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+-echo "configure:860: checking for working autoconf" >&5
+echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
+echo "configure:872: checking for working automake-${am__api_version}" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
--if (automake --version) < /dev/null > /dev/null 2>&1; then
-- AUTOMAKE=automake
+-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+- AUTOCONF=autoconf
+if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake-${am__api_version}
echo "$ac_t""found" 1>&6
else
-- AUTOMAKE="$missing_dir/missing automake"
+- AUTOCONF="$missing_dir/missing autoconf"
+ AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
echo "$ac_t""missing" 1>&6
fi
-@@ -1949,6 +1950,13 @@
+@@ -1951,6 +1952,13 @@
target=$save_target
@@ -68,35 +64,3 @@ $NetBSD: patch-ai,v 1.3 2003/05/26 06:53:09 martti Exp $
if test "$ac_cv_can_build_shared" = no; then
enable_shared=no
enable_static=yes
-@@ -6828,6 +6836,31 @@
-
-
-
-+echo "$as_me:$LINENO: checking for /dev/urandom" >&5
-+echo $ECHO_N "checking for /dev/urandom... $ECHO_C" >&6
-+if test "${ac_cv_file__dev_urandom+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ test "$cross_compiling" = yes &&
-+ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-+ { (exit 1); exit 1; }; }
-+if test -r "/dev/urandom"; then
-+ ac_cv_file__dev_urandom=yes
-+else
-+ ac_cv_file__dev_urandom=no
-+fi
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_file__dev_urandom" >&5
-+echo "${ECHO_T}$ac_cv_file__dev_urandom" >&6
-+if test $ac_cv_file__dev_urandom = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define SASL_DEV_RANDOM "/dev/urandom"
-+_ACEOF
-+
-+fi
-+
-+
- echo $ac_n "checking for working const""... $ac_c" 1>&6
- echo "configure:6833: checking for working const" >&5
- if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
diff --git a/security/cyrus-sasl2/patches/patch-as b/security/cyrus-sasl2/patches/patch-as
new file mode 100644
index 00000000000..b4b96264065
--- /dev/null
+++ b/security/cyrus-sasl2/patches/patch-as
@@ -0,0 +1,198 @@
+$NetBSD: patch-as,v 1.1 2003/08/16 09:06:42 recht Exp $
+
+--- plugins/digestmd5.c.orig 2003-08-14 13:15:30.000000000 +0200
++++ plugins/digestmd5.c 2003-08-14 13:41:39.000000000 +0200
+@@ -59,6 +59,7 @@
+ /* DES support */
+ #ifdef WITH_DES
+ # ifdef WITH_SSL_DES
++# include <openssl/opensslv.h>
+ # include <openssl/des.h>
+ # else /* system DES library */
+ # include <des.h>
+@@ -655,9 +656,15 @@
+
+ #ifdef WITH_DES
+ struct des_context_s {
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ DES_key_schedule keysched; /* key schedule for des initialization */
++ DES_cblock ivec; /* initial vector for encoding */
++ DES_key_schedule keysched2; /* key schedule for 3des initialization */
++#else
+ des_key_schedule keysched; /* key schedule for des initialization */
+ des_cblock ivec; /* initial vector for encoding */
+ des_key_schedule keysched2; /* key schedule for 3des initialization */
++#endif
+ };
+
+ typedef struct des_context_s des_context_t;
+@@ -692,6 +699,15 @@
+ des_context_t *c = (des_context_t *) text->cipher_dec_context;
+ int padding, p;
+
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ DES_ede2_cbc_encrypt((void *) input,
++ (void *) output,
++ inputlen,
++ &c->keysched,
++ &c->keysched2,
++ &c->ivec,
++ DES_DECRYPT);
++#else
+ des_ede2_cbc_encrypt((void *) input,
+ (void *) output,
+ inputlen,
+@@ -699,7 +715,7 @@
+ c->keysched2,
+ &c->ivec,
+ DES_DECRYPT);
+-
++#endif
+ /* now chop off the padding */
+ padding = output[inputlen - 11];
+ if (padding < 1 || padding > 8) {
+@@ -743,6 +759,15 @@
+
+ len=inputlen+paddinglen+10;
+
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ DES_ede2_cbc_encrypt((void *) output,
++ (void *) output,
++ len,
++ &c->keysched,
++ &c->keysched2,
++ &c->ivec,
++ DES_ENCRYPT);
++#else
+ des_ede2_cbc_encrypt((void *) output,
+ (void *) output,
+ len,
+@@ -750,7 +775,7 @@
+ c->keysched2,
+ &c->ivec,
+ DES_ENCRYPT);
+-
++#endif
+ *outputlen=len;
+
+ return SASL_OK;
+@@ -769,12 +794,23 @@
+
+ /* setup enc context */
+ slidebits(keybuf, enckey);
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ if (DES_key_sched((DES_cblock *) keybuf, &c->keysched) < 0)
++ return SASL_FAIL;
++#else
+ if (des_key_sched((des_cblock *) keybuf, c->keysched) < 0)
+ return SASL_FAIL;
++#endif
+
+ slidebits(keybuf, enckey + 7);
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ if (DES_key_sched((DES_cblock *) keybuf, &c->keysched2) < 0)
++ return SASL_FAIL;
++#else
+ if (des_key_sched((des_cblock *) keybuf, c->keysched2) < 0)
+ return SASL_FAIL;
++#endif
++
+ memcpy(c->ivec, ((char *) enckey) + 8, 8);
+
+ text->cipher_enc_context = (cipher_context_t *) c;
+@@ -782,13 +818,23 @@
+ /* setup dec context */
+ c++;
+ slidebits(keybuf, deckey);
++
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ if (DES_key_sched((DES_cblock *) keybuf, &c->keysched) < 0)
++ return SASL_FAIL;
++#else
+ if (des_key_sched((des_cblock *) keybuf, c->keysched) < 0)
+ return SASL_FAIL;
+-
++#endif
+ slidebits(keybuf, deckey + 7);
++
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ if (DES_key_sched((DES_cblock *) keybuf, &c->keysched2) < 0)
++ return SASL_FAIL;
++#else
+ if (des_key_sched((des_cblock *) keybuf, c->keysched2) < 0)
+ return SASL_FAIL;
+-
++#endif
+ memcpy(c->ivec, ((char *) deckey) + 8, 8);
+
+ text->cipher_dec_context = (cipher_context_t *) c;
+@@ -813,12 +859,21 @@
+ des_context_t *c = (des_context_t *) text->cipher_dec_context;
+ int p, padding = 0;
+
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ DES_cbc_encrypt((void *) input,
++ (void *) output,
++ inputlen,
++ &c->keysched,
++ &c->ivec,
++ DES_DECRYPT);
++#else
+ des_cbc_encrypt((void *) input,
+ (void *) output,
+ inputlen,
+ c->keysched,
+ &c->ivec,
+ DES_DECRYPT);
++#endif
+
+ /* Update the ivec (des_cbc_encrypt implementations tend to be broken in
+ this way) */
+@@ -867,12 +922,21 @@
+
+ len = inputlen + paddinglen + 10;
+
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ DES_cbc_encrypt((void *) output,
++ (void *) output,
++ len,
++ &c->keysched,
++ &c->ivec,
++ DES_ENCRYPT);
++#else
+ des_cbc_encrypt((void *) output,
+ (void *) output,
+ len,
+ c->keysched,
+ &c->ivec,
+ DES_ENCRYPT);
++#endif
+
+ /* Update the ivec (des_cbc_encrypt implementations tend to be broken in
+ this way) */
+@@ -896,7 +960,12 @@
+
+ /* setup enc context */
+ slidebits(keybuf, enckey);
++
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ DES_key_sched((DES_cblock *) keybuf, &c->keysched);
++#else
+ des_key_sched((des_cblock *) keybuf, c->keysched);
++#endif
+
+ memcpy(c->ivec, ((char *) enckey) + 8, 8);
+
+@@ -905,8 +974,11 @@
+ /* setup dec context */
+ c++;
+ slidebits(keybuf, deckey);
++#if OPENSSL_VERSION_NUMBER >= 0x0090700f
++ DES_key_sched((DES_cblock *) keybuf, &c->keysched);
++#else
+ des_key_sched((des_cblock *) keybuf, c->keysched);
+-
++#endif
+ memcpy(c->ivec, ((char *) deckey) + 8, 8);
+
+ text->cipher_dec_context = (cipher_context_t *) c;