From ec0328a24e5586a42e25eab094acaccfebf52e89 Mon Sep 17 00:00:00 2001 From: Ralf Senderek Date: Thu, 16 Jun 2016 17:11:47 +0200 Subject: [PATCH 1/4] bug fix for RHBZ #1347294 --- cryptlib.spec | 14 +++++++++++--- sources | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cryptlib.spec b/cryptlib.spec index bd70c54..990e82b 100644 --- a/cryptlib.spec +++ b/cryptlib.spec @@ -6,7 +6,7 @@ Name: cryptlib Version: 3.4.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Security library and toolkit for encryption and authentication services Group: System Environment/Libraries @@ -40,10 +40,14 @@ BuildRequires: coreutils BuildRequires: python >= 2.7 BuildRequires: python2-devel >= 2.7 %if %{with_python3} - BuildRequires: python3-devel +BuildRequires: python3-devel %endif BuildRequires: java-devel -BuildRequires: perl, perl-generators +BuildRequires: perl +%if 0%{?fedora} >= 23 +BuildRequires: perl-generators +%endif +BuildRequires: perl-Data-Dumper BuildRequires: perl-ExtUtils-MakeMaker @@ -325,6 +329,10 @@ tar xpzf %{SOURCE4} %changelog +* Thu Jun 16 2016 Senderek Web Security - 3.4.3-6 +- Remove perl-generators for epel7 +- Remove python3 script from test subpackage (fixes RHBZ #1347294) + * Tue Jun 14 2016 Senderek Web Security - 3.4.3-5 - Fix source locations - Clean up perl file installation diff --git a/sources b/sources index 1a5e8e9..0b90675 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ 88f0c8dd9ef139d281dffc259c3f8cdc cl343_fedora.zip +4a5f822bbdd1a838a383b0f81ee65365 cryptlib-tests.tar.gz e90177946732f82d820cbf0a37e90a05 cryptlib-perlfiles.tar.gz -ed30a5a5d0d99111fa4fc7915b670954 cryptlib-tests.tar.gz From df6395a1dd72cfff2d34477375646476fdaacdee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 24 Jun 2016 09:30:00 +0200 Subject: [PATCH 2/4] Mandatory Perl build-requires added --- cryptlib.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/cryptlib.spec b/cryptlib.spec index 990e82b..32ebcce 100644 --- a/cryptlib.spec +++ b/cryptlib.spec @@ -44,6 +44,7 @@ BuildRequires: python3-devel %endif BuildRequires: java-devel BuildRequires: perl +BuildRequires: perl-devel %if 0%{?fedora} >= 23 BuildRequires: perl-generators %endif From 6b0636a95f8799c69303b7513a3c42c1ed332902 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 19 Jul 2016 06:51:09 +0000 Subject: [PATCH 3/4] - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages --- cryptlib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cryptlib.spec b/cryptlib.spec index 32ebcce..064c38e 100644 --- a/cryptlib.spec +++ b/cryptlib.spec @@ -6,7 +6,7 @@ Name: cryptlib Version: 3.4.3 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Security library and toolkit for encryption and authentication services Group: System Environment/Libraries @@ -329,6 +329,9 @@ tar xpzf %{SOURCE4} %changelog +* Tue Jul 19 2016 Fedora Release Engineering - 3.4.3-7 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + * Thu Jun 16 2016 Senderek Web Security - 3.4.3-6 - Remove perl-generators for epel7 From 21f826b3619eae4a775dc38bbd1ac9df3a6f67f3 Mon Sep 17 00:00:00 2001 From: Ralf Senderek Date: Tue, 26 Jul 2016 20:08:19 +0200 Subject: [PATCH 4/4] bug fix for RHBZ #1352406 --- COPYING | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++ README-manual | 55 ++++++++++++++++++++++++++++++++++++++++++++++ cryptlib.spec | 16 +++++++++++--- renamesymbols | 34 +++++++++++++++++++++++++++++ testlibpatch | 13 ++++++++++- 5 files changed, 174 insertions(+), 4 deletions(-) create mode 100644 COPYING create mode 100755 renamesymbols diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..efaaae9 --- /dev/null +++ b/COPYING @@ -0,0 +1,60 @@ +This file contains the usage terms for cryptlib. The full details of cryptlib +usage are provided on the cryptlib home page; although this file and the +information on the web page should be identical, in case of any dispute the +web page takes precedence. This file is included because some distributions +require the presence of a COPYING file. + +cryptlib is distributed under a dual license that allows free, open-source use +under a GPL-compatible license and closed-source use under a standard +commercial license. The GPL-compatible license (a.k.a. the Sleepycat license) +is given below. Further details on this license are available from the +cryptlib home page. + + Copyright 1992-2016 Peter Gutmann. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Redistributions in any form must be accompanied by information on how to + obtain complete source code for the cryptlib software and any accompanying + software that uses the cryptlib software. The source code must either be + included in the distribution or be available for no more than the cost of + distribution, and must be freely redistributable under reasonable + conditions. For an executable file, complete source code means the source + code for all modules it contains or uses. It does not include source code + for modules or files that typically accompany the major components of the + operating system on which the executable file runs. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO + EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + OF SUCH DAMAGE. + +Note that decoupling the software from the user, for example by running in a +SaaS configuration, does not exempt you from these requirements. + +If you're unable to comply with the above license then the following, +alternate usage conditions apply: + + Any large-scale commercial use of cryptlib requires a license. "Large-scale + commercial use" means any revenue-generating purpose such as use for + company-internal purposes, or use of cryptlib in an application or product, + with a total gross revenue of over US$5,000. This allows cryptlib to be + used in freeware and shareware applications, for evaluation and research + purposes, and for non-revenue-generating or personal use without charge. In + addition the author reserves the right to grant free licenses for commercial + use in special cases (for example where there is a general benefit to the + public), contact the author for details if you think you qualify. diff --git a/README-manual b/README-manual index bd3306c..4910642 100644 --- a/README-manual +++ b/README-manual @@ -22,5 +22,60 @@ http://www.cypherpunks.to/~peter/manual.pdf If you refer to the numerous code examples, you will be able to use cryptlib in your own (commercial) projects quite easily. +As the manual is part of the documentation that is required to mention +the contributions of other people to the source code of Cryptlib, I'll +quote the Acknowledgement in full here: + + +Acknowledgements + +Alexey Kirichenko provided information on NtQuerySystemInfo for randomness- +gathering under WinNT/Win2K to avoid the need to access the buggy Windows +registry performance counters. + +Brian Gladman wrote the AES code. + +Chris Wedgwood and Paul Kendall helped write the Unix random data gathering +routines. + +endergone Zwiebeltüte helped debug the SSL/TLS implementation. + +Eric Young and the OpenSSL team wrote the conventional encryption and hashing +code and bignum library. + +Jean-Loup Gailly and Mark Adler wrote the zlib compression code. + +Joerg Plate did the Amiga port. + +Markus F.X.J. Oberhumer did the 32-bit DOS port. + +Matt Thomlinson and Blake Coverett helped fix up and debug the Win32 random +data gathering routines. + +Matthijs van Duin, Sascha Kratky, and Jeff Lamarche did the Macintosh Classic port. + +Nathan Hammond did the MVS port. + +Osma Ahvenlampi did the PPC BeOS port. + +Sami Tolvanen implemented the cryptlib GUI interface. + +Sriram Ramachandran did the Cygwin port. + +Steve Landers provided the Tcl bindings, with financial support from Eolas +Technologies. + +Stuart Woolford and Mario Korva did the OS/2 port. + +Thomas Pornin did the ECDSA and ECDH code. + +Trevor Perrin did the C#, Java, and Python bindings. + +Wolfgang Gothier did the Delphi and Visual Basic bindings and tracked down a +number of really obscure probl^H^H^H^H^Hundocumented features. + + + + Ralf Senderek diff --git a/cryptlib.spec b/cryptlib.spec index 064c38e..a6dd7a6 100644 --- a/cryptlib.spec +++ b/cryptlib.spec @@ -6,11 +6,11 @@ Name: cryptlib Version: 3.4.3 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Security library and toolkit for encryption and authentication services Group: System Environment/Libraries -License: Sleepycat +License: Sleepycat and OpenSSL URL: https://www.cs.auckland.ac.nz/~pgut001/cryptlib Source0: https://crypto-bone.com/fedora/cl343_fedora.zip Source1: https://crypto-bone.com/fedora/cl343_fedora.zip.sig @@ -21,6 +21,8 @@ Source2: gpgkey-3274CB29956498038A9C874BFBF6E2C28E9C98DD.asc Source3: https://crypto-bone.com/fedora/README-manual Source4: https://crypto-bone.com/fedora/cryptlib-tests.tar.gz Source5: https://crypto-bone.com/fedora/cryptlib-perlfiles.tar.gz +Source6: renamesymbols +Source7: COPYING Patch1: sonamepatch # soname is now libcl.so.3 @@ -173,6 +175,8 @@ cd %{_builddir}/%{name}-%{version}/bindings %build cd %{name}-%{version} +# rename cryptlib symbols that may collide with openssl symbols +%{SOURCE6} # build java bindings chmod +x tools/mkhdr.sh tools/mkhdr.sh @@ -222,6 +226,8 @@ mkdir -p %{buildroot}/%{_jnidir} cp %{_builddir}/%{name}-%{version}/bindings/cryptlib.jar %{buildroot}%{_jnidir} # install docs +# apply the new license text +cp %{SOURCE7} %{_builddir}/%{name}-%{version}/COPYING cp %{_builddir}/%{name}-%{version}/COPYING %{buildroot}%{_datadir}/licenses/%{name} cp %{_builddir}/%{name}-%{version}/README %{buildroot}%{_docdir}/%{name}/README echo "No tests performed." > %{_builddir}/%{name}-%{version}/stestlib.log @@ -329,10 +335,14 @@ tar xpzf %{SOURCE4} %changelog + +* Tue Jul 26 2016 Senderek Web Security - 3.4.3-8 +- change license tag (RHBZ #1352406) +- rename symbols that collide with openssl (RHBZ #1352404) + * Tue Jul 19 2016 Fedora Release Engineering - 3.4.3-7 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - * Thu Jun 16 2016 Senderek Web Security - 3.4.3-6 - Remove perl-generators for epel7 - Remove python3 script from test subpackage (fixes RHBZ #1347294) diff --git a/renamesymbols b/renamesymbols new file mode 100755 index 0000000..b895bcf --- /dev/null +++ b/renamesymbols @@ -0,0 +1,34 @@ +#!/bin/bash +# script to remove symbol collisions between cryptlib and openssl +# +# Author: Ralf Senderek +# Date: 15 July 2016 +# License: BSD +# +# this script must be run in the cryptlib directory before building the +# shared library + +for F in $(find . -type f) +do + sed -i 's/BN_/cl_BN_/g' $F + sed -i 's/bn_/cl_bn_/g' $F + sed -i 's/CAST_/cl_CAST_/g' $F + sed -i 's/MD5_/cl_MD5_/g' $F + sed -i 's/SHA1_/cl_SHA1_/g' $F + sed -i 's/sha1_block/cl_sha1_block/g' $F + sed -i 's/idea_/cl_idea_/g' $F +done + +# rename RC4 to cl_RC4 + +sed -i 's/RC4(/cl_RC4(/g' context/ctx_rc4.c +sed -i 's/RC4(/cl_RC4(/g' crypt/rc4.h +sed -i 's/RC4(/cl_RC4(/g' crypt/rc4enc.c + +cd bn +for F in $(ls bn_*) +do + mv $F cl_$F +done + +#------------------------------------------------------------------# diff --git a/testlibpatch b/testlibpatch index fd8834f..1fe67d6 100644 --- a/testlibpatch +++ b/testlibpatch @@ -1,5 +1,5 @@ --- cl-original/test/testfunc.c 2016-06-03 13:23:35.294667665 +0200 -+++ cl-patched/test/testfunc.c 2016-06-03 13:26:42.320931385 +0200 ++++ cl-patched/test/testfunc.c 2016-07-20 20:02:10.425573000 +0200 @@ -1111,10 +1111,12 @@ } if( !testSessionAttributes() ) @@ -13,3 +13,14 @@ if( !testSessionSSHPortforward() ) return( FALSE ); if( !testSessionSSHExec() ) +@@ -1141,8 +1143,10 @@ + #endif /* 0 */ + if( !testSessionOCSP() ) + return( FALSE ); ++#if 0 + if( !testSessionTSP() ) + return( FALSE ); ++#endif + if( !testSessionEnvTSP() ) + return( FALSE ); + if( !testSessionCMP() )