Index: ChangeLog ================================================================== --- ChangeLog +++ ChangeLog @@ -1,6 +1,9 @@ 2000-07-26 Jeff Hobbs + + * tests/tlsIO.test: updated comments, fixed a pcCrash case that + was due to debug assertion in Windows SSL. * tls.c (ImportObjCmd): removed unnecessary use of 'bio' arg. (Tls_Init): check return value of SSL_library_init. Also lots of whitespace cleanup (more like Tcl Eng style guide), but not all code was cleaned up. Index: tests/tlsIO.test ================================================================== --- tests/tlsIO.test +++ tests/tlsIO.test @@ -8,11 +8,11 @@ # Copyright (c) 1998-2000 Ajuba Solutions. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tlsIO.test,v 1.14.2.4 2000/07/21 05:32:57 hobbs Exp $ +# RCS: @(#) $Id: tlsIO.test,v 1.14.2.5 2000/07/26 23:11:46 hobbs Exp $ # Running socket tests with a remote server: # ------------------------------------------ # # Some tests in socket.test depend on the existence of a remote server to @@ -671,11 +671,14 @@ close $s close $sock set result } {a:one b: c:two} -test tlsIO-2.12 {tcp connection; no certificates specified} {socket stdio pcCrash} { +test tlsIO-2.12 {tcp connection; no certificates specified} \ + {socket stdio unixOnly} { + # There is a debug assertion on Windows/SSL that causes a crash when the + # certificate isn't specified. removeFile script set f [open script w] puts $f { package require tls set timer [after 2000 "set x timed_out"] @@ -795,10 +798,11 @@ close $f set x } {ready done} test tlsIO-4.1 {server with several clients} {socket stdio} { + # have seen intermittent hangs on Windows removeFile script set f [open script w] puts $f { package require tls gets stdin @@ -899,40 +903,29 @@ close $msg } set x } {couldn't open socket: not owner} -if {0} { - package require tls - - proc accept {s a p} { - puts [info level 0] - expr 10 / 0 - } - set s [tls::socket -server accept 8848] - - proc bgerror args { puts "bgerror: $args" } - set s [tls::socket zamora.scriptics.com 8848] -} - -test tlsIO-6.1 {accept callback error} { socket stdio pcCrash} { - # HOBBS: still fails post-rewrite +test tlsIO-6.1 {accept callback error} {socket stdio} { + # There is a debug assertion on Windows/SSL that causes a crash when the + # certificate isn't specified. removeFile script set f [open script w] puts $f { package require tls gets stdin - tls::socket 127.0.0.1 8848 } + puts $f [list tls::socket -cafile $caCert 127.0.0.1 8848] close $f set f [open "|[list $::tcltest::tcltest script]" r+] proc bgerror args { global x set x $args } proc accept {s a p} {expr 10 / 0} - set s [tls::socket -server accept 8848] + set s [tls::socket -server accept \ + -certfile $serverCert -cafile $caCert -keyfile $serverKey 8848] puts $f hello close $f set timer [after 10000 "set x timed_out"] vwait x after cancel $timer @@ -939,19 +932,18 @@ close $s rename bgerror {} set x } {{divide by zero}} -# bug report #5812 fconfigure doesn't return value for '-peername' - test tlsIO-7.1 {testing socket specific options} {socket stdio} { removeFile script set f [open script w] puts $f { package require tls } - puts $f "tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8820" + puts $f [list tls::socket -server accept \ + -certfile $serverCert -cafile $caCert -keyfile $serverKey 8820] puts $f { proc accept args { global x set x done } @@ -973,12 +965,10 @@ lappend l [string compare [lindex $p 0] 127.0.0.1] lappend l [string compare [lindex $p 2] 8820] lappend l [llength $p] } {0 0 3} -# bug report #5812 fconfigure doesn't return value for '-sockname' - test tlsIO-7.2 {testing socket specific options} {socket stdio} { removeFile script set f [open script w] puts $f { package require tls @@ -1843,11 +1833,12 @@ vwait failed } set x } {client socket was not inherited} -test tlsIO-12.3 {testing inheritance of accepted sockets} {socket exec} { +test tlsIO-12.3 {testing inheritance of accepted sockets} \ + {socket exec unixOnly} { makeFile {} script1 makeFile {} script2 set f [open script1 w] puts $f {