Posted to tcl by apn at Tue Aug 16 08:18:21 GMT 2022view raw
- proc verify {remote_name chan ctx} {
- set remote_cert [twapi::sspi_remote_cert $ctx]
- try {
- if {$remote_name eq ""} {
- set status [twapi::cert_tls_verify $remote_cert -revocationcheck none -ignoreerrors time]
- } else {
- set status [twapi::cert_tls_verify $remote_cert -revocationcheck none -ignoreerrors time -server $remote_name]
- }
- return [string equal $status ok]
- } finally {
- twapi::cert_release $remote_cert
- }
- }
- set so [twapi::tls_socket -verifier [list verify otgw.tclcode.com] otgw.tclcode.com 443]