From 3d8526372498bdbafb03c903ceb86616aeed6dee Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Dec 28 2010 15:15:17 +0000 Subject: Update bitlbee-des3-implement.patch (RHBZ #666022) * patch by Rick Zhou * also comment on the status of the upstreaming of patches. --- diff --git a/bitlbee-des3-implement.patch b/bitlbee-des3-implement.patch index 0f28204..e6a454c 100644 --- a/bitlbee-des3-implement.patch +++ b/bitlbee-des3-implement.patch @@ -1,18 +1,23 @@ diff -up bitlbee-3.0.1/configure.des3 bitlbee-3.0.1/configure ---- bitlbee-3.0.1/configure.des3 2010-12-26 12:32:50.633529951 +0100 -+++ bitlbee-3.0.1/configure 2010-12-26 12:35:08.136935747 +0100 -@@ -429,7 +429,7 @@ if [ "$ret" = "0" ]; then +--- bitlbee-3.0.1/configure.des3 2010-12-28 16:07:35.074260735 +0100 ++++ bitlbee-3.0.1/configure 2010-12-28 16:07:35.082260713 +0100 +@@ -429,10 +431,10 @@ if [ "$ret" = "0" ]; then exit 1 fi; -if [ "$msn" = "1" -a "$ssl" != "openssl" -a "$ssl" != "gnutls" ]; then +- # Needed for MSN only. OpenSSL exports nice cipher functions already, +if [ "$msn" = "1" -a "$ssl" != "openssl" -a "$ssl" != "gnutls" -a "$ssl" != "nss" ]; then - # Needed for MSN only. OpenSSL exports nice cipher functions already, ++ # Needed for MSN only. OpenSSL and NSS export nice cipher functions already, # in case of GnuTLS we should be able to use gcrypt. Otherwise, use - # built-in stuff. (Since right now those are the only two supported +- # built-in stuff. (Since right now those are the only two supported ++ # built-in stuff. (Since right now those are the only three supported + # SSL modules anyway, this is mostly unnecessary.) + echo 'DES=des.o' >> Makefile.settings + fi diff -up bitlbee-3.0.1/lib/ssl_nss.c.des3 bitlbee-3.0.1/lib/ssl_nss.c ---- bitlbee-3.0.1/lib/ssl_nss.c.des3 2010-12-26 12:33:01.402483929 +0100 -+++ bitlbee-3.0.1/lib/ssl_nss.c 2010-12-26 12:33:10.754443519 +0100 +--- bitlbee-3.0.1/lib/ssl_nss.c.des3 2010-12-28 16:07:35.077260726 +0100 ++++ bitlbee-3.0.1/lib/ssl_nss.c 2010-12-28 16:09:02.408014610 +0100 @@ -39,6 +39,7 @@ #include #include @@ -21,7 +26,7 @@ diff -up bitlbee-3.0.1/lib/ssl_nss.c.des3 bitlbee-3.0.1/lib/ssl_nss.c int ssl_errno = 0; -@@ -238,3 +239,94 @@ b_input_condition ssl_getdirection( void +@@ -238,3 +239,91 @@ b_input_condition ssl_getdirection( void /* Just in case someone calls us, let's return the most likely case: */ return B_EV_IO_READ; } @@ -30,7 +35,7 @@ diff -up bitlbee-3.0.1/lib/ssl_nss.c.des3 bitlbee-3.0.1/lib/ssl_nss.c + const unsigned char *input, size_t input_len, const unsigned char *iv, + unsigned char **res) +{ -+#define CIPHER_MECH CKM_DES3_CBC_PAD ++#define CIPHER_MECH CKM_DES3_CBC +#define MAX_OUTPUT_LEN 72 + + int len1; @@ -67,9 +72,6 @@ diff -up bitlbee-3.0.1/lib/ssl_nss.c.des3 bitlbee-3.0.1/lib/ssl_nss.c + goto out; + } + -+ PK11_FreeSlot(slot); -+ slot = NULL; -+ + ivItem.data = (unsigned char *) iv; + /* See msn_soap_passport_sso_handle_response in protocols/msn/soap.c */ + ivItem.len = 8; diff --git a/bitlbee.spec b/bitlbee.spec index 975b928..a994be1 100644 --- a/bitlbee.spec +++ b/bitlbee.spec @@ -1,21 +1,25 @@ Summary: IRC to other chat networks gateway Name: bitlbee Version: 3.0.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons URL: http://www.bitlbee.org/ Source0: http://get.bitlbee.org/src/%{name}-%{version}.tar.gz Source1: bitlbee.xinetd Source2: bitlbee-wrapper.h +# 64bit directories should go before 32bit ones. Patch0: bitlbee-syslibdirs.patch +# use install -p instead of plain install ... we should protect time stamps Patch1: bitlbee-installP.patch +# support for old glibc (EL-4, EL-5) which doesn't have ns_initparse and its friends Patch2: bitlbee-libresolv.patch # Fix for missing ssl_pending() function (upstream #368, RHBZ #665553) -Patch3: bitlbee-ssl_pending.patch -# Completion of NSS-based SSL implementation. Send upstream. +Patch3: bitlbee-ssl_pending.patch +# Completion of NSS-based SSL implementation. Sent upstream. #714 +# (combined with two tiny fixes from RHBZ #666022) Patch4: bitlbee-des3-implement.patch -# Unaccepted upstream patch from #738, RHBZ #662289 +# Yet unaccepted upstream patch from #738, RHBZ #662289 Patch5: bitlbee-systemd.patch # When the above patches will be consolidated upstream, this should merge # with Patch1 or Patch2 or something like that @@ -159,6 +163,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Dec 28 2010 Matěj Cepl - 3.0.1-6 +- commented all patches with status of their upstreaming +- two tiny fixes for SSL implementation (#666022) + * Mon Dec 27 2010 Matěj Cepl - 3.0.1-5 - Systemd support @@ -167,7 +175,7 @@ rm -rf $RPM_BUILD_ROOT * Sun Dec 26 2010 Matěj Cepl - 3.0.1-3 - Add bitlbee-des3-implement patch with working ssl_des3_encrypt - implementation by Ricky Zhou. +implementation by Ricky Zhou. * Sat Dec 25 2010 Matěj Cepl - 3.0.1-2 - Implement missing ssl_pending() (Fix by Ricky Zhou, #665553)