Skip to content
Snippets Groups Projects
Commit 3c0c020f authored by deuce's avatar deuce
Browse files

Update to Cryptlib 3.4.4 beta. This is the currently reccomended version.

The Win32 lib and header still needs to be updated.
parent 37c9bee4
No related branches found
No related tags found
No related merge requests found
--- 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.
......
......@@ -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
......
--- 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 */
--- 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 )
--- 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 ;
--- 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"
......
--- 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
--- 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 )
--- 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 )
--- 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() */
......@@ -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 );
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment