Posted to tcl by pascal at Wed Oct 02 12:54:52 GMT 2024view raw

  1. pascal@kaylee tcltls-1505883e4a % ./configure --with-tcl=/opt/homebrew/lib/ --with-openssl-dir=/opt/homebrew/
  2. checking TEA configuration... ok (TEA 3.13)
  3. configure: configuring tls 1.8.0
  4. checking system version... Darwin-24.1.0
  5. checking for Tcl configuration... found /opt/homebrew/lib/tclConfig.sh
  6. checking for gcc... gcc
  7. checking whether the C compiler works... yes
  8. checking for C compiler default output file name... a.out
  9. checking for suffix of executables...
  10. checking whether we are cross compiling... no
  11. checking for suffix of object files... o
  12. checking whether the compiler supports GNU C... yes
  13. checking whether gcc accepts -g... yes
  14. checking for gcc option to enable C11 features... none needed
  15. checking for existence of /opt/homebrew/lib/tclConfig.sh... loading
  16. checking platform... unix
  17. configure: --prefix defaulting to TCL_PREFIX /opt/homebrew/Cellar/tcl-tk/8.6.15
  18. configure: --exec-prefix defaulting to TCL_EXEC_PREFIX /opt/homebrew/Cellar/tcl-tk/8.6.15
  19. checking for gcc... (cached) gcc
  20. checking whether the compiler supports GNU C... (cached) yes
  21. checking whether gcc accepts -g... (cached) yes
  22. checking for gcc option to enable C11 features... (cached) none needed
  23. checking how to run the C preprocessor... gcc -E
  24. checking whether make sets $(MAKE)... yes
  25. checking for ranlib... ranlib
  26. checking for stdio.h... yes
  27. checking for stdlib.h... yes
  28. checking for string.h... yes
  29. checking for inttypes.h... yes
  30. checking for stdint.h... yes
  31. checking for strings.h... yes
  32. checking for sys/stat.h... yes
  33. checking for sys/types.h... yes
  34. checking for unistd.h... yes
  35. checking if the compiler understands -pipe... yes
  36. checking whether byte ordering is bigendian... no
  37. checking for Tcl public headers... /opt/homebrew/Cellar/tcl-tk/8.6.15/include/tcl-tk
  38. checking for pthread_mutex_init in -lpthread... yes
  39. checking for building with threads... yes (default)
  40. checking how to build libraries... shared
  41. checking for ranlib... (cached) ranlib
  42. checking if 64bit support is requested... no
  43. checking if 64bit Sparc VIS support is requested... no
  44. checking if compiler supports visibility "hidden"... yes
  45. checking if rpath support is requested... yes
  46. checking system version... (cached) Darwin-24.1.0
  47. checking for ar... ar
  48. checking if ld accepts -single_module flag... yes
  49. checking if ld accepts -search_paths_first flag... yes
  50. checking for cast to union support... yes
  51. checking for stdbool.h... yes
  52. checking for required early compiler flags... none
  53. checking for 64-bit integer type... yes
  54. checking for build with symbols... no
  55. checking for egrep -e... /opt/homebrew/bin/ggrep -E
  56. checking for pkg-config... pkg-config
  57. checking for debug mode... no
  58. checking for fast path... no
  59. checking for enable hardening... yes
  60. checking for static linking of openSSL libraries... no
  61. checking for OpenSSL directory... /opt/homebrew/
  62. checking for OpenSSL include directory... /opt/homebrew//include
  63. checking for ssl.h... yes
  64. checking for OpenSSL lib directory... /opt/homebrew//lib
  65. checking for OpenSSL pkgconfig...
  66. Unknown option --list-package-names
  67. checking for tclsh... /opt/homebrew/bin/tclsh8.6
  68. configure: creating ./config.status
  69. config.status: creating Makefile
  70. config.status: creating pkgIndex.tcl
  71. pascal@kaylee tcltls-1505883e4a % make test
  72. 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
  73. ./generic/tls.c:1769:18: warning: variable 'abort' set but not used [-Wunused-but-set-variable]
  74. 1769 | int off = 0, abort = 0;
  75. | ^
  76. ./generic/tls.c:2222:11: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
  77. 2222 | if (mode && SSL_VERIFY_FAIL_IF_NO_PEER_CERT) {
  78. | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  79. ./generic/tls.c:2222:11: note: use '&' for a bitwise operation
  80. 2222 | if (mode && SSL_VERIFY_FAIL_IF_NO_PEER_CERT) {
  81. | ^~
  82. | &
  83. ./generic/tls.c:2222:11: note: remove constant to silence this warning
  84. 2222 | if (mode && SSL_VERIFY_FAIL_IF_NO_PEER_CERT) {
  85. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  86. ./generic/tls.c:2225:11: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
  87. 2225 | if (mode && SSL_VERIFY_CLIENT_ONCE) {
  88. | ^ ~~~~~~~~~~~~~~~~~~~~~~
  89. ./generic/tls.c:2225:11: note: use '&' for a bitwise operation
  90. 2225 | if (mode && SSL_VERIFY_CLIENT_ONCE) {
  91. | ^~
  92. | &
  93. ./generic/tls.c:2225:11: note: remove constant to silence this warning
  94. 2225 | if (mode && SSL_VERIFY_CLIENT_ONCE) {
  95. | ^~~~~~~~~~~~~~~~~~~~~~~~~
  96. ./generic/tls.c:2228:11: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
  97. 2228 | if (mode && SSL_VERIFY_POST_HANDSHAKE) {
  98. | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
  99. ./generic/tls.c:2228:11: note: use '&' for a bitwise operation
  100. 2228 | if (mode && SSL_VERIFY_POST_HANDSHAKE) {
  101. | ^~
  102. | &
  103. ./generic/tls.c:2228:11: note: remove constant to silence this warning
  104. 2228 | if (mode && SSL_VERIFY_POST_HANDSHAKE) {
  105. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  106. 4 warnings generated.
  107. 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
  108. 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
  109. 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
  110. rm -f libtls1.8.0.dylib
  111. 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
  112. ld: warning: -single_module is obsolete
  113. : libtls1.8.0.dylib
  114. 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` \
  115. -load "package ifneeded tls 1.8.0 \
  116. [list load `echo libtls1.8.0.dylib` [string totitle tls]]"
  117. Tests running in interp: /opt/homebrew/bin/tclsh8.6
  118. Tests located in: /Users/pascal/Downloads/tcltls-1505883e4a/tests
  119. Tests running in: /Users/pascal/Downloads/tcltls-1505883e4a
  120. Temporary files stored in /Users/pascal/Downloads/tcltls-1505883e4a
  121. Test files run in separate interpreters
  122. Running tests that match: *
  123. Skipping test files that match: l.*.test
  124. Only running test files that match: *.test
  125. Tests began at Wed Oct 02 14:51:04 CEST 2024
  126. badssl.test
  127.  
  128.  
  129. ==== BadSSL-1.33 no-sct FAILED
  130. ==== Contents of test case:
  131.  
  132. badssl no-sct.badssl.com
  133.  
  134. ---- Test completed normally; Return code was: 0
  135. ---- Return code should have been one of: 1
  136. ==== BadSSL-1.33 FAILED
  137.  
  138.  
  139.  
  140. ==== BadSSL-1.41 revoked FAILED
  141. ==== Contents of test case:
  142.  
  143. badssl revoked.badssl.com
  144.  
  145. ---- Test completed normally; Return code was: 0
  146. ---- Return code should have been one of: 1
  147. ==== BadSSL-1.41 FAILED
  148.  
  149.  
  150.  
  151. ==== BadSSL-1.44 rsa8192 FAILED
  152. ==== Contents of test case:
  153.  
  154. badssl rsa8192.badssl.com
  155.  
  156. ---- Test generated error; Return code was: 1
  157. ---- Return code should have been one of: 0 2
  158. ---- errorInfo: handshake failed: certificate verify failed due to "certificate has expired"
  159. while executing
  160. "badssl rsa8192.badssl.com"
  161. ("uplevel" body line 2)
  162. invoked from within
  163. "uplevel 1 $script"
  164. ---- errorCode: NONE
  165. ==== BadSSL-1.44 FAILED
  166.  
  167. ciphers.test
  168.  
  169.  
  170. ==== Ciphers_Protocol_Specific-4.3 TLS1.0 FAILED
  171. ==== Contents of test case:
  172.  
  173. lcompare [exec_get ":" ciphers -tls1 -s] [::tls::ciphers tls1 0 1]
  174.  
  175. ---- Result was:
  176. 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}
  177. ---- Result should have been (exact matching):
  178. missing {} unexpected {}
  179. ==== Ciphers_Protocol_Specific-4.3 FAILED
  180.  
  181.  
  182.  
  183. ==== Ciphers_Protocol_Specific-4.4 TLS1.1 FAILED
  184. ==== Contents of test case:
  185.  
  186. lcompare [exec_get ":" ciphers -tls1_1 -s] [::tls::ciphers tls1.1 0 1]
  187.  
  188. ---- Result was:
  189. 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}
  190. ---- Result should have been (exact matching):
  191. missing {} unexpected {}
  192. ==== Ciphers_Protocol_Specific-4.4 FAILED
  193.  
  194.  
  195.  
  196. ==== Ciphers_Protocol_Specific-4.6 TLS1.3 FAILED
  197. ==== Contents of test case:
  198.  
  199. lcompare [exec_get ":" ciphers -tls1_3 -s] [::tls::ciphers tls1.3 0 1]
  200.  
  201. ---- Result was:
  202. 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}
  203. ---- Result should have been (exact matching):
  204. missing {} unexpected {}
  205. ==== Ciphers_Protocol_Specific-4.6 FAILED
  206.  
  207. tlsIO.test
  208.  
  209.  
  210. ==== tlsIO-2.7 echo server, one line FAILED
  211. ==== Contents of test case:
  212.  
  213. removeFile script
  214. set f [open script w]
  215. puts $f [list set auto_path $auto_path]
  216. puts $f {
  217. package require tls
  218. set timer [after 2000 "set x done"]
  219. }
  220. puts $f "set f \[tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8834 \]"
  221. puts $f {
  222. proc accept {s a p} {
  223. fileevent $s readable [list echo $s]
  224. fconfigure $s -translation lf -buffering line
  225. }
  226. proc echo {s} {
  227. set l [gets $s]
  228. if {[eof $s]} {
  229. global x
  230. close $s
  231. set x done
  232. } else {
  233. puts $s $l
  234. }
  235. }
  236. puts ready
  237. vwait x
  238. after cancel $timer
  239. close $f
  240. puts done
  241. }
  242. close $f
  243. set f [open "|[list $::tcltest::tcltest script]" r]
  244. gets $f
  245. set s [tls::socket -certfile $clientCert -cafile $caCert -keyfile $clientKey 127.0.0.1 8834]
  246. fconfigure $s -buffering line -translation lf
  247. puts $s "hello abcdefghijklmnop"
  248. after 1000
  249. set x [gets $s]
  250. close $s
  251. set y [gets $f]
  252. close $f
  253. list $x $y
  254.  
  255. ---- Result was:
  256. {} done
  257. ---- Result should have been (exact matching):
  258. {hello abcdefghijklmnop} done
  259. ==== tlsIO-2.7 FAILED
  260.  
  261.  
  262.  
  263. ==== tlsIO-4.1 server with several clients FAILED
  264. ==== Contents of test case:
  265.  
  266. # have seen intermittent hangs on Windows
  267. removeFile script
  268. set f [open script w]
  269. puts $f [list set auto_path $auto_path]
  270. puts $f {
  271. package require tls
  272. gets stdin
  273. }
  274. puts $f "set s \[tls::socket -certfile $clientCert -cafile $caCert -keyfile $clientKey 127.0.0.1 8828 \]"
  275. puts $f {
  276. fconfigure $s -buffering line
  277. for {set i 0} {$i < 100} {incr i} {
  278. puts $s hello
  279. gets $s
  280. }
  281. close $s
  282. puts bye
  283. gets stdin
  284. }
  285. close $f
  286. set p1 [open "|[list $::tcltest::tcltest script]" r+]
  287. fconfigure $p1 -buffering line
  288. set p2 [open "|[list $::tcltest::tcltest script]" r+]
  289. fconfigure $p2 -buffering line
  290. set p3 [open "|[list $::tcltest::tcltest script]" r+]
  291. fconfigure $p3 -buffering line
  292. proc accept {s a p} {
  293. fconfigure $s -buffering line
  294. fileevent $s readable [list echo $s]
  295. }
  296. proc echo {s} {
  297. global x
  298. set l [gets $s]
  299. if {[eof $s]} {
  300. close $s
  301. set x done
  302. } else {
  303. puts $s $l
  304. }
  305. }
  306. set t1 [after 30000 "set x timed_out"]
  307. set t2 [after 31000 "set x timed_out"]
  308. set t3 [after 32000 "set x timed_out"]
  309. set s [tls::socket -certfile $serverCert -cafile $caCert -keyfile $serverKey -server accept 8828]
  310. puts $p1 open
  311. puts $p2 open
  312. puts $p3 open
  313. vwait x
  314. vwait x
  315. vwait x
  316. after cancel $t1
  317. after cancel $t2
  318. after cancel $t3
  319. close $s
  320. set l ""
  321. lappend l [list p1 [gets $p1] $x]
  322. lappend l [list p2 [gets $p2] $x]
  323. lappend l [list p3 [gets $p3] $x]
  324. puts $p1 bye
  325. puts $p2 bye
  326. puts $p3 bye
  327. close $p1
  328. close $p2
  329. close $p3
  330. set l
  331.  
  332. ---- Result was:
  333. {p1 bye timed_out} {p2 bye timed_out} {p3 bye timed_out}
  334. ---- Result should have been (exact matching):
  335. {p1 bye done} {p2 bye done} {p3 bye done}
  336. ==== tlsIO-4.1 FAILED
  337.  
  338.  
  339.  
  340. ==== tlsIO-5.1 byte order problems, socket numbers, htons FAILED
  341. ==== Contents of test case:
  342.  
  343. set x {couldn't open socket: not owner}
  344. if {![catch {tls::socket -server dodo 0x1} msg]} {
  345. set x {htons problem, should be disallowed, are you running as SU?}
  346. close $msg
  347. }
  348. set x
  349.  
  350. ---- Result was:
  351. htons problem, should be disallowed, are you running as SU?
  352. ---- Result should have been (exact matching):
  353. couldn't open socket: not owner
  354. ==== tlsIO-5.1 FAILED
  355.  
  356.  
  357.  
  358. ==== tlsIO-5.3 byte order problems, socket numbers, htons FAILED
  359. ==== Contents of test case:
  360.  
  361. set x {couldn't open socket: not owner}
  362. if {![catch {tls::socket -server dodo 21} msg]} {
  363. set x {htons problem, should be disallowed, are you running as SU?}
  364. close $msg
  365. }
  366. set x
  367.  
  368. ---- Result was:
  369. htons problem, should be disallowed, are you running as SU?
  370. ---- Result should have been (exact matching):
  371. couldn't open socket: not owner
  372. ==== tlsIO-5.3 FAILED
  373.  
  374.  
  375.  
  376. ==== tlsIO-8.1 testing -async flag on sockets FAILED
  377. ==== Contents of test case:
  378.  
  379. # NOTE: This test may fail on some Solaris 2.4 systems.
  380. # See notes in Tcl's socket.test.
  381. set s [tls::socket -certfile $serverCert -cafile $caCert -keyfile $serverKey -server accept 8830]
  382. proc accept {s a p} {
  383. global x
  384. # when doing an in-process client/server test, both sides need
  385. # to be non-blocking for the TLS handshake. Also make sure
  386. # to return the channel to line buffering mode.
  387. fconfigure $s -blocking 0 -buffering line
  388. puts $s bye
  389. # Only OpenSSL 0.9.5a on Windows seems to need the after (delayed)
  390. # close, but it works just the same for all others. -hobbs
  391. after 500 close $s
  392. set x done
  393. }
  394. set s1 [tls::socket -certfile $clientCert -cafile $caCert -keyfile $clientKey -async localhost 8830]
  395. # when doing an in-process client/server test, both sides need
  396. # to be non-blocking for the TLS handshake Also make sure to
  397. # return the channel to line buffering mode (TLS sets it to 'none').
  398. fconfigure $s1 -blocking 0 -buffering line
  399. vwait x
  400. # TLS handshaking needs one byte from the client...
  401. puts $s1 a
  402. # need update to complete TLS handshake in-process
  403. update
  404. fconfigure $s1 -blocking 1
  405. set z [gets $s1]
  406. close $s
  407. close $s1
  408. set z
  409.  
  410. ---- Result was:
  411.  
  412. ---- Result should have been (exact matching):
  413. bye
  414. ==== tlsIO-8.1 FAILED
  415.  
  416.  
  417.  
  418. ==== tls-bug58-1.0 test protocol negotiation failure FAILED
  419. ==== Contents of test case:
  420.  
  421. # Following code is based on what was reported in bug #58. Prior
  422. # to fix the program would crash with a segfault.
  423. proc Accept {sock args} {
  424. fconfigure $sock -blocking 0;
  425. fileevent $sock readable [list Handshake $sock]
  426. }
  427. proc Handshake {sock} {
  428. set ::done HAND
  429. catch {tls::handshake $sock} msg
  430. set ::done $msg
  431. }
  432. # NOTE: when doing an in-process client/server test, both sides need
  433. # to be non-blocking for the TLS handshake
  434.  
  435. # Server - Only accept TLS 1.2
  436. 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]
  437. # Client - Only propose TLS1.0
  438. 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]
  439. fconfigure $c -blocking 0
  440. puts $c a ; flush $c
  441. after 5000 [list set ::done timeout]
  442. vwait ::done
  443. switch -exact -- $::done {
  444. "handshake failed: wrong ssl version" -
  445. "handshake failed: unsupported protocol" {
  446. set ::done "handshake failed: wrong version number"
  447. }
  448. }
  449. set ::done
  450.  
  451. ---- Test generated error; Return code was: 1
  452. ---- Return code should have been one of: 0 2
  453. ---- errorInfo: error flushing "sock12a879190": software caused connection abort
  454. while executing
  455. "flush $c"
  456. ("uplevel" body line 21)
  457. invoked from within
  458. "uplevel 1 $script"
  459. ---- errorCode: POSIX ECONNABORTED {software caused connection abort}
  460. ==== tls-bug58-1.0 FAILED
  461.  
  462. Test file error: error writing "sock12a01eb90": broken pipe
  463. while executing
  464. "puts $s $l"
  465. (procedure "echo" line 8)
  466. invoked from within
  467. "echo sock12a01eb90"
  468.  
  469. Tests ended at Wed Oct 02 14:52:20 CEST 2024
  470. all.tcl: Total 155 Passed 109 Skipped 34 Failed 12
  471. Sourced 3 Test Files.
  472. Files with failing tests: badssl.test ciphers.test tlsIO.test
  473. Number of tests skipped for each constraint:
  474. 12 doTestsWithRemoteServer
  475. 1 mac
  476. 12 old_api
  477. 3 ssl2
  478. 3 ssl3
  479. 1 testthread
  480. 2 unexplainedFailure
  481.  
  482. Test files exiting with errors:
  483.  
  484. tlsIO.test
  485.  
  486. make: *** [test] Error 1
  487. pascal@kaylee tcltls-1505883e4a %
  488.