Check-in [f79122ae17]
Bounty program for improvements to Tcl and certain Tcl packages.
Overview
Comment:Updated to fatally fail if the handshake fatally fails
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f79122ae17687a1a3e945cc7362949ad57ccc077
User & Date: rkeene on 2016-12-13 08:48:33
Other Links: manifest | tags
References
2016-12-13
15:29
Reverted [f79122ae17] check-in: 50d8da007b user: rkeene tags: trunk
Context
2016-12-13
15:29
Reverted [f79122ae17] check-in: 50d8da007b user: rkeene tags: trunk
08:48
Updated to fatally fail if the handshake fatally fails check-in: f79122ae17 user: rkeene tags: trunk
08:30
Added new remote file check-in: a81aa8026e user: rkeene tags: trunk
Changes

Modified tlsIO.c from [cd83a9c489] to [3765b3df61].

   212    212   		return(0);
   213    213   	}
   214    214   
   215    215   	dprintf("Calling Tls_WaitForConnect");
   216    216   	tlsConnect = Tls_WaitForConnect(statePtr, errorCodePtr);
   217    217   	if (tlsConnect < 0) {
   218    218   		dprintf("Got an error waiting to connect (tlsConnect = %i, *errorCodePtr = %i)", tlsConnect, *errorCodePtr);
          219  +
          220  +		if (statePtr->flags & TLS_TCL_HANDSHAKE_FAILED) {
          221  +			dprintf("The handshake completely failed, returning in failure");
          222  +			return(-1);
          223  +		}
   219    224   
   220    225   		bytesRead = -1;
   221    226   		if (*errorCodePtr == ECONNRESET) {
   222    227   			dprintf("Got connection reset");
   223    228   			/* Soft EOF */
   224    229   			*errorCodePtr = 0;
   225    230   			bytesRead = 0;
................................................................................
   336    341   		return(-1);
   337    342   	}
   338    343   
   339    344   	dprintf("Calling Tls_WaitForConnect");
   340    345   	tlsConnect = Tls_WaitForConnect(statePtr, errorCodePtr);
   341    346   	if (tlsConnect < 0) {
   342    347   		dprintf("Got an error waiting to connect (tlsConnect = %i, *errorCodePtr = %i)", tlsConnect, *errorCodePtr);
          348  +
          349  +		if (statePtr->flags & TLS_TCL_HANDSHAKE_FAILED) {
          350  +			dprintf("The handshake completely failed, returning in failure");
          351  +			return(-1);
          352  +		}
   343    353   
   344    354   		written = -1;
   345    355   		if (*errorCodePtr == ECONNRESET) {
   346    356   			dprintf("Got connection reset");
   347    357   			/* Soft EOF */
   348    358   			*errorCodePtr = 0;
   349    359   			written = 0;