47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
+
|
for {set idx 0} {$idx < $argc} {incr idx} {
set arg [lindex $args $idx]
switch -glob -- $server,$arg {
0,-myport -
*,-myaddr {lappend sopts $arg [lindex $args [incr idx]]}
0,-async {lappend sopts $arg}
*,-cipher -
*,-cadir -
*,-cafile -
*,-certfile -
*,-keyfile -
*,-command -
*,-request -
*,-require -
|
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
+
-
+
+
+
+
+
+
+
|
}
proc tls::_accept { iopts callback chan ipaddr port } {
log 2 [list tls::_accept $iopts $callback $chan $ipaddr $port]
set chan [eval [list tls::import $chan] $iopts]
lappend callback $chan $ipaddr $port
if {[catch {
uplevel #0 $callback
uplevel #0 $callback
} err]} {
log 1 "tls::_accept error: ${::errorInfo}"
close $chan
} else {
log 2 "tls::_accept - called \"$callback\" succeeded"
}
}
#
# Sample callback for hooking: -
#
# error
# info
# password
|