Posted to tcl by dbohdan at Fri Sep 11 09:17:24 GMT 2020view raw

  1. package require tls
  2.  
  3. proc ::tls::log {level msg} { puts ">>>> $msg" }
  4. set ::tls::debug 1
  5.  
  6. set tlsSocket [list \
  7. ::tls::socket -autoservername true \
  8. ]
  9.  
  10. proc verifyCmd {op sock args} {
  11. puts "$op $sock $args"
  12. tailcall ::tls::callback $op $sock {*}$args
  13. }
  14.  
  15. set chan [{*}$tlsSocket \
  16. -autoservername true \
  17. -command verifyCmd \
  18. github.com 443 \
  19. ]
  20. puts [read -nonewline $chan]

Comments

Posted by dbohdan at Fri Sep 11 09:18:35 GMT 2020 [text] [code]

Redundancy!