Check-in [cdcb07f969]
Overview
SHA1:cdcb07f969aeebb785359132d385b639ee79f700
Date: 2015-10-28 15:49:44
User: rkeene
Comment:More patches to try to make TLS 1.6.7 work
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-02-12
16:56
[70021142fe] Start testing 8.5.19 (user: rkeene, tags: trunk)
2015-12-14
21:01
[2ec7ce2722] Experimental adjustments to the install targets for Win32. (user: mistachkin, tags: win32-install)
2015-10-28
15:49
[cdcb07f969] More patches to try to make TLS 1.6.7 work (user: rkeene, tags: trunk)
15:28
[e2c7a97b27] Updated TLS package to 1.6.7, still needs lots of testing since the new TLS package is apparently really broken (user: rkeene, tags: trunk)
Changes

Modified tls/build.sh from [6f7681a2e1] to [eaa77b3a1b].

93
94
95
96
97
98
99

100




101
102
103
104
105
106
107
...
108
109
110
111
112
113
114





115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
155
156
157
158
159
160
161
162


163
164
165
166
167
168
169
170
171

172
173
174
175
176
177
178
179
180
		tryopts="--disable-shared"
	fi

	# Disable SSLv2, newer SSL libraries drop support for it entirely
	CFLAGS="${CFLAGS} -DNO_SSL2=1"

	SAVE_CFLAGS="${CFLAGS}"

	for tryopt in $tryopts __fail__; do




		# Clean up, if needed
		make distclean >/dev/null 2>/dev/null
		rm -rf "${INSTDIR}"
		mkdir "${INSTDIR}"

		if [ "${tryopt}" = "__fail__" ]; then
			exit 1
................................................................................
		fi

		if [ "${tryopt}" == "--enable-shared" ]; then
			isshared="1"
		else
			isshared="0"
		fi






		# If build a static TLS for KitDLL, ensure that we use PIC
		# so that it can be linked into the shared object
		if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then
			CFLAGS="${SAVE_CFLAGS} -fPIC"
		else
			CFLAGS="${SAVE_CFLAGS}"
		fi
		export CFLAGS

		if [ "${isshared}" = '0' ]; then
			sed 's@USE_TCL_STUBS@XXX_TCL_STUBS@g' configure > configure.new
		else
			sed 's@XXX_TCL_STUBS@USE_TCL_STUBS@g' configure > configure.new
		fi
		cat configure.new > configure
................................................................................
package ifneeded tls ${TLSVERS} \
    "[list source [file join \$dir tls.tcl]] ; \
     [list load {} tls]"
_EOF_
	fi

	# Determine name of static object
	LINKADDFILE="$(find "${INSTDIR}" -name '*.a' | head -n 1).linkadd"



	## XXX: TODO: Determine what we actually need to link against
	addlibs="-L${SSL_LIB_DIR:-/lib} -lssl -lcrypto ${KC_TLS_LINKADD}"
	addlibs_staticOnly=""
	if [ "${KC_TLS_LINKSSLSTATIC}" = '1' ]; then
		echo "-Wl,-Bstatic ${addlibs} ${addlibs_staticOnly} -Wl,-Bdynamic"
	else
		echo "${addlibs}"
	fi > "${LINKADDFILE}"


	# Install files needed by installation
	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --

	exit 0
) || exit 1

exit 0







>

>
>
>
>







 







>
>
>
>
>




<
<
|

<







 







|
>
>

|
|
|
|
|
|
|
|
>









93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
...
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128


129
130

131
132
133
134
135
136
137
...
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
		tryopts="--disable-shared"
	fi

	# Disable SSLv2, newer SSL libraries drop support for it entirely
	CFLAGS="${CFLAGS} -DNO_SSL2=1"

	SAVE_CFLAGS="${CFLAGS}"
	SAVE_LIBS="${LIBS}"
	for tryopt in $tryopts __fail__; do
		CFLAGS="${SAVE_CFLAGS}"
		LIBS="${SAVE_LIBS}"
		export CFLAGS LIBS

		# Clean up, if needed
		make distclean >/dev/null 2>/dev/null
		rm -rf "${INSTDIR}"
		mkdir "${INSTDIR}"

		if [ "${tryopt}" = "__fail__" ]; then
			exit 1
