diff --git a/3rdp/build/Dynamic-linked-static-lib.patch b/3rdp/build/Dynamic-linked-static-lib.patch index e984b706f10df9be5bfbc36e8c0a215a179a48f5..2f5b66713cd7c90d16bd287e2abd9530055c8aa2 100644 --- a/3rdp/build/Dynamic-linked-static-lib.patch +++ b/3rdp/build/Dynamic-linked-static-lib.patch @@ -1,15 +1,23 @@ ---- tools/ccopts.sh.orig 2016-11-28 21:51:58.000000000 -0500 -+++ tools/ccopts.sh 2018-01-03 00:57:50.798887000 -0500 -@@ -150,7 +150,7 @@ - HASDYNLOAD=1 ; - fi ;; - esac --if [ $HASDYNLOAD -gt 0 ] ; then -+if [ $HASDYNLOAD -gt 0 -a 1 = 2 ] ; then - if [ -f /usr/include/sql.h ] ; then - echo "ODBC interface detected, enabling ODBC support." >&2 ; - CCARGS="$CCARGS -DHAS_ODBC" ; -@@ -279,7 +279,6 @@ +--- tools/ccopts.sh.orig 2017-07-11 01:21:48.000000000 -0400 ++++ tools/ccopts.sh 2018-01-03 02:46:02.958592000 -0500 +@@ -159,6 +159,7 @@ + # checking if this is set. + + HASDYNLOAD=0 ++DISABLE_AUTODETECT=1 + case $OSNAME in + 'Darwin'|'Linux'|'FreeBSD') + HASDYNLOAD=1 ;; +@@ -204,7 +205,7 @@ + CCARGS="$CCARGS -DNCIPHER_PKCS11" ; + fi + fi +-if [ -f /usr/include/zlib.h ] ; then ++if [ -f /usr/include/zlib.h -a 0 = 3] ; then + echo " (Enabling use of system zlib)." >&2 ; + CCARGS="$CCARGS -DHAS_ZLIB" ; + fi +@@ -302,7 +303,6 @@ # of large-displacement jumps, so if you're tuning the code for size/speed # you can try -fpic to see if you get any improvement. @@ -17,7 +25,7 @@ case $OSNAME in 'Darwin') CCARGS="$CCARGS -fPIC -fno-common" ;; -@@ -306,7 +305,6 @@ +@@ -329,7 +329,6 @@ *) CCARGS="$CCARGS -fPIC" ;; esac ; @@ -25,7 +33,7 @@ # Conversely, if we're building a static lib and the system requires it, set # up static lib-specific options. -@@ -612,9 +610,9 @@ +@@ -643,9 +642,9 @@ # '--param=ssp-buffer-size=4' (the default size is 8), but this isn't # necessary for cryptlib since it doesn't allocate any 4-byte buffers. diff --git a/3rdp/build/GNUmakefile b/3rdp/build/GNUmakefile index 619bbe9d29bcb572e8f1d1b0f6202332b7f38cea..eaad1dc9940acbedb491576260e385128baa348b 100644 --- a/3rdp/build/GNUmakefile +++ b/3rdp/build/GNUmakefile @@ -67,7 +67,7 @@ $(CRYPT_SRC): | $(3RDPSRCDIR) $(CRYPT_IDIR): | $(3RDPODIR) $(QUIET)$(IFNOTEXIST) mkdir $(CRYPT_IDIR) -$(CRYPTLIB_BUILD): $(3RDP_ROOT)$(DIRSEP)dist/cryptlib.zip $(3RDP_ROOT)$(DIRSEP)build/SSL-fix.patch $(3RDP_ROOT)$(DIRSEP)build/Dynamic-linked-static-lib.patch $(3RDP_ROOT)$(DIRSEP)build/terminal-params.patch $(3RDP_ROOT)$(DIRSEP)build/cl-mingw32-static.patch $(3RDP_ROOT)$(DIRSEP)build/cl-ranlib.patch $(3RDP_ROOT)$(DIRSEP)build/cl-PAM-noprompts.patch | $(CRYPT_SRC) $(CRYPT_IDIR) +$(CRYPTLIB_BUILD): $(3RDP_ROOT)$(DIRSEP)dist/cryptlib.zip $(3RDP_ROOT)$(DIRSEP)build/SSL-fix.patch $(3RDP_ROOT)$(DIRSEP)build/Dynamic-linked-static-lib.patch $(3RDP_ROOT)$(DIRSEP)build/terminal-params.patch $(3RDP_ROOT)$(DIRSEP)build/cl-mingw32-static.patch $(3RDP_ROOT)$(DIRSEP)build/cl-ranlib.patch $(3RDP_ROOT)$(DIRSEP)build/cl-PAM-noprompts.patch $(3RDP_ROOT)$(DIRSEP)build/cl-getseed64.patch $(3RDP_ROOT)$(DIRSEP)build/cl-endian.patch $(3RDP_ROOT)$(DIRSEP)build/cl-win32-compile.patch $(3RDP_ROOT)$(DIRSEP)build/cl-win32-compile2.patch $(3RDP_ROOT)$(DIRSEP)build/cl-win32-noasm.patch | $(CRYPT_SRC) $(CRYPT_IDIR) @echo Creating $@ ... $(QUIET)-rm -rf $(CRYPT_SRC)/* $(QUIET)unzip -oa $(3RDPDISTDIR)$(DIRSEP)cryptlib.zip -d $(CRYPT_SRC) @@ -79,6 +79,11 @@ $(CRYPTLIB_BUILD): $(3RDP_ROOT)$(DIRSEP)dist/cryptlib.zip $(3RDP_ROOT)$(DIRSEP)b $(QUIET)patch -p0 -d $(CRYPT_SRC) < cl-ranlib.patch $(QUIET)patch -p0 -d $(CRYPT_SRC) < cl-vcxproj.patch $(QUIET)patch -p0 -d $(CRYPT_SRC) < cl-PAM-noprompts.patch + $(QUIET)patch -p0 -d $(CRYPT_SRC) < cl-getseed64.patch + $(QUIET)patch -p0 -d $(CRYPT_SRC) < cl-endian.patch + $(QUIET)patch -p0 -d $(CRYPT_SRC) < cl-win32-compile.patch + $(QUIET)patch -p0 -d $(CRYPT_SRC) < cl-win32-compile2.patch + $(QUIET)patch -p0 -d $(CRYPT_SRC) < cl-win32-noasm.patch ifeq ($(CC),mingw32-gcc) $(QUIET)cd $(CRYPT_SRC) && env - PATH="$(PATH)" CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" make directories $(QUIET)cd $(CRYPT_SRC) && env - PATH="$(PATH)" CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" make toolscripts diff --git a/3rdp/build/SSL-fix.patch b/3rdp/build/SSL-fix.patch index 8e7124374b6c40e800f09f4015bcab29b549f36c..91583aa27b1bed0d8f3baee279825f827e4f5ba3 100644 --- a/3rdp/build/SSL-fix.patch +++ b/3rdp/build/SSL-fix.patch @@ -1,14 +1,16 @@ ---- session/sess_attr.c.orig 2012-07-13 14:19:07.000000000 -0700 -+++ session/sess_attr.c 2012-07-13 14:21:15.000000000 -0700 -@@ -102,9 +102,11 @@ +--- session/sess_attr.c.orig 2017-07-27 17:58:38.000000000 -0400 ++++ session/sess_attr.c 2018-01-03 01:44:45.682545000 -0500 +@@ -103,11 +103,13 @@ then we can't set a server name as well */ if( sessionInfoPtr->transportSession != CRYPT_ERROR ) return( exitErrorInited( sessionInfoPtr, CRYPT_SESSINFO_SESSION ) ); +/* if( sessionInfoPtr->networkSocket != CRYPT_ERROR ) + { return( exitErrorInited( sessionInfoPtr, CRYPT_SESSINFO_NETWORKSOCKET ) ); + } +*/ /* Parse the server name. The PKI protocols all use HTTP as their - substrate so if it's not SSH or SSL/TLS we require HTTP. For TSP + substrate so if it's not SSH or SSL/TLS we require HTTP */ diff --git a/3rdp/build/cl-endian.patch b/3rdp/build/cl-endian.patch new file mode 100644 index 0000000000000000000000000000000000000000..e4a70b5464501c97bfe8f38717127020c3c9e05d --- /dev/null +++ b/3rdp/build/cl-endian.patch @@ -0,0 +1,28 @@ +--- misc/os_spec.h.orig 2017-07-11 01:49:00.000000000 -0400 ++++ misc/os_spec.h 2018-01-03 03:19:26.025930000 -0500 +@@ -222,10 +222,11 @@ + preprocessors get confused if they aren't defined */ + #define VC_16BIT( version ) 0 + #define VC_LE_VC6( version ) 0 +- #define VC_GE_2002( version ) 0 +- #define VC_LT_2005( version ) 0 ++ #define VC_GE_2002( version ) 1 ++ #define VC_LT_2005( version ) 1 + #define VC_GE_2005( version ) 0 + #define VC_GE_2008( version ) 0 ++ #define VC_LT_2010( version ) 1 + #define VC_GE_2010( version ) 0 + #define VC_GE_2012( version ) 0 + #define VC_GE_2013( version ) 0 +@@ -933,7 +934,10 @@ + test will tell us the endianness under Unix */ + + #ifdef __GNUC__ +- #include <endian.h> ++ /* I suspect the above was supposed to be #ifndef */ ++ #if !(defined(BIG_ENDIAN) || defined(__BYTE_ORDER__) || defined(__LITTLE_ENDIAN__) || defined(BYTES_BIG_ENDIAN)) ++ #include <endian.h> ++ #endif + #endif /* GCC */ + + #if defined( CONFIG_DATA_LITTLEENDIAN ) || defined( CONFIG_DATA_BIGENDIAN ) diff --git a/3rdp/build/cl-getseed64.patch b/3rdp/build/cl-getseed64.patch new file mode 100644 index 0000000000000000000000000000000000000000..765e95e440f50f674b30dd7391e9c58fe69f666f --- /dev/null +++ b/3rdp/build/cl-getseed64.patch @@ -0,0 +1,11 @@ +--- tools/getseed.sh.orig 2017-07-11 01:19:34.000000000 -0400 ++++ tools/getseed.sh 2018-01-03 02:08:08.240258000 -0500 +@@ -16,7 +16,7 @@ + if [ -e /dev/urandom ] ; then + printf -- "-DFIXED_SEED=0x" ; + if [ $IS64BIT -gt 0 ] ; then +- printf "%X\n" `od -An -N8 -tu8 < /dev/urandom` ; ++ printf "%X%X\n" `od -An -N4 -tu4 < /dev/urandom` `od -An -N4 -tu4 < /dev/urandom`; + else + printf "%X\n" `od -An -N4 -tu4 < /dev/urandom` ; + fi ; diff --git a/3rdp/build/cl-mingw32-static.patch b/3rdp/build/cl-mingw32-static.patch index ac21f107a99a2dd0d878dee28d47685a17ed220c..1c46dac7e59f04d1ff9ed964701caa117f0d0114 100644 --- a/3rdp/build/cl-mingw32-static.patch +++ b/3rdp/build/cl-mingw32-static.patch @@ -1,11 +1,11 @@ ---- makefile.orig 2012-12-14 03:31:22.000000000 -0800 -+++ makefile 2014-06-25 01:52:11.000000000 -0700 -@@ -1892,9 +1892,9 @@ +--- makefile.orig 2018-01-03 01:54:50.601991000 -0500 ++++ makefile 2018-01-03 01:55:05.088060000 -0500 +@@ -1879,9 +1879,9 @@ MINGW32_NT-6.1: - @make OSNAME=win32 target-init -- @make $(DEFINES) EXTRAOBJS="$(WIN32ASMOBJS)" \ -+ @make OSNAME=win32 $(DEFINES) EXTRAOBJS="$(WIN32ASMOBJS)" \ + $(MAKE) OSNAME=win32 target-init +- $(MAKE) $(DEFINES) EXTRAOBJS="$(WIN32ASMOBJS)" \ ++ $(MAKE) OSNAME=win32 $(DEFINES) EXTRAOBJS="$(WIN32ASMOBJS)" \ CFLAGS="$(XCFLAGS) -fomit-frame-pointer -O3 \ - -Wl,--subsystem,windows,--output-def,cl32.def" + -Wl,--subsystem,windows,--output-def,cl32.def -DSTATIC_LIB" diff --git a/3rdp/build/cl-ranlib.patch b/3rdp/build/cl-ranlib.patch index 070399558b435cbbf080720891caa1087847e6fc..b84e8658ad2cf0048d1a01d220e5dfb0a0dc8bc7 100644 --- a/3rdp/build/cl-ranlib.patch +++ b/3rdp/build/cl-ranlib.patch @@ -1,14 +1,14 @@ ---- tools/buildlib.sh.orig 2012-11-06 03:55:52.000000000 -0800 -+++ tools/buildlib.sh 2014-06-25 01:59:50.000000000 -0700 +--- tools/buildlib.sh.orig 2017-02-13 23:18:26.000000000 -0500 ++++ tools/buildlib.sh 2018-01-03 01:57:28.155802000 -0500 @@ -75,7 +75,9 @@ echo "Need to set up ucLinux link command" ;; *) -- $AR rcs $LIBNAME $* || \ -- ( $AR rc $LIBNAME $* && ranlib $LIBNAME ) +- $AR rcs "$LIBNAME" "$@" || \ +- ( $AR rc "$LIBNAME" "$@" && ranlib "$LIBNAME" ) + if [ "$RANLIB" = "" ] ; then + RANLIB = ranlib + fi -+ ( $AR rc $LIBNAME $* && $RANLIB $LIBNAME ) ++ ( $AR rc "$LIBNAME" "$@" && $RANLIB "$LIBNAME" ) esac diff --git a/3rdp/build/cl-win32-compile.patch b/3rdp/build/cl-win32-compile.patch new file mode 100644 index 0000000000000000000000000000000000000000..823a8705b80197aacadbe062a9334bdb274de285 --- /dev/null +++ b/3rdp/build/cl-win32-compile.patch @@ -0,0 +1,11 @@ +--- test/certs.c.orig 2018-01-03 02:46:59.742613000 -0500 ++++ test/certs.c 2018-01-03 02:47:14.150003000 -0500 +@@ -17,7 +17,7 @@ + #define _OSSPEC_DEFINED + #if !defined( __WIN32__ ) && ( defined( WIN32 ) || defined( _WIN32 ) ) + #define __WIN32__ +- #elif !defined( __WIN64__ ) defined( _M_X64 ) ++ #elif !defined( __WIN64__ ) && defined( _M_X64 ) + #define __WIN64__ + #endif /* Win32/Win64 */ + #define VC_LT_2005( version ) ( version < 1400 ) diff --git a/3rdp/build/cl-win32-compile2.patch b/3rdp/build/cl-win32-compile2.patch new file mode 100644 index 0000000000000000000000000000000000000000..f90066578d63ad6c464b2e2e866c1f9b01411e8b --- /dev/null +++ b/3rdp/build/cl-win32-compile2.patch @@ -0,0 +1,11 @@ +--- test/ssh.c.orig 2018-01-03 02:55:55.133827000 -0500 ++++ test/ssh.c 2018-01-03 02:56:03.891978000 -0500 +@@ -17,7 +17,7 @@ + #define _OSSPEC_DEFINED + #if !defined( __WIN32__ ) && ( defined( WIN32 ) || defined( _WIN32 ) ) + #define __WIN32__ +- #elif !defined( __WIN64__ ) defined( _M_X64 ) ++ #elif !defined( __WIN64__ ) && defined( _M_X64 ) + #define __WIN64__ + #endif /* Win32/Win64 */ + #define VC_16BIT( version ) ( version <= 800 ) diff --git a/3rdp/build/cl-win32-noasm.patch b/3rdp/build/cl-win32-noasm.patch new file mode 100644 index 0000000000000000000000000000000000000000..acbf4857ecadd9e7dd3120979a75c2b31b17e0ea --- /dev/null +++ b/3rdp/build/cl-win32-noasm.patch @@ -0,0 +1,11 @@ +--- crypt/osconfig.h.orig 2018-01-03 03:42:25.272822000 -0500 ++++ crypt/osconfig.h 2018-01-03 03:42:31.248117000 -0500 +@@ -23,7 +23,7 @@ + Any changes made here need to be reflected in os_spec.h */ + #if !( defined( _WIN32_WCE ) || defined( _M_X64 ) || \ + defined( __BORLANDC__ ) || defined( NO_ASM ) ) +- #define USE_ASM /* Always enabled for x86 Win32 */ ++ //#define USE_ASM /* Always enabled for x86 Win32 */ + #endif /* WinCE || x86-64 || Borland compilers */ + #endif /* OpenSSL Win32 not defined */ + #include <stdlib.h> /* For malloc() */ diff --git a/3rdp/build/terminal-params.patch b/3rdp/build/terminal-params.patch index 442098e30eb9ffa1c99c3e8878d2de19069c0e95..c6850d126d3341398dc5d0b8199625b634f7e4b4 100644 --- a/3rdp/build/terminal-params.patch +++ b/3rdp/build/terminal-params.patch @@ -67,10 +67,10 @@ diff -ur ../cl.patched/session/sess_attr.c ./session/sess_attr.c } + case CRYPT_SESSINFO_SSH_WIDTH: -+ return( addSessionInfo( &sessionInfoPtr->attributeList, ++ return( addSessionInfo( sessionInfoPtr, + CRYPT_SESSINFO_SSH_WIDTH, value ) ); + case CRYPT_SESSINFO_SSH_HEIGHT: -+ return( addSessionInfo( &sessionInfoPtr->attributeList, ++ return( addSessionInfo( sessionInfoPtr, + CRYPT_SESSINFO_SSH_HEIGHT, value ) ); + case CRYPT_SESSINFO_SERVER_PORT: @@ -83,7 +83,7 @@ diff -ur ../cl.patched/session/sess_attr.c ./session/sess_attr.c + case CRYPT_SESSINFO_SSH_TERMINAL: case CRYPT_SESSINFO_SERVER_FINGERPRINT_SHA1: /* Remember the value */ - return( addSessionInfoS( &sessionInfoPtr->attributeList, + return( addSessionInfoS( sessionInfoPtr, @@ -938,6 +949,9 @@ sessionInfoPtr->writeTimeout = CRYPT_ERROR; return( CRYPT_OK ); diff --git a/3rdp/dist/cryptlib.zip b/3rdp/dist/cryptlib.zip index bbbec5579f7de505082b55fbc948618a57a8163e..71eb9ede24fd96d18b37b8cf48bffdbbc80b64eb 100644 Binary files a/3rdp/dist/cryptlib.zip and b/3rdp/dist/cryptlib.zip differ