Index: ChangeLog ================================================================== --- ChangeLog +++ ChangeLog @@ -1,21 +1,33 @@ +2008-03-19 Jeff Hobbs + + * tls.c (Tls_Clean, ImportObjCmd): Fix cleanup mem leak [Bug 1414045] + 2008-03-19 Pat Thoyts * win/Makefile.vc Updated the nmake build files with MSVC9 support * win/rules.vc: and fixed to run the test-suite properly. * win/nmakehlp.c: * tls.tcl (tls::initlib): Corrected namespace handling. * tls.c: Applied #1890223 to fix handshake on non-blocking sockets + +2008-03-17 Jeff Hobbs + + * tls.tcl (tls::initlib): load tls.tcl first and call + * Makefile.in (pkgIndex.tcl): tls::initlib to load library to + handle cwd changes. [Bug 1888113] 2007-09-06 Pat Thoyts * tls.c: Silence 64 bit integer conversion warnings * win/nmakehlp.c: Update build system to support AMD64 target * win/makefile.vc: with MSVC8 * win/rules.vc: 2007-06-22 Jeff Hobbs + + * configure.in, configure, win/makefile.vc (DOTVERSION): bump to 1.6 * tlsIO.c (TlsInputProc, TlsOutputProc, TlsWatchProc): * tls.c (VerifyCallback): add an state flag in the verify callback that prevents possibly recursion (on 'update'). [Bug 1652380] Index: tls.c ================================================================== --- tls.c +++ tls.c @@ -3,11 +3,11 @@ * some modifications: * Copyright (C) 2000 Ajuba Solutions * Copyright (C) 2002 ActiveState Corporation * Copyright (C) 2004 Starfish Systems * - * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.c,v 1.27 2008/03/19 02:34:21 patthoyts Exp $ + * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.c,v 1.28 2008/03/19 19:59:40 hobbs2 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 @@ -861,11 +861,11 @@ SSL_set_accept_state(statePtr->ssl); } else { SSL_set_connect_state(statePtr->ssl); } SSL_set_bio(statePtr->ssl, statePtr->p_bio, statePtr->p_bio); - BIO_set_ssl(statePtr->bio, statePtr->ssl, BIO_CLOSE); + BIO_set_ssl(statePtr->bio, statePtr->ssl, BIO_NOCLOSE); /* * End of SSL Init */ Tcl_SetResult(interp, (char *) Tcl_GetChannelName(statePtr->self), @@ -1360,12 +1360,18 @@ if (statePtr->timer != (Tcl_TimerToken) NULL) { Tcl_DeleteTimerHandler(statePtr->timer); statePtr->timer = NULL; } + if (statePtr->bio) { + /* This will call SSL_shutdown. Bug 1414045 */ + dprintf(stderr, "BIO_free_all(%p)\n", statePtr->bio); + BIO_free_all(statePtr->bio); + statePtr->bio = NULL; + } if (statePtr->ssl) { - SSL_shutdown(statePtr->ssl); + dprintf(stderr, "SSL_free(%p)\n", statePtr->ssl); SSL_free(statePtr->ssl); statePtr->ssl = NULL; } if (statePtr->ctx) { SSL_CTX_free(statePtr->ctx);