................................................................................
		fi

		if [ "${tryopt}" == "--enable-shared" ]; then
			isshared="1"
		else
			isshared="0"
		fi

		# If building a shared TLS, add the LINKADD libraries here
		if [ "${isshared}" = '1' ]; then
			LIBS="${LIBS} ${KC_TLS_LINKADD}"
		fi

		# If build a static TLS for KitDLL, ensure that we use PIC
		# so that it can be linked into the shared object
		if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then


			CFLAGS="${CFLAGS} -fPIC"
		fi


		if [ "${isshared}" = '0' ]; then
			sed 's@USE_TCL_STUBS@XXX_TCL_STUBS@g' configure > configure.new
		else
			sed 's@XXX_TCL_STUBS@USE_TCL_STUBS@g' configure > configure.new
		fi
		cat configure.new > configure
................................................................................
package ifneeded tls ${TLSVERS} \
    "[list source [file join \$dir tls.tcl]] ; \
     [list load {} tls]"
_EOF_
	fi

	# Determine name of static object
	LINKADDFILE="$(find "${INSTDIR}" -name '*.a' | head -n 1)"
	if [ -n "${LINKADDFILE}" ]; then
		LINKADDFILE="${LINKADDFILE}.linkadd"

		## XXX: TODO: Determine what we actually need to link against
		addlibs="-L${SSL_LIB_DIR:-/lib} -lssl -lcrypto ${KC_TLS_LINKADD}"
		addlibs_staticOnly=""
		if [ "${KC_TLS_LINKSSLSTATIC}" = '1' ]; then
			echo "-Wl,-Bstatic ${addlibs} ${addlibs_staticOnly} -Wl,-Bdynamic"
		else
			echo "${addlibs}"
		fi > "${LINKADDFILE}"
	fi

	# Install files needed by installation
	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --

	exit 0
) || exit 1

exit 0

Modified tls/patches/all/tls-1.6.7-fixcrosscompile.diff from [91ef31212c] to [66976acd97].













1
2
3
4
5
6
7
8
9
10
..
39
40
41
42
43
44
45





















diff -uNr tls1.6.7.orig/configure tls1.6.7-fixcrosscompile/configure
--- tls1.6.7.orig/configure	2015-07-07 12:16:02.000000000 -0500
+++ tls1.6.7-fixcrosscompile/configure	2015-10-28 09:59:25.414214000 -0500
@@ -1387,7 +1387,9 @@
 fi
 
 	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
+		if [ -z "${TEA_PLATFORM}" ]; then
+			TEA_PLATFORM="windows"
................................................................................
-		    TEA_PLATFORM="unix"
+			if [ -z "${TEA_PLATFORM}" ]; then
+				TEA_PLATFORM="unix"
+			fi
 		    echo "$as_me:$LINENO: result: unix" >&5
 echo "${ECHO_T}unix" >&6
 		    ;;









>
>
>
>
>
>
>
>
>
>
>
>


|







 







>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
diff -uNr tls1.6.7.orig/Makefile.in tls1.6.7-fixcrosscompile/Makefile.in
--- tls1.6.7.orig/Makefile.in	2010-08-11 20:28:06.000000000 -0500
+++ tls1.6.7-fixcrosscompile/Makefile.in	2015-10-28 10:47:10.714214000 -0500
@@ -229,7 +229,7 @@
 $(PKG_LIB_FILE): $(PKG_OBJECTS)
 	-rm -f $(PKG_LIB_FILE)
 	${MAKE_LIB}
-	$(RANLIB) $(PKG_LIB_FILE)
+	-$(RANLIB) $(PKG_LIB_FILE)
 
 #========================================================================
 # We need to enumerate the list of .c to .o lines here.
diff -uNr tls1.6.7.orig/configure tls1.6.7-fixcrosscompile/configure
--- tls1.6.7.orig/configure	2015-07-07 12:16:02.000000000 -0500
+++ tls1.6.7-fixcrosscompile/configure	2015-10-28 10:42:09.324214000 -0500
@@ -1387,7 +1387,9 @@
 fi
 
 	    EXEEXT=".exe"
-	    TEA_PLATFORM="windows"
+		if [ -z "${TEA_PLATFORM}" ]; then
+			TEA_PLATFORM="windows"
................................................................................
-		    TEA_PLATFORM="unix"
+			if [ -z "${TEA_PLATFORM}" ]; then
+				TEA_PLATFORM="unix"
+			fi
 		    echo "$as_me:$LINENO: result: unix" >&5
 echo "${ECHO_T}unix" >&6
 		    ;;
@@ -10316,7 +10324,7 @@
     fi
     if test -n "${OPENSSL}"; then
 
-    vars="ssleay32.lib libeay32.lib"
+    vars="ssl.lib crypto.lib"
     for i in $vars; do
 	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
 	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib