Compare commits

...

13 Commits
rawhide ... f36

Author SHA1 Message Date
Ralf Senderek
eb08382098 Resolve RHBZ#2182688 2023-04-14 09:20:57 +02:00
Ralf Senderek
97998b38a4 Resolve RHBZ#2182688 2023-04-14 09:17:31 +02:00
Ralf Senderek
8be0b7b50c adding claes to cryptlib-tools 2022-06-12 14:01:50 +02:00
Ralf Senderek
86998b1327 adding claes to cryptlib-tools 2022-06-12 13:51:58 +02:00
Ralf Senderek
1fbdd16c05 add subpackage cryptlib-tools 2022-03-05 21:13:20 +01:00
Ralf Senderek
a3e9fc40f7 Resolve the illegal instruction issue caused by -march=native 2022-03-04 22:17:46 +01:00
Ralf Senderek
f1dffabf64 merge with rawhide 2022-02-17 16:04:54 +01:00
Ralf Senderek
33d2b64a41 update to version 3.4.6 (again) 2022-02-17 15:49:20 +01:00
Ralf Senderek
3f594f711b update patchfiles 2022-02-11 11:46:21 +01:00
Ralf Senderek
b48b95e1fe update patches for version 3.4.5 2022-02-11 11:29:02 +01:00
Ralf Senderek
a3e6725023 update patches for 3.4.5 2022-02-11 11:26:52 +01:00
Ralf Senderek
a9aa9bab89 specfile corrected 2022-02-11 10:51:04 +01:00
Ralf Senderek
92e1e3bebe revert update to 3.4.6 2022-02-11 10:46:45 +01:00
16 changed files with 1232 additions and 48 deletions

7
.gitignore vendored
View File

@ -1,7 +0,0 @@
/3.4.5
/3.4.6
/devel
/cl346_fedora.zip
/cl346_fedora.zip.sig
/cryptlib-tests.tar.gz
/cryptlib-perlfiles.tar.gz

View File

@ -1,11 +0,0 @@
--- cl-original/makefile 2021-12-03 15:53:24.172492715 +0100
+++ cl-patched/makefile 2021-12-03 15:54:55.914497971 +0100
@@ -92,7 +92,7 @@
#
# Standard build flags
-CFLAGS = -c -D__UNIX__ -DNDEBUG -I.
+CFLAGS = -c -D__UNIX__ -DNDEBUG -I. $(ADDFLAGS)
CFLAGS_DEBUG = -c -D__UNIX__ -I. -g -O1
CFLAGS_DEBUGGCC = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O1

Binary file not shown.

Binary file not shown.

1084
claes Executable file

File diff suppressed because it is too large Load Diff

BIN
claes.sig Normal file

Binary file not shown.

21
configpatch Normal file
View File

@ -0,0 +1,21 @@
--- cl-original/misc/config.h 2022-03-04 17:55:32.643896948 +0100
+++ cl-patched/misc/config.h 2022-03-04 19:46:36.843663542 +0100
@@ -218,7 +218,7 @@
/* Whether to build the Java/JNI interface or not */
-/* #define USE_JAVA */
+#define USE_JAVA
/* Whether to provide descriptive text messages for errors or not.
Disabling these can reduce code size, at the expense of making error
@@ -1327,4 +1327,9 @@
#undef USE_ERRMSGS
#endif /* 0 */
+#undef USE_IDEA
+#undef USE_OBSCURE_ALGORITHMS
+#undef USE_PATENTED_ALGORITHMS
+#define USE_SHA2_EXT
+
#endif /* _CONFIG_DEFINED */

Binary file not shown.

Binary file not shown.

View File

