summaryrefslogtreecommitdiff
path: root/security/cryptlib/files
diff options
context:
space:
mode:
Diffstat (limited to 'security/cryptlib/files')
-rw-r--r--security/cryptlib/files/patch-crypt_osconfig.h13
-rw-r--r--security/cryptlib/files/patch-makefile14
-rw-r--r--security/cryptlib/files/patch-misc_os__detect.h11
-rw-r--r--security/cryptlib/files/patch-misc_os__spec.h14
-rw-r--r--security/cryptlib/files/patch-misc_os_spec.h23
-rw-r--r--security/cryptlib/files/patch-test_certs.c11
-rw-r--r--security/cryptlib/files/patch-tools_ccopts.sh23
7 files changed, 59 insertions, 50 deletions
diff --git a/security/cryptlib/files/patch-crypt_osconfig.h b/security/cryptlib/files/patch-crypt_osconfig.h
deleted file mode 100644
index 3cc1a7d7de9b..000000000000
--- a/security/cryptlib/files/patch-crypt_osconfig.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- crypt/osconfig.h.orig 2021-11-26 15:16:58 UTC
-+++ crypt/osconfig.h
-@@ -147,6 +147,10 @@
- #define L_ENDIAN
- #else
- #define B_ENDIAN
- #endif /* Usually big-endian but may be little-endian */
-+ #ifdef __LP64__
-+ #undef SIXTY_FOUR_BIT
-+ #define SIXTY_FOUR_BIT_LONG
-+ #endif
- #define BN_LLONG
- #define DES_RISC1
diff --git a/security/cryptlib/files/patch-makefile b/security/cryptlib/files/patch-makefile
index ed4afc3aa397..6f255e18d9d2 100644
--- a/security/cryptlib/files/patch-makefile
+++ b/security/cryptlib/files/patch-makefile
@@ -1,11 +1,11 @@
---- makefile.orig 2016-03-25 04:33:28.000000000 +0100
-+++ makefile 2017-01-12 10:10:40.481484000 +0100
-@@ -1626,7 +1626,7 @@
- @make $(DEFINES) CFLAGS="$(CFLAGS) -DUSE_ASM -fomit-frame-pointer -O3"
+--- makefile.orig 2021-09-10 22:27:18 UTC
++++ makefile
+@@ -1859,7 +1859,7 @@ BSD/OS:
+ $(MAKE) $(DEFINES) CFLAGS="$(CFLAGS) -fomit-frame-pointer -O3"
FreeBSD:
-- make $(DEFINES) CFLAGS="$(CFLAGS) -fomit-frame-pointer -pthread"
-+ make $(DEFINES) CFLAGS="$(CFLAGS) %%CFLAGS%%"
+- $(MAKE) $(DEFINES) CFLAGS="$(CFLAGS) -fomit-frame-pointer -pthread"
++ $(MAKE) $(DEFINES) CFLAGS="$(CFLAGS) -O2 -pipe -DUSE_PKCS11 -fstack-protector-strong -fno-strict-aliasing "
NetBSD:
- make $(DEFINES) CFLAGS="$(CFLAGS) -fomit-frame-pointer -pthread"
+ $(MAKE) $(DEFINES) CFLAGS="$(CFLAGS) -fomit-frame-pointer -pthread"
diff --git a/security/cryptlib/files/patch-misc_os__detect.h b/security/cryptlib/files/patch-misc_os__detect.h
new file mode 100644
index 000000000000..835bc7c9a6c9
--- /dev/null
+++ b/security/cryptlib/files/patch-misc_os__detect.h
@@ -0,0 +1,11 @@
+--- misc/os_detect.h.orig 2023-03-20 10:08:54 UTC
++++ misc/os_detect.h
+@@ -629,7 +629,7 @@
+
+ #if defined( __WINDOWS__ ) || \
+ ( defined( __UNIX__ ) && \
+- ( ( defined( sun ) && OSVERSION > 4 ) || defined( __linux__ ) || \
++ ( ( defined( sun ) && OSVERSION > 4 ) || defined( __linux__ ) || defined( __FreeBSD__ ) || \
+ defined( _AIX ) || ( defined( __APPLE__ ) && !defined( __MAC__ ) ) ) ) || \
+ defined( __ANDROID__ )
+ #define DYNAMIC_LOAD
diff --git a/security/cryptlib/files/patch-misc_os__spec.h b/security/cryptlib/files/patch-misc_os__spec.h
new file mode 100644
index 000000000000..66d060b78bd7
--- /dev/null
+++ b/security/cryptlib/files/patch-misc_os__spec.h
@@ -0,0 +1,14 @@
+--- misc/os_spec.h.orig 2021-09-11 19:27:14 UTC
++++ misc/os_spec.h
+@@ -610,9 +610,8 @@ typedef int BOOLEAN_INT;
+ variants, this presumably extends to SH5 as well so we treat va_lists on
+ Super-H as scalars */
+
+-#if defined( __GNUC__ )
+- #if( defined( __ARM_EABI__ ) && \
+- ( __GNUC__ == 4 && __GNUC_MINOR__ >= 4 ) || ( __GNUC__ > 4 ) )
++#if 1
++ #if defined( __ARM_EABI__ )
+ /* In theory we could check __ap but in practice it's too risky to rely
+ on the type and state of hidden internal fields, and in any case it's
+ only a sanity check, not a hard requirement, so we just no-op the
diff --git a/security/cryptlib/files/patch-misc_os_spec.h b/security/cryptlib/files/patch-misc_os_spec.h
deleted file mode 100644
index 8d229ccc8a28..000000000000
--- a/security/cryptlib/files/patch-misc_os_spec.h
+++ /dev/null
@@ -1,23 +0,0 @@
---- misc/os_spec.h.orig 2016-03-25 02:49:10.000000000 +0100
-+++ misc/os_spec.h 2017-01-12 10:03:32.170180000 +0100
-@@ -761,9 +761,8 @@
- variants, this presumably extends to SH5 as well so we treat va_lists on
- Super-H as scalars */
-
--#if defined( __GNUC__ )
-- #if( defined( __ARM_EABI__ ) && \
-- ( __GNUC__ == 4 && __GNUC_MINOR__ >= 4 ) || ( __GNUC__ > 4 ) )
-+#if 1
-+ #if defined( __ARM_EABI__ )
- /* In theory we could check __ap but in practice it's too risky to rely
- on the type and state of hidden internal fields, and in any case it's
- only a sanity check, not a hard requirement, so we just no-op the
-@@ -839,7 +838,7 @@
-
- #if defined( __WINDOWS__ ) || \
- ( defined( __UNIX__ ) && \
-- ( ( defined( sun ) && OSVERSION > 4 ) || defined( __linux__ ) || \
-+ ( ( defined( sun ) && OSVERSION > 4 ) || defined( __linux__ ) || defined(__FreeBSD__) || \
- defined( _AIX ) || ( defined( __APPLE__ ) && !defined( __MAC__ ) ) ) ) || \
- defined( __ANDROID__ )
- #define DYNAMIC_LOAD
diff --git a/security/cryptlib/files/patch-test_certs.c b/security/cryptlib/files/patch-test_certs.c
new file mode 100644
index 000000000000..8d9b05f4093c
--- /dev/null
+++ b/security/cryptlib/files/patch-test_certs.c
@@ -0,0 +1,11 @@
+--- test/certs.c.orig 2023-03-20 10:42:36 UTC
++++ test/certs.c
+@@ -52,7 +52,7 @@
+ #if defined( __MWERKS__ ) || defined( SYMANTEC_C ) || defined( __MRC__ )
+ #define CERTTIME_DATETEST ( ( ( 2021 - 1970 ) * ONE_YEAR_TIME ) + 2082844800L )
+ #else
+- #define CERTTIME_DATETEST ( ( 2021 - 1970 ) * ONE_YEAR_TIME )
++ #define CERTTIME_DATETEST ( ( 2023 - 1970 ) * ONE_YEAR_TIME )
+ #endif /* Macintosh-specific weird epoch */
+ #if ( ULONG_MAX > 0xFFFFFFFFUL ) || defined( _M_X64 )
+ #define SYSTEM_64BIT
diff --git a/security/cryptlib/files/patch-tools_ccopts.sh b/security/cryptlib/files/patch-tools_ccopts.sh
index e1b43d127496..f0c1781caf8f 100644
--- a/security/cryptlib/files/patch-tools_ccopts.sh
+++ b/security/cryptlib/files/patch-tools_ccopts.sh
@@ -1,11 +1,20 @@
---- tools/ccopts.sh.orig 2010-12-19 00:57:12.000000000 +0100
-+++ tools/ccopts.sh 2011-03-04 15:33:54.000000000 +0100
-@@ -341,22 +341,6 @@ fi
- # in situations that also use shared libs, in the case of x86-64 the use
- # of PIC should have minimum overhead so it shouldn't be a big deal.
+--- tools/ccopts.sh.orig 2021-10-21 02:27:26 UTC
++++ tools/ccopts.sh
+@@ -892,31 +892,6 @@ fi
+ # a big deal. As a convenient side-effect, this also enables the use of
+ # ASLR where it's supported.
--if [ "$ARCH" = "i586" -o "$ARCH" = "i686" -o "$ARCH" = "x86_64" ] ; then
-- if [ "$GCC_VER" -ge 30 ] ; then
+-if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ] || [ "$ARCH" = "x86_64" ] ; then
+- if [ "$COMPILER_VER" -ge 45 ] ; then
+- if [ $GENERICBUILD -gt 0 ] ; then
+- echo " (Enabling lowest-common-denominator build options for cross-platform library)." >&2 ;
+- else
+- CCARGS="$CCARGS -march=native -mtune=generic" ;
+- fi
+- if [ "$ARCH" = "x86_64" ] ; then
+- CCARGS="$CCARGS -fPIC" ;
+- fi ;
+- elif [ "$COMPILER_VER" -ge 30 ] ; then
- case $ARCH in
- 'x86_64')
- CCARGS="$CCARGS -march=opteron -fPIC" ;;