components/tcltls/patches/tls.tcl.patch
author Raymond Chen <Raymond.Chen@Oracle.COM>
Tue, 20 Jan 2015 18:52:44 -0700
changeset 3655 609589e82875
parent 404 f62f2053b654
permissions -rw-r--r--
20231111 problem in LIBRARY/LIBTLS
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3655
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
     1
This is in-house developed Solaris-specific patch and will not be submitted to upstream.
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
     2
404
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
     3
--- tls1.6/tls.tcl	Thu Mar 20 03:52:12 2008
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
     4
+++ tls1.6/tls.tcl	Mon Apr 21 16:36:08 2008
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
     5
@@ -26,6 +26,9 @@
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
     6
     # Irrelevant to unixoids, but for Windows this enables the OS to find
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
     7
     # the dependent DLL's in the CWD, where they may be.
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
     8
     set cwd [pwd]
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
     9
+    if {$::tcl_platform(wordSize) == 8} {
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    10
+	append dir "/64"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    11
+    }
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    12
     catch {cd $dir}
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    13
     set res [catch {uplevel #0 [list load [file join [pwd] $dll]]} err]
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    14
     catch {cd $cwd}
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    15
--- tls1.6/configure	Wed Mar 19 15:37:51 2008
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    16
+++ tls1.6/configure	Mon Jul  4 23:20:00 2011
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    17
@@ -8738,8 +8738,8 @@
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    18
 echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    19
 		    else
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    20
 			do64bit_ok=yes
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    21
-			CFLAGS="$CFLAGS -xarch=amd64"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    22
-			LDFLAGS="$LDFLAGS -xarch=amd64"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    23
+			CFLAGS="$CFLAGS -m64"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    24
+			LDFLAGS="$LDFLAGS -m64"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    25
 		    fi
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    26
 		else
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    27
 		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    28
@@ -10126,7 +10126,12 @@
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    29
     eval "LD_SEARCH_FLAGS=\"${LD_SEARCH_FLAGS}\""
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    30
     if test -n "${OPENSSL}"; then
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    31
 
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    32
-    vars="${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    33
+    if test "${with_ssl_dir+set}" = set; then
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    34
+        vars="${LD_SEARCH_FLAGS} -L${SSL_LIB_DIR} -lssl -lcrypto ${GCCPATH} ${GCCLIB}"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    35
+    else
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    36
+        vars="${LD_SEARCH_FLAGS} -lssl -lcrypto ${GCCPATH} ${GCCLIB}"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    37
+    fi
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    38
+
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    39
     for i in $vars; do
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    40
 	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    41
 	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    42
@@ -10170,6 +10175,11 @@
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    43
         else
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    44
             TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    45
         fi
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    46
+        if test "$do64bit_ok" = "yes" ; then
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    47
+            TCLSH_PROG="${TCL_BIN_DIR}/${MACH64DIR}/${TCLSH_PROG}"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    48
+        else
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    49
+            TCLSH_PROG="${TCL_BIN_DIR}/${TCLSH_PROG}"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    50
+        fi
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    51
     else
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    52
         # tclConfig.sh is in install location
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    53
         if test "${TEA_PLATFORM}" = "windows"; then
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    54
@@ -10186,7 +10196,11 @@
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    55
                 break
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    56
             fi
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    57
         done
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    58
-        TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    59
+        if test "$do64bit_ok" = "yes" ; then
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    60
+            TCLSH_PROG="${REAL_TCL_BIN_DIR}/${MACH64DIR}/${TCLSH_PROG}"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    61
+        else
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    62
+            TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}"
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    63
+        fi
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    64
     fi
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    65
     echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
f62f2053b654 7063147 migrate tcltls from SFW to userland
Liam Li<Liam.Li@Oracle.COM>
parents:
diff changeset
    66
 echo "${ECHO_T}${TCLSH_PROG}" >&6
3655
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    67
--- tls1.6/tls.c       Wed Mar 19 16:06:13 2008
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    68
+++ tls1.6/tls.c       Mon Jan 12 22:51:46 2015
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    69
@@ -676,17 +676,17 @@
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    70
 #if defined(NO_SSL2)
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    71
     int ssl2 = 0;
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    72
 #else
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    73
-    int ssl2 = 1;
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    74
+    int ssl2 = 0;
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    75
 #endif
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    76
 #if defined(NO_SSL3)
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    77
     int ssl3 = 0;
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    78
 #else
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    79
-    int ssl3 = 1;
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    80
+    int ssl3 = 0;
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    81
 #endif
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    82
 #if defined(NO_SSL2) && defined(NO_SSL3)
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    83
     int tls1 = 1;
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    84
 #else
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    85
-    int tls1 = 0;
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    86
+    int tls1 = 1;
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    87
 #endif
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    88
     int proto = 0;
609589e82875 20231111 problem in LIBRARY/LIBTLS
Raymond Chen <Raymond.Chen@Oracle.COM>
parents: 404
diff changeset
    89
     int verify = 0, require = 0, request = 1;