@ -1,31 +1,36 @@
%global includetests 0
%global includetests 1
# 0=no, 1=yes
%global cryptlibdir %{_libdir}/%{name}
%global withpython2 0
Name: cryptlib
Version: 3.4.6
Release: 4%{?dist}
Release: 9%{?dist}
Summary: Security library and toolkit for encryption and authentication services
License: Sleepycat and OpenSSL
URL: https://www.cs.auckland.ac.nz/~pgut001/cryptlib
Source0: https://crypto-bone.com/fedora/cl346_fedora.zip
Source1: https://crypto-bone.com/fedora/cl346_fedora.zip.sig
Source0: https://senderek.ie/fedora/cl346_fedora.zip
Source1: https://senderek.ie/fedora/cl346_fedora.zip.sig
# for security reasons a public signing key should always be stored in distgit
# and never be used with a URL to make impersonation attacks harder
# (verified: https://senderek.ie/keys/codesigningkey)
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
Source3: https://senderek.ie/fedora/README-manual
Source4: https://senderek.ie/fedora/cryptlib-tests.tar.gz
Source5: https://senderek.ie/fedora/cryptlib-perlfiles.tar.gz
Source6: https://senderek.ie/fedora/cryptlib-tools.tar.gz
Source7: https://senderek.ie/fedora/claes
Source8: https://senderek.ie/fedora/claes.sig
# soname is now libcl.so.3.4
Patch1: flagspatch
Patch2: javapatch
Patch2: configpatch
Patch3: errorpatch
Patch4: testpatch
Patch5: m64patch
ExclusiveArch: x86_64 aarch64 ppc64 ppc64le
ExclusiveArch: x86_64 aarch64 ppc64le
BuildRequires: gcc
BuildRequires: libbsd-devel
@ -125,6 +130,14 @@ Requires: man
%description perl
Cryptlib module for application development in Perl
%package tools
Summary: Collection of stand-alone programs that use Cryptlib
Requires: python3 >= 3.5
Requires: man
Requires: %{name}%-python3
%description tools
Collection of stand-alone programs that use Cryptlib
%prep
@ -134,6 +147,7 @@ KEYRING=${KEYRING%%.asc}.gpg
mkdir -p .gnupg
gpg2 --homedir .gnupg --no-default-keyring --quiet --yes --output $KEYRING --dearmor %{SOURCE2}
gpg2 --homedir .gnupg --no-default-keyring --keyring $KEYRING --verify %{SOURCE1} %{SOURCE0}
gpg2 --homedir .gnupg --no-default-keyring --keyring $KEYRING --verify %{SOURCE8} %{SOURCE7}
rm -rf %{name}-%{version}
mkdir %{name}-%{version}
@ -143,6 +157,8 @@ cd %{name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
# remove pre-build jar file
rm %{_builddir}/%{name}-%{version}/bindings/cryptlib.jar
@ -164,10 +180,10 @@ cp /etc/alternatives/java_sdk/include/jni.h .
cp /etc/alternatives/java_sdk/include/linux/jni_md.h .
make clean
make shared %{?_smp_mflags} ADDFLAGS="%{optflags}"
make shared ADDFLAGS="%{optflags}"
ln -s libcl.so.3.4.6 libcl.so
ln -s libcl.so libcl.so.3.4
make stestlib %{?_smp_mflags} ADDFLAGS="%{optflags}"
make stestlib ADDFLAGS="%{optflags}"
# build python modules
cd bindings
@ -252,17 +268,29 @@ rm -rf $(find %{buildroot}%{cryptlibdir}/test -name "*.c")
cd %{buildroot}%{cryptlibdir}
tar xpzf %{SOURCE4}
# install cryptlib tools
cd %{buildroot}%{cryptlibdir}
tar xpzf %{SOURCE6}
mkdir -p %{buildroot}%{_mandir}/man1
mkdir -p %{buildroot}%{_bindir}
cp %{SOURCE7} %{buildroot}%{_bindir}
cp /%{buildroot}%{cryptlibdir}/tools/clsha1 %{buildroot}%{_bindir}
cp /%{buildroot}%{cryptlibdir}/tools/clsha2 %{buildroot}%{_bindir}
cp /%{buildroot}%{cryptlibdir}/tools/man/clsha1.1 %{buildroot}%{_mandir}/man1
cp /%{buildroot}%{cryptlibdir}/tools/man/clsha2.1 %{buildroot}%{_mandir}/man1
cp /%{buildroot}%{cryptlibdir}/tools/man/claes.1 %{buildroot}%{_mandir}/man1
%check
# checks are performed after install
# in KOJI tests must be disabled as there is no networking
%if %{includetests}
cd %{_builddir}/%{name}-%{version}
ln -s libcl.so.3.4.6 ./libcl.so.3.4
export LD_LIBRARY_PATH=.
echo "Running tests on the cryptlib library. This will take a few minutes."
echo "Network access is necessary to complete all tests!"
./stestlib > %{_builddir}/%{name}-%{version}/stestlib.log
cp %{_builddir}/%{name}-%{version}/stestlib.log %{buildroot}%{_docdir}/%{name}/stestlib.log
cp %{buildroot}%{cryptlibdir}/c/cryptlib-test.c .
sed -i '41s/<cryptlib\/cryptlib.h>/\".\/cryptlib.h\"/' cryptlib-test.c
gcc -o cryptlib-test cryptlib-test.c -L. libcl.so.3.4.6
./cryptlib-test
%endif
@ -307,11 +335,41 @@ tar xpzf %{SOURCE4}
%files test
%{cryptlibdir}
%files tools
%{_bindir}/clsha1
%{_bindir}/clsha2
%{_bindir}/claes
%{_mandir}/man1/clsha2.1.gz
%{_mandir}/man1/clsha1.1.gz
%{_mandir}/man1/claes.1.gz
%changelog
* Fri Apr 14 2023 Ralf Senderek <innovation@senderek.ie> - 3.4.6-9
- Resolve RHBZ#2182688
* Sun Jun 12 2022 Ralf Senderek <innovation@senderek.ie> - 3.4.6-8
- Add claes ver 1.0 to cryptlib-tools
* Sat Mar 05 2022 Ralf Senderek <innovation@senderek.ie> - 3.4.6-7
- Add subpackage cryptlib-tools
* Fri Mar 04 2022 Ralf Senderek <innovation@senderek.ie> - 3.4.6-6
- Define -march=x86-64
* Sat Feb 26 2022 Ralf Senderek <innovation@senderek.ie> - 3.4.6-5
- Correct date in test/cert.c
* Thu Feb 17 2022 Ralf Senderek <innovation@senderek.ie> - 3.4.6-4
- Drop i686
* Fri Feb 11 2022 Ralf Senderek <innovation@senderek.ie> - 3.4.5-22
- Update patches for version 3.4.5
* Fri Feb 11 2022 Ralf Senderek <innovation@senderek.ie> - 3.4.5-21
- Rebuilt for java-17-openjdk as system jdk
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 3.4.6-3
- Rebuilt for java-17-openjdk as system jdk

View File

@ -1,11 +1,11 @@
--- cl-original/makefile 2021-12-03 15:53:24.172492715 +0100
+++ cl-patched/makefile 2022-02-01 14:19:42.814855266 +0100
--- cl-original/makefile 2021-12-03 15:53:24.000000000 +0100
+++ cl-patched/makefile 2023-04-05 18:00:03.627181152 +0200
@@ -92,7 +92,7 @@
#
# Standard build flags
-CFLAGS = -c -D__UNIX__ -DNDEBUG -I.
+CFLAGS = -c -D__UNIX__ -DNDEBUG -I. $(ADDFLAGS) -ggdb3 -fno-omit-frame-pointer -O1
+CFLAGS = -c -D__UNIX__ -DNDEBUG -I. $(ADDFLAGS)
CFLAGS_DEBUG = -c -D__UNIX__ -I. -g -O1
CFLAGS_DEBUGGCC = -c -D__UNIX__ -I. -ggdb3 -fno-omit-frame-pointer -O1

View File

@ -1,11 +0,0 @@
--- cl-original/misc/config.h 2021-12-03 16:43:09.959891808 +0100
+++ cl-patched/misc/config.h 2021-12-03 16:44:07.248896490 +0100
@@ -218,7 +218,7 @@
/* Whether to build the Java/JNI interface or not */
-/* #define USE_JAVA */
+#define USE_JAVA
/* Whether to provide descriptive text messages for errors or not.
Disabling these can reduce code size, at the expense of making error

11
m64patch Normal file
View File

@ -0,0 +1,11 @@
--- cl-original/tools/ccopts.sh 2022-03-04 19:32:14.000000000 +0100
+++ cl-patched/tools/ccopts.sh 2023-04-05 11:19:59.034814258 +0200
@@ -897,7 +897,7 @@
if [ $GENERICBUILD -gt 0 ] ; then
echo " (Enabling lowest-common-denominator build options for cross-platform library)." >&2 ;
else
- CCARGS="$CCARGS -march=native -mtune=generic" ;
+ CCARGS="$CCARGS -m64 -mtune=generic" ;
fi
if [ "$ARCH" = "x86_64" ] ; then
CCARGS="$CCARGS -fPIC" ;

21
perlpatch Normal file
View File

@ -0,0 +1,21 @@
--- cl-original/bindings/PerlCryptLib.xs 2019-03-10 08:45:35.962108583 -0400
+++ cl-patched/bindings/PerlCryptLib.xs 2019-03-10 08:46:27.133451822 -0400
@@ -594,18 +594,3 @@
OUTPUT:
RETVAL
-# Add deprecated functions when CRYPTLIB_VERSION prior 3.4.0
-#if CRYPTLIB_VERSION < 3400
-
-int cryptAsyncCancel(cryptObject)
- const int cryptObject;
-
-
-int cryptAsyncQuery(cryptObject)
- const int cryptObject;
-
-
-int cryptGenerateKeyAsync(cryptContext)
- const int cryptContext;
-
-#endif

View File

@ -1 +1,5 @@
SHA512 (cryptlib.spec) = 5901aa3776e1c370603dca904e68571b3f6d9edb0aab75586b4a6665e52bed0f471a3ac47a9e983e58e28ca4864a38d80fc84e3ccc3600ec187653792421e8b6
SHA512 (cl346_fedora.zip.sig) = 64e66b074823eeb42d2bdaa6d7136c2b3100aede2575a86ceb2257f3859511f2e1d57c3a9cfdc4e96ccc28ef0de66798bae31c51dc582dc9aa528e3d5a33b7f6
SHA512 (cl346_fedora.zip) = a6149c91ce262f5aed253e0e1de297f690b5ecfa194c06fe4a68d233a450666bce3ca51473fbe17b88aa6fede058ec9b91b6cf7378c7b192de312a503cbd7a93
SHA512 (cryptlib-perlfiles.tar.gz) = b975d34acfd1d99a224bbd5536483e5489feac8801a567740ec668bcef9a1eff67fddbdad53f61b2ff48bd43396e92f070ebf4de622f3edeb70428f4aaae2ff6
SHA512 (cryptlib-tests.tar.gz) = 3c32ed3af34617decec5edce97bb54d8a5a242b2214d2055aca6ed71f500fe4cfb8df2d3a1bfb13e003060eccdbb4428042b15b4bc8580cb2eaeedd8f61776d0
SHA512 (cryptlib-tools.tar.gz) = f4ec55cc218ae4ea5a50d2881577c4b4df7b0b1829cc077ae73d3154d65e77957ea663b8156e61fe4ec9f3b16b4a413a85a974ca89bd7773b0a72541058f518c

14
testpatch Normal file
View File

@ -0,0 +1,14 @@
--- cl-original/test/certs.c 2022-02-25 19:58:23.896919893 +0100
+++ cl-patched/test/certs.c 2022-02-25 19:59:14.352826858 +0100
@@ -50,9 +50,9 @@
#define ONE_YEAR_TIME ( 365 * 86400L )
#if defined( __MWERKS__ ) || defined( SYMANTEC_C ) || defined( __MRC__ )
- #define CERTTIME_DATETEST ( ( ( 2021 - 1970 ) * ONE_YEAR_TIME ) + 2082844800L )
+ #define CERTTIME_DATETEST ( ( ( 2022 - 1970 ) * ONE_YEAR_TIME ) + 2082844800L )
#else
- #define CERTTIME_DATETEST ( ( 2021 - 1970 ) * ONE_YEAR_TIME )
+ #define CERTTIME_DATETEST ( ( 2022 - 1970 ) * ONE_YEAR_TIME )
#endif /* Macintosh-specific weird epoch */
#if ( ULONG_MAX > 0xFFFFFFFFUL ) || defined( _M_X64 )
#define SYSTEM_64BIT