Check-in [090741a97a]
Bounty program for improvements to Tcl and certain Tcl packages.
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  +2000-08-16  Jeff Hobbs  <[email protected]>
            2  +
            3  +	* tls.c (Tls_Init): corrected interpretation of version number
            4  +	(patchlevel and release/serial were swapped).
            5  +
     1      6   2000-08-15  Jeff Hobbs  <[email protected]>
     2      7   
     3      8   	* README.txt: added notes about need to use 8.2.0+.
     4      9   
     5     10   	* tlsInt.h:
     6     11   	* tls.c:
     7     12   	* tlsIO.c: corrected structure initialization to work when

Modified tls.c from [bc1abaf8b3] to [e741b6dd44].

     1      1   /*
     2      2    * Copyright (C) 1997-1999 Matt Newman <[email protected]>
     3      3    * Copyright (C) 2000 Ajuba Solutions
     4      4    *
     5         - * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.c,v 1.10 2000/08/15 18:49:30 hobbs Exp $
            5  + * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.c,v 1.11 2000/08/16 17:44:05 hobbs Exp $
     6      6    *
     7      7    * TLS (aka SSL) Channel - can be layered on any bi-directional
     8      8    * Tcl_Channel (Note: Requires Trf Core Patch)
     9      9    *
    10     10    * This was built (almost) from scratch based upon observation of
    11     11    * OpenSSL 0.9.2B
    12     12    *
................................................................................
  1135   1135    *-------------------------------------------------------------------
  1136   1136    */
  1137   1137   
  1138   1138   int
  1139   1139   Tls_Init(Tcl_Interp *interp)		/* Interpreter in which the package is
  1140   1140                                            * to be made available. */
  1141   1141   {
  1142         -    int major, minor, release, serial;
         1142  +    int major, minor, patchlevel, release;
  1143   1143   
  1144   1144       /*
  1145   1145        * The original 8.2.0 stacked channel implementation (and the patch
  1146   1146        * that preceded it) had problems with scalability and robustness.
  1147   1147        * These were address in 8.3.2 / 8.4a2, so we now require that as a
  1148   1148        * minimum for TLS 1.4+.  We only support 8.2+ now (8.3.2+ preferred).
  1149   1149        */
................................................................................
  1158   1158       }
  1159   1159   
  1160   1160       /*
  1161   1161        * Get the version so we can runtime switch on available functionality.
  1162   1162        * TLS should really only be used in 8.3.2+, but the other works for
  1163   1163        * some limited functionality, so an attempt at support is made.
  1164   1164        */
  1165         -    Tcl_GetVersion(&major, &minor, &release, &serial);
         1165  +    Tcl_GetVersion(&major, &minor, &patchlevel, &release);
  1166   1166       if ((major > 8) || ((major == 8) && ((minor > 3) || ((minor == 3) &&
  1167         -	    (release == TCL_FINAL_RELEASE) && (serial >= 2))))) {
         1167  +	    (release == TCL_FINAL_RELEASE) && (patchlevel >= 2))))) {
  1168   1168   	/* 8.3.2+ */
  1169   1169   	channelTypeVersion = TLS_CHANNEL_VERSION_2;
  1170   1170       } else {
  1171   1171   	/* 8.2.0 - 8.3.1 */
  1172   1172   	channelTypeVersion = TLS_CHANNEL_VERSION_1;
  1173   1173       }
  1174   1174