Check-in [090741a97a]
Overview
Comment: * tls.c (Tls_Init): corrected interpretation of version number (patchlevel and release/serial were swapped).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 090741a97af94e5fe42aa9a2b1f60fcb5c8e07d5
User & Date: hobbs on 2000-08-16 17:44:05
Other Links: manifest | tags
Context
2000-08-16
18:00
* tests/ciphers.test: improved ability to change constraint setting for whether user compiled against RSA or OpenSSL libs. check-in: b46031d19e user: hobbs tags: trunk
17:44
* tls.c (Tls_Init): corrected interpretation of version number (patchlevel and release/serial were swapped). check-in: 090741a97a user: hobbs tags: trunk
2000-08-15
18:49
* tlsInt.h: * tls.c: * tlsIO.c: corrected structure initialization to work when compiling with 8.2. Now compiles with 8.2+ and tested to work with 8.2+ and dynamically adjust to the version of Tcl it was loaded into. TLS will fail the test suite with Tcl 8.2-8.3.1. check-in: e7ef654f47 user: hobbs tags: trunk
Changes
Modified ChangeLog from [1bd81afa71] to [da6f71ec7e].





1
2
3
4
5
6
7





2000-08-15  Jeff Hobbs  <hobbs@scriptics.com>

	* README.txt: added notes about need to use 8.2.0+.

	* tlsInt.h:
	* tls.c:
	* tlsIO.c: corrected structure initialization to work when
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2000-08-16  Jeff Hobbs  <hobbs@scriptics.com>

	* tls.c (Tls_Init): corrected interpretation of version number
	(patchlevel and release/serial were swapped).

2000-08-15  Jeff Hobbs  <hobbs@scriptics.com>

	* README.txt: added notes about need to use 8.2.0+.

	* tlsInt.h:
	* tls.c:
	* tlsIO.c: corrected structure initialization to work when
Modified tls.c from [bc1abaf8b3] to [e741b6dd44].
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * Copyright (C) 1997-1999 Matt Newman <matt@novadigm.com>
 * Copyright (C) 2000 Ajuba Solutions
 *
 * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.c,v 1.10 2000/08/15 18:49:30 hobbs Exp $
 *
 * TLS (aka SSL) Channel - can be layered on any bi-directional
 * Tcl_Channel (Note: Requires Trf Core Patch)
 *
 * This was built (almost) from scratch based upon observation of
 * OpenSSL 0.9.2B
 *




|







1
2
3
4
5
6
7
8
9
10
11
12
/*
 * Copyright (C) 1997-1999 Matt Newman <matt@novadigm.com>
 * Copyright (C) 2000 Ajuba Solutions
 *
 * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.c,v 1.11 2000/08/16 17:44:05 hobbs Exp $
 *
 * TLS (aka SSL) Channel - can be layered on any bi-directional
 * Tcl_Channel (Note: Requires Trf Core Patch)
 *
 * This was built (almost) from scratch based upon observation of
 * OpenSSL 0.9.2B
 *
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
 *-------------------------------------------------------------------
 */

int
Tls_Init(Tcl_Interp *interp)		/* Interpreter in which the package is
                                         * to be made available. */
{
    int major, minor, release, serial;

    /*
     * The original 8.2.0 stacked channel implementation (and the patch
     * that preceded it) had problems with scalability and robustness.
     * These were address in 8.3.2 / 8.4a2, so we now require that as a
     * minimum for TLS 1.4+.  We only support 8.2+ now (8.3.2+ preferred).
     */







|







1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
 *-------------------------------------------------------------------
 */

int
Tls_Init(Tcl_Interp *interp)		/* Interpreter in which the package is
                                         * to be made available. */
{
    int major, minor, patchlevel, release;

    /*
     * The original 8.2.0 stacked channel implementation (and the patch
     * that preceded it) had problems with scalability and robustness.
     * These were address in 8.3.2 / 8.4a2, so we now require that as a
     * minimum for TLS 1.4+.  We only support 8.2+ now (8.3.2+ preferred).
     */
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
    }

    /*
     * Get the version so we can runtime switch on available functionality.
     * TLS should really only be used in 8.3.2+, but the other works for
     * some limited functionality, so an attempt at support is made.
     */
    Tcl_GetVersion(&major, &minor, &release, &serial);
    if ((major > 8) || ((major == 8) && ((minor > 3) || ((minor == 3) &&
	    (release == TCL_FINAL_RELEASE) && (serial >= 2))))) {
	/* 8.3.2+ */
	channelTypeVersion = TLS_CHANNEL_VERSION_2;
    } else {
	/* 8.2.0 - 8.3.1 */
	channelTypeVersion = TLS_CHANNEL_VERSION_1;
    }








|

|







1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
    }

    /*
     * Get the version so we can runtime switch on available functionality.
     * TLS should really only be used in 8.3.2+, but the other works for
     * some limited functionality, so an attempt at support is made.
     */
    Tcl_GetVersion(&major, &minor, &patchlevel, &release);
    if ((major > 8) || ((major == 8) && ((minor > 3) || ((minor == 3) &&
	    (release == TCL_FINAL_RELEASE) && (patchlevel >= 2))))) {
	/* 8.3.2+ */
	channelTypeVersion = TLS_CHANNEL_VERSION_2;
    } else {
	/* 8.2.0 - 8.3.1 */
	channelTypeVersion = TLS_CHANNEL_VERSION_1;
    }