Switch to gnutls tar.gz without patented SRP code
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 22 Sep 2008 22:07:29 +0000 (18:07 -0400)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 22 Sep 2008 22:07:29 +0000 (18:07 -0400)
gnutls/gnutls-2.4.0-nosrp.patch [new file with mode: 0644]
gnutls/mingw-gnutls.spec

diff --git a/gnutls/gnutls-2.4.0-nosrp.patch b/gnutls/gnutls-2.4.0-nosrp.patch
new file mode 100644 (file)
index 0000000..ddfb9a5
--- /dev/null
@@ -0,0 +1,33 @@
+diff -up gnutls-2.4.0/lib/gnutlsxx.cpp.nosrp gnutls-2.4.0/lib/gnutlsxx.cpp
+--- gnutls-2.4.0/lib/gnutlsxx.cpp.nosrp        2008-05-19 10:01:43.000000000 +0200
++++ gnutls-2.4.0/lib/gnutlsxx.cpp      2008-06-23 20:11:26.000000000 +0200
+@@ -398,7 +398,11 @@ void session::set_credentials( credentia
+ const char* server_session::get_srp_username() const
+ {
++#ifdef ENABLE_SRP
+     return gnutls_srp_server_get_username( s);
++#else
++    return NULL;
++#endif
+ }
+ const char* server_session::get_psk_username() const
+@@ -677,7 +681,7 @@ void certificate_client_credentials::set
+ }
+ // SRP
+-
++#ifdef ENABLE_SRP
+ srp_server_credentials::srp_server_credentials() : credentials(GNUTLS_CRD_SRP)
+ { 
+     RETWRAP(gnutls_srp_allocate_server_credentials( &cred));
+@@ -721,7 +725,7 @@ void srp_client_credentials::set_credent
+ {
+     gnutls_srp_set_client_credentials_function( cred, func);
+ }
+-
++#endif
+ // PSK
+ psk_server_credentials::psk_server_credentials() : credentials(GNUTLS_CRD_PSK)
index 139e227..688f8a3 100644 (file)
@@ -6,18 +6,21 @@
 
 Name:           mingw-gnutls
 Version:        2.4.1
-Release:        8%{?dist}
+Release:        9%{?dist}
 Summary:        MinGW Windows GnuTLS TLS/SSL encryption library
 
-License:        LGPLv2+
+License:        GPLv3+ and LGPLv2+
 Group:          Development/Libraries
-URL:            http://www.gnu.org/software/gnutls/
-Source0:        ftp://ftp.gnutls.org/pub/gnutls/gnutls-%{version}.tar.bz2
+URL:            http://www.gnutls.org/
+#Source0:        ftp://ftp.gnutls.org/pub/gnutls/gnutls-%{version}.tar.bz2
+# XXX patent tainted SRP code removed.
+Source0:        gnutls-%{version}-nosrp.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
 
 Patch0:         gnutls-certtool-build.patch
+Patch1:         gnutls-2.4.0-nosrp.patch
 
 BuildRequires:  mingw-filesystem >= 25
 BuildRequires:  mingw-gcc
@@ -36,12 +39,14 @@ MinGW Windows GnuTLS TLS/SSL encryption library.
 %prep
 %setup -q -n gnutls-%{version}
 %patch0 -p1
+%patch1 -p1
 
 
 %build
 autoreconf
 PATH="%{_mingw_bindir}:$PATH" \
-%{_mingw_configure} --with-included-libtasn1 --disable-cxx
+%{_mingw_configure} --with-included-libtasn1 --disable-cxx \
+           --disable-srp-authentication
 make
 
 
@@ -95,6 +100,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 2.4.1-9
+- Switch to source tar.bz2 with SRP stuff removed
+
 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 2.4.1-8
 - Remove duplicate manpages and info files.