Posted to tcl by pascal at Wed Oct 02 12:54:52 GMT 2024view raw
- pascal@kaylee tcltls-1505883e4a % ./configure --with-tcl=/opt/homebrew/lib/ --with-openssl-dir=/opt/homebrew/
- checking TEA configuration... ok (TEA 3.13)
- configure: configuring tls 1.8.0
- checking system version... Darwin-24.1.0
- checking for Tcl configuration... found /opt/homebrew/lib/tclConfig.sh
- checking for gcc... gcc
- checking whether the C compiler works... yes
- checking for C compiler default output file name... a.out
- checking for suffix of executables...
- checking whether we are cross compiling... no
- checking for suffix of object files... o
- checking whether the compiler supports GNU C... yes
- checking whether gcc accepts -g... yes
- checking for gcc option to enable C11 features... none needed
- checking for existence of /opt/homebrew/lib/tclConfig.sh... loading
- checking platform... unix
- configure: --prefix defaulting to TCL_PREFIX /opt/homebrew/Cellar/tcl-tk/8.6.15
- configure: --exec-prefix defaulting to TCL_EXEC_PREFIX /opt/homebrew/Cellar/tcl-tk/8.6.15
- checking for gcc... (cached) gcc
- checking whether the compiler supports GNU C... (cached) yes
- checking whether gcc accepts -g... (cached) yes
- checking for gcc option to enable C11 features... (cached) none needed
- checking how to run the C preprocessor... gcc -E
- checking whether make sets $(MAKE)... yes
- checking for ranlib... ranlib
- checking for stdio.h... yes
- checking for stdlib.h... yes
- checking for string.h... yes
- checking for inttypes.h... yes
- checking for stdint.h... yes
- checking for strings.h... yes
- checking for sys/stat.h... yes
- checking for sys/types.h... yes
- checking for unistd.h... yes
- checking if the compiler understands -pipe... yes
- checking whether byte ordering is bigendian... no
- checking for Tcl public headers... /opt/homebrew/Cellar/tcl-tk/8.6.15/include/tcl-tk
- checking for pthread_mutex_init in -lpthread... yes
- checking for building with threads... yes (default)
- checking how to build libraries... shared
- checking for ranlib... (cached) ranlib
- checking if 64bit support is requested... no
- checking if 64bit Sparc VIS support is requested... no
- checking if compiler supports visibility "hidden"... yes
- checking if rpath support is requested... yes
- checking system version... (cached) Darwin-24.1.0
- checking for ar... ar
- checking if ld accepts -single_module flag... yes
- checking if ld accepts -search_paths_first flag... yes
- checking for cast to union support... yes
- checking for stdbool.h... yes
- checking for required early compiler flags... none
- checking for 64-bit integer type... yes
- checking for build with symbols... no
- checking for egrep -e... /opt/homebrew/bin/ggrep -E
- checking for pkg-config... pkg-config
- checking for debug mode... no
- checking for fast path... no
- checking for enable hardening... yes
- checking for static linking of openSSL libraries... no
- checking for OpenSSL directory... /opt/homebrew/
- checking for OpenSSL include directory... /opt/homebrew//include
- checking for ssl.h... yes
- checking for OpenSSL lib directory... /opt/homebrew//lib
- checking for OpenSSL pkgconfig...
- Unknown option --list-package-names
- checking for tclsh... /opt/homebrew/bin/tclsh8.6
- configure: creating ./config.status
- config.status: creating Makefile
- config.status: creating pkgIndex.tcl
- pascal@kaylee tcltls-1505883e4a % make test
- gcc -DPACKAGE_NAME=\"tls\" -DPACKAGE_TARNAME=\"tls\" -DPACKAGE_VERSION=\"1.8.0\" -DPACKAGE_STRING=\"tls\ 1.8.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DBUILD_tls=/\*\*/ -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DTcl_Size=int -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DUSE_TCL_STUBS=1 -DUSE_TCLOO_STUBS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DHAVE_CAST_TO_UNION=1 -DHAVE_STDBOOL_H=1 -DTCL_WIDE_INT_IS_LONG=1 -DTCL_CFG_OPTIMIZED=1 -DUSE_TCL_STUBS=1 -DTCL_MAJOR_VERSION=8 -DNO_SSL3=1 -D_FORTIFY_SOURCE=2 -fstack-protector-all -fno-strict-overflow -I/opt/homebrew//include -Wno-deprecated-declarations -I/opt/homebrew//include -I"/opt/homebrew/Cellar/tcl-tk/8.6.15/include/tcl-tk" -I. -Os -DNDEBUG -Wall -fno-common -pipe -Os -DNDEBUG -Wall -fno-common -c `echo ./generic/tls.c` -o tls.o
- ./generic/tls.c:1769:18: warning: variable 'abort' set but not used [-Wunused-but-set-variable]
- 1769 | int off = 0, abort = 0;
- | ^
- ./generic/tls.c:2222:11: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
- 2222 | if (mode && SSL_VERIFY_FAIL_IF_NO_PEER_CERT) {
- | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ./generic/tls.c:2222:11: note: use '&' for a bitwise operation
- 2222 | if (mode && SSL_VERIFY_FAIL_IF_NO_PEER_CERT) {
- | ^~
- | &
- ./generic/tls.c:2222:11: note: remove constant to silence this warning
- 2222 | if (mode && SSL_VERIFY_FAIL_IF_NO_PEER_CERT) {
- | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ./generic/tls.c:2225:11: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
- 2225 | if (mode && SSL_VERIFY_CLIENT_ONCE) {
- | ^ ~~~~~~~~~~~~~~~~~~~~~~
- ./generic/tls.c:2225:11: note: use '&' for a bitwise operation
- 2225 | if (mode && SSL_VERIFY_CLIENT_ONCE) {
- | ^~
- | &
- ./generic/tls.c:2225:11: note: remove constant to silence this warning
- 2225 | if (mode && SSL_VERIFY_CLIENT_ONCE) {
- | ^~~~~~~~~~~~~~~~~~~~~~~~~
- ./generic/tls.c:2228:11: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
- 2228 | if (mode && SSL_VERIFY_POST_HANDSHAKE) {
- | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
- ./generic/tls.c:2228:11: note: use '&' for a bitwise operation
- 2228 | if (mode && SSL_VERIFY_POST_HANDSHAKE) {
- | ^~
- | &
- ./generic/tls.c:2228:11: note: remove constant to silence this warning
- 2228 | if (mode && SSL_VERIFY_POST_HANDSHAKE) {
- | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 4 warnings generated.
- gcc -DPACKAGE_NAME=\"tls\" -DPACKAGE_TARNAME=\"tls\" -DPACKAGE_VERSION=\"1.8.0\" -DPACKAGE_STRING=\"tls\ 1.8.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DBUILD_tls=/\*\*/ -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DTcl_Size=int -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DUSE_TCL_STUBS=1 -DUSE_TCLOO_STUBS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DHAVE_CAST_TO_UNION=1 -DHAVE_STDBOOL_H=1 -DTCL_WIDE_INT_IS_LONG=1 -DTCL_CFG_OPTIMIZED=1 -DUSE_TCL_STUBS=1 -DTCL_MAJOR_VERSION=8 -DNO_SSL3=1 -D_FORTIFY_SOURCE=2 -fstack-protector-all -fno-strict-overflow -I/opt/homebrew//include -Wno-deprecated-declarations -I/opt/homebrew//include -I"/opt/homebrew/Cellar/tcl-tk/8.6.15/include/tcl-tk" -I. -Os -DNDEBUG -Wall -fno-common -pipe -Os -DNDEBUG -Wall -fno-common -c `echo ./generic/tlsBIO.c` -o tlsBIO.o
- gcc -DPACKAGE_NAME=\"tls\" -DPACKAGE_TARNAME=\"tls\" -DPACKAGE_VERSION=\"1.8.0\" -DPACKAGE_STRING=\"tls\ 1.8.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DBUILD_tls=/\*\*/ -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DTcl_Size=int -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DUSE_TCL_STUBS=1 -DUSE_TCLOO_STUBS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DHAVE_CAST_TO_UNION=1 -DHAVE_STDBOOL_H=1 -DTCL_WIDE_INT_IS_LONG=1 -DTCL_CFG_OPTIMIZED=1 -DUSE_TCL_STUBS=1 -DTCL_MAJOR_VERSION=8 -DNO_SSL3=1 -D_FORTIFY_SOURCE=2 -fstack-protector-all -fno-strict-overflow -I/opt/homebrew//include -Wno-deprecated-declarations -I/opt/homebrew//include -I"/opt/homebrew/Cellar/tcl-tk/8.6.15/include/tcl-tk" -I. -Os -DNDEBUG -Wall -fno-common -pipe -Os -DNDEBUG -Wall -fno-common -c `echo ./generic/tlsIO.c` -o tlsIO.o
- gcc -DPACKAGE_NAME=\"tls\" -DPACKAGE_TARNAME=\"tls\" -DPACKAGE_VERSION=\"1.8.0\" -DPACKAGE_STRING=\"tls\ 1.8.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DBUILD_tls=/\*\*/ -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DTcl_Size=int -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DUSE_TCL_STUBS=1 -DUSE_TCLOO_STUBS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DHAVE_CAST_TO_UNION=1 -DHAVE_STDBOOL_H=1 -DTCL_WIDE_INT_IS_LONG=1 -DTCL_CFG_OPTIMIZED=1 -DUSE_TCL_STUBS=1 -DTCL_MAJOR_VERSION=8 -DNO_SSL3=1 -D_FORTIFY_SOURCE=2 -fstack-protector-all -fno-strict-overflow -I/opt/homebrew//include -Wno-deprecated-declarations -I/opt/homebrew//include -I"/opt/homebrew/Cellar/tcl-tk/8.6.15/include/tcl-tk" -I. -Os -DNDEBUG -Wall -fno-common -pipe -Os -DNDEBUG -Wall -fno-common -c `echo ./generic/tlsX509.c` -o tlsX509.o
- rm -f libtls1.8.0.dylib
- gcc -dynamiclib -pipe -Os -DNDEBUG -Wall -fno-common -Wl,-single_module -current_version 1.8.0 -compatibility_version 1.8.0 -headerpad_max_install_names -Wl,-search_paths_first -o libtls1.8.0.dylib tls.o tlsBIO.o tlsIO.o tlsX509.o -L/opt/homebrew//lib -lssl -lcrypto -L/opt/homebrew/Cellar/tcl-tk/8.6.15/lib -ltclstub8.6
- ld: warning: -single_module is obsolete
- : libtls1.8.0.dylib
- TCL_LIBRARY=`echo /private/tmp/tcl-tk-20240916-5394-wabojr/tcl8.6.15/library` DYLD_LIBRARY_PATH="/Users/pascal/Downloads/tcltls-1505883e4a:/opt/homebrew/lib:" PATH="/Users/pascal/Downloads/tcltls-1505883e4a:/opt/homebrew/lib:/Users/pascal/google-cloud-sdk/bin:/Users/pascal/scripts/bin-osx:/Users/pascal/perl5/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin" TCLLIBPATH="/Users/pascal/Downloads/tcltls-1505883e4a" /opt/homebrew/bin/tclsh8.6 `echo ./tests/all.tcl` \
- -load "package ifneeded tls 1.8.0 \
- [list load `echo libtls1.8.0.dylib` [string totitle tls]]"
- Tests running in interp: /opt/homebrew/bin/tclsh8.6
- Tests located in: /Users/pascal/Downloads/tcltls-1505883e4a/tests
- Tests running in: /Users/pascal/Downloads/tcltls-1505883e4a
- Temporary files stored in /Users/pascal/Downloads/tcltls-1505883e4a
- Test files run in separate interpreters
- Running tests that match: *
- Skipping test files that match: l.*.test
- Only running test files that match: *.test
- Tests began at Wed Oct 02 14:51:04 CEST 2024
- badssl.test
- ==== BadSSL-1.33 no-sct FAILED
- ==== Contents of test case:
- badssl no-sct.badssl.com
- ---- Test completed normally; Return code was: 0
- ---- Return code should have been one of: 1
- ==== BadSSL-1.33 FAILED
- ==== BadSSL-1.41 revoked FAILED
- ==== Contents of test case:
- badssl revoked.badssl.com
- ---- Test completed normally; Return code was: 0
- ---- Return code should have been one of: 1
- ==== BadSSL-1.41 FAILED
- ==== BadSSL-1.44 rsa8192 FAILED
- ==== Contents of test case:
- badssl rsa8192.badssl.com
- ---- Test generated error; Return code was: 1
- ---- Return code should have been one of: 0 2
- ---- errorInfo: handshake failed: certificate verify failed due to "certificate has expired"
- while executing
- "badssl rsa8192.badssl.com"
- ("uplevel" body line 2)
- invoked from within
- "uplevel 1 $script"
- ---- errorCode: NONE
- ==== BadSSL-1.44 FAILED
- ciphers.test
- ==== Ciphers_Protocol_Specific-4.3 TLS1.0 FAILED
- ==== Contents of test case:
- lcompare [exec_get ":" ciphers -tls1 -s] [::tls::ciphers tls1 0 1]
- ---- Result was:
- missing {} unexpected {ECDHE-ECDSA-AES256-SHA ECDHE-RSA-AES256-SHA DHE-RSA-AES256-SHA ECDHE-ECDSA-AES128-SHA ECDHE-RSA-AES128-SHA DHE-RSA-AES128-SHA AES256-SHA AES128-SHA}
- ---- Result should have been (exact matching):
- missing {} unexpected {}
- ==== Ciphers_Protocol_Specific-4.3 FAILED
- ==== Ciphers_Protocol_Specific-4.4 TLS1.1 FAILED
- ==== Contents of test case:
- lcompare [exec_get ":" ciphers -tls1_1 -s] [::tls::ciphers tls1.1 0 1]
- ---- Result was:
- missing {} unexpected {ECDHE-ECDSA-AES256-SHA ECDHE-RSA-AES256-SHA DHE-RSA-AES256-SHA ECDHE-ECDSA-AES128-SHA ECDHE-RSA-AES128-SHA DHE-RSA-AES128-SHA AES256-SHA AES128-SHA}
- ---- Result should have been (exact matching):
- missing {} unexpected {}
- ==== Ciphers_Protocol_Specific-4.4 FAILED
- ==== Ciphers_Protocol_Specific-4.6 TLS1.3 FAILED
- ==== Contents of test case:
- lcompare [exec_get ":" ciphers -tls1_3 -s] [::tls::ciphers tls1.3 0 1]
- ---- Result was:
- missing {} unexpected {ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-GCM-SHA384 ECDHE-ECDSA-CHACHA20-POLY1305 ECDHE-RSA-CHACHA20-POLY1305 DHE-RSA-CHACHA20-POLY1305 ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES128-GCM-SHA256 ECDHE-ECDSA-AES256-SHA384 ECDHE-RSA-AES256-SHA384 DHE-RSA-AES256-SHA256 ECDHE-ECDSA-AES128-SHA256 ECDHE-RSA-AES128-SHA256 DHE-RSA-AES128-SHA256 ECDHE-ECDSA-AES256-SHA ECDHE-RSA-AES256-SHA DHE-RSA-AES256-SHA ECDHE-ECDSA-AES128-SHA ECDHE-RSA-AES128-SHA DHE-RSA-AES128-SHA AES256-GCM-SHA384 AES128-GCM-SHA256 AES256-SHA256 AES128-SHA256 AES256-SHA AES128-SHA}
- ---- Result should have been (exact matching):
- missing {} unexpected {}
- ==== Ciphers_Protocol_Specific-4.6 FAILED
- tlsIO.test
- ==== tlsIO-2.7 echo server, one line FAILED
- ==== Contents of test case:
- removeFile script
- set f [open script w]
- puts $f [list set auto_path $auto_path]
- puts $f {
- package require tls
- set timer [after 2000 "set x done"]
- }
- puts $f "set f \[tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8834 \]"
- puts $f {
- proc accept {s a p} {
- fileevent $s readable [list echo $s]
- fconfigure $s -translation lf -buffering line
- }
- proc echo {s} {
- set l [gets $s]
- if {[eof $s]} {
- global x
- close $s
- set x done
- } else {
- puts $s $l
- }
- }
- puts ready
- vwait x
- after cancel $timer
- close $f
- puts done
- }
- close $f
- set f [open "|[list $::tcltest::tcltest script]" r]
- gets $f
- set s [tls::socket -certfile $clientCert -cafile $caCert -keyfile $clientKey 127.0.0.1 8834]
- fconfigure $s -buffering line -translation lf
- puts $s "hello abcdefghijklmnop"
- after 1000
- set x [gets $s]
- close $s
- set y [gets $f]
- close $f
- list $x $y
- ---- Result was:
- {} done
- ---- Result should have been (exact matching):
- {hello abcdefghijklmnop} done
- ==== tlsIO-2.7 FAILED
- ==== tlsIO-4.1 server with several clients FAILED
- ==== Contents of test case:
- # have seen intermittent hangs on Windows
- removeFile script
- set f [open script w]
- puts $f [list set auto_path $auto_path]
- puts $f {
- package require tls
- gets stdin
- }
- puts $f "set s \[tls::socket -certfile $clientCert -cafile $caCert -keyfile $clientKey 127.0.0.1 8828 \]"
- puts $f {
- fconfigure $s -buffering line
- for {set i 0} {$i < 100} {incr i} {
- puts $s hello
- gets $s
- }
- close $s
- puts bye
- gets stdin
- }
- close $f
- set p1 [open "|[list $::tcltest::tcltest script]" r+]
- fconfigure $p1 -buffering line
- set p2 [open "|[list $::tcltest::tcltest script]" r+]
- fconfigure $p2 -buffering line
- set p3 [open "|[list $::tcltest::tcltest script]" r+]
- fconfigure $p3 -buffering line
- proc accept {s a p} {
- fconfigure $s -buffering line
- fileevent $s readable [list echo $s]
- }
- proc echo {s} {
- global x
- set l [gets $s]
- if {[eof $s]} {
- close $s
- set x done
- } else {
- puts $s $l
- }
- }
- set t1 [after 30000 "set x timed_out"]
- set t2 [after 31000 "set x timed_out"]
- set t3 [after 32000 "set x timed_out"]
- set s [tls::socket -certfile $serverCert -cafile $caCert -keyfile $serverKey -server accept 8828]
- puts $p1 open
- puts $p2 open
- puts $p3 open
- vwait x
- vwait x
- vwait x
- after cancel $t1
- after cancel $t2
- after cancel $t3
- close $s
- set l ""
- lappend l [list p1 [gets $p1] $x]
- lappend l [list p2 [gets $p2] $x]
- lappend l [list p3 [gets $p3] $x]
- puts $p1 bye
- puts $p2 bye
- puts $p3 bye
- close $p1
- close $p2
- close $p3
- set l
- ---- Result was:
- {p1 bye timed_out} {p2 bye timed_out} {p3 bye timed_out}
- ---- Result should have been (exact matching):
- {p1 bye done} {p2 bye done} {p3 bye done}
- ==== tlsIO-4.1 FAILED
- ==== tlsIO-5.1 byte order problems, socket numbers, htons FAILED
- ==== Contents of test case:
- set x {couldn't open socket: not owner}
- if {![catch {tls::socket -server dodo 0x1} msg]} {
- set x {htons problem, should be disallowed, are you running as SU?}
- close $msg
- }
- set x
- ---- Result was:
- htons problem, should be disallowed, are you running as SU?
- ---- Result should have been (exact matching):
- couldn't open socket: not owner
- ==== tlsIO-5.1 FAILED
- ==== tlsIO-5.3 byte order problems, socket numbers, htons FAILED
- ==== Contents of test case:
- set x {couldn't open socket: not owner}
- if {![catch {tls::socket -server dodo 21} msg]} {
- set x {htons problem, should be disallowed, are you running as SU?}
- close $msg
- }
- set x
- ---- Result was:
- htons problem, should be disallowed, are you running as SU?
- ---- Result should have been (exact matching):
- couldn't open socket: not owner
- ==== tlsIO-5.3 FAILED
- ==== tlsIO-8.1 testing -async flag on sockets FAILED
- ==== Contents of test case:
- # NOTE: This test may fail on some Solaris 2.4 systems.
- # See notes in Tcl's socket.test.
- set s [tls::socket -certfile $serverCert -cafile $caCert -keyfile $serverKey -server accept 8830]
- proc accept {s a p} {
- global x
- # when doing an in-process client/server test, both sides need
- # to be non-blocking for the TLS handshake. Also make sure
- # to return the channel to line buffering mode.
- fconfigure $s -blocking 0 -buffering line
- puts $s bye
- # Only OpenSSL 0.9.5a on Windows seems to need the after (delayed)
- # close, but it works just the same for all others. -hobbs
- after 500 close $s
- set x done
- }
- set s1 [tls::socket -certfile $clientCert -cafile $caCert -keyfile $clientKey -async localhost 8830]
- # when doing an in-process client/server test, both sides need
- # to be non-blocking for the TLS handshake Also make sure to
- # return the channel to line buffering mode (TLS sets it to 'none').
- fconfigure $s1 -blocking 0 -buffering line
- vwait x
- # TLS handshaking needs one byte from the client...
- puts $s1 a
- # need update to complete TLS handshake in-process
- update
- fconfigure $s1 -blocking 1
- set z [gets $s1]
- close $s
- close $s1
- set z
- ---- Result was:
- ---- Result should have been (exact matching):
- bye
- ==== tlsIO-8.1 FAILED
- ==== tls-bug58-1.0 test protocol negotiation failure FAILED
- ==== Contents of test case:
- # Following code is based on what was reported in bug #58. Prior
- # to fix the program would crash with a segfault.
- proc Accept {sock args} {
- fconfigure $sock -blocking 0;
- fileevent $sock readable [list Handshake $sock]
- }
- proc Handshake {sock} {
- set ::done HAND
- catch {tls::handshake $sock} msg
- set ::done $msg
- }
- # NOTE: when doing an in-process client/server test, both sides need
- # to be non-blocking for the TLS handshake
- # Server - Only accept TLS 1.2
- set s [tls::socket -certfile $serverCert -cafile $caCert -keyfile $serverKey -request 0 -require 0 -ssl2 0 -ssl3 0 -tls1 0 -tls1.1 0 -tls1.2 1 -tls1.3 0 -server Accept 8831]
- # Client - Only propose TLS1.0
- set c [tls::socket -async -cafile $caCert -request 0 -require 0 -ssl2 0 -ssl3 0 -tls1 1 -tls1.1 0 -tls1.2 0 -tls1.3 0 localhost 8831]
- fconfigure $c -blocking 0
- puts $c a ; flush $c
- after 5000 [list set ::done timeout]
- vwait ::done
- switch -exact -- $::done {
- "handshake failed: wrong ssl version" -
- "handshake failed: unsupported protocol" {
- set ::done "handshake failed: wrong version number"
- }
- }
- set ::done
- ---- Test generated error; Return code was: 1
- ---- Return code should have been one of: 0 2
- ---- errorInfo: error flushing "sock12a879190": software caused connection abort
- while executing
- "flush $c"
- ("uplevel" body line 21)
- invoked from within
- "uplevel 1 $script"
- ---- errorCode: POSIX ECONNABORTED {software caused connection abort}
- ==== tls-bug58-1.0 FAILED
- Test file error: error writing "sock12a01eb90": broken pipe
- while executing
- "puts $s $l"
- (procedure "echo" line 8)
- invoked from within
- "echo sock12a01eb90"
- Tests ended at Wed Oct 02 14:52:20 CEST 2024
- all.tcl: Total 155 Passed 109 Skipped 34 Failed 12
- Sourced 3 Test Files.
- Files with failing tests: badssl.test ciphers.test tlsIO.test
- Number of tests skipped for each constraint:
- 12 doTestsWithRemoteServer
- 1 mac
- 12 old_api
- 3 ssl2
- 3 ssl3
- 1 testthread
- 2 unexplainedFailure
- Test files exiting with errors:
- tlsIO.test
- make: *** [test] Error 1
- pascal@kaylee tcltls-1505883e4a %