Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch pt/avoid-old-ssl
Excluding Merge-Ins
This is equivalent to a diff from
9ba2ffd340
to 25f3b8ee94
2017-10-31
| | |
03:41 |
|
check-in: 048189d3a6 user: aku tags: trunk
|
2017-10-30
| | |
23:33 |
|
check-in: 78b3ed8622 user: hypnotoad tags: trunk
|
21:55 |
|
Closed-Leaf
check-in: 25f3b8ee94 user: aku tags: pt/avoid-old-ssl
|
2017-10-28
| | |
13:33 |
|
check-in: ee6fa84309 user: patthoyts tags: pt/avoid-old-ssl
|
2017-10-27
| | |
14:38 |
|
check-in: c49c11b395 user: patthoyts tags: pt/avoid-old-ssl
|
00:25 |
|
check-in: 9ba2ffd340 user: hypnotoad tags: trunk
|
00:22 |
|
Closed-Leaf
check-in: 2fde6e29c9 user: patthoyts tags: dns-rfc7858
|
2017-10-26
| | |
01:30 |
|
check-in: 1eca4e3892 user: hypnotoad tags: trunk
|
| | |
Changes to modules/comm/comm.test.
︙ | | |
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
-
-
-
+
+
+
-
-
-
+
+
+
|
test comm-6.0 {secured communication via tls package} hastls {
# Setup secured channel in main process.
tls::init \
-keyfile [tcllibPath devtools/receiver.key] \
-certfile [tcllibPath devtools/receiver.crt] \
-cafile [tcllibPath devtools/ca.crt] \
-ssl2 1 \
-ssl3 1 \
-tls1 0 \
-ssl2 0 \
-ssl3 0 \
-tls1 1 \
-require 1
comm::comm new BAR -socketcmd tls::socket -listen 1
# Setup secured channel in slave process
::comm::comm send [slave] {
package require tls
set fox dog
}
::comm::comm send [slave] \
[list \
tls::init \
-keyfile [tcllibPath devtools/transmitter.key] \
-certfile [tcllibPath devtools/transmitter.crt] \
-cafile [tcllibPath devtools/ca.crt] \
-ssl2 1 \
-ssl3 1 \
-tls1 0 \
-ssl2 0 \
-ssl3 0 \
-tls1 1 \
-require 1]
set FOO [::comm::comm send [slave] {
comm::comm new FOO -socketcmd tls::socket -listen 1
FOO self
}] ; # {}
# Run command interaction over the secured channel
|
︙ | | |
Changes to modules/crc/crc16.man.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
+
-
+
-
+
-
+
-
+
-
+
-
+
|
[vset VERSION 1.1.3]
[manpage_begin crc16 n 1.1.2]
[manpage_begin crc16 n [vset VERSION]]
[see_also cksum(n)]
[see_also crc32(n)]
[see_also sum(n)]
[keywords checksum]
[keywords cksum]
[keywords crc]
[keywords crc16]
[keywords crc32]
[keywords {cyclic redundancy check}]
[keywords {data integrity}]
[keywords security]
[copyright {2002, Pat Thoyts}]
[copyright {2002, 2017, Pat Thoyts}]
[moddesc {Cyclic Redundancy Checks}]
[titledesc {Perform a 16bit Cyclic Redundancy Check}]
[category {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require crc16 [opt 1.1.2]]
[require crc16 [opt [vset VERSION]]]
[description]
[para]
This package provides a Tcl-only implementation of the CRC
algorithms based upon information provided at
http://www.microconsultants.com/tips/crc/crc.txt
There are a number of permutations available for calculating CRC
checksums and this package can handle all of them. Defaults are set up
for the most common cases.
[section COMMANDS]
[list_begin definitions]
[call [cmd ::crc::crc16] [opt "-format [arg format]"] \
[opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [arg message]]
[opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [arg -- message]]
[call [cmd ::crc::crc16] [opt "-format [arg format]"] \
[opt "-seed [arg value]"] [opt "-implementation [arg procname]"] "-filename [arg file]"]
[call [cmd ::crc::crc-ccitt] [opt "-format [arg format]"] \
[opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [arg message]]
[opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [arg -- message]]
[call [cmd ::crc::crc-ccitt] [opt "-format [arg format]"] \
[opt "-seed [arg value]"] [opt "-implementation [arg procname]"] "-filename [arg file]"]
[call [cmd ::crc::xmodem] [opt "-format [arg format]"] \
[opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [arg message]]
[opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [arg -- message]]
[call [cmd ::crc::xmodem] [opt "-format [arg format]"] \
[opt "-seed [arg value]"] [opt "-implementation [arg procname]"] "-filename [arg file]"]
The command takes either string data or a file name and returns a checksum
value calculated using the CRC algorithm. The command used sets up the
CRC polynomial, initial value and bit ordering for the desired
standard checksum calculation. The result is formatted
|
︙ | | |
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
-
+
+
+
+
+
+
+
-
+
-
+
-
+
|
The package provides some implementations of standard CRC polynomials
for the XMODEM, CCITT and the usual CRC-16 checksum. For convenience,
additional commands have been provided that make use of these
implementations.
[def "--"]
Terminate option processing.
Terminate option processing. Please note that using the option
termination flag is important when processing data from parameters. If
the binary data looks like one of the options given above then the
data will be read as an option if this marker is not included.
Always use the [arg --] option termination flag before giving the data
argument.
[list_end]
[section EXAMPLES]
[para]
[example {
% crc::crc16 "Hello, World!"
% crc::crc16 -- "Hello, World!"
64077
}]
[para]
[example {
% crc::crc-ccitt "Hello, World!"
% crc::crc-ccitt -- "Hello, World!"
26586
}]
[para]
[example {
% crc::crc16 -format 0x%X "Hello, World!"
% crc::crc16 -format 0x%X -- "Hello, World!"
0xFA4D
}]
[para]
[example {
% crc::crc16 -file crc16.tcl
51675
|
︙ | | |
|
Changes to modules/crc/crc16.tcl.
1
2
3
4
5
6
7
8
|
1
2
3
4
5
6
7
8
|
-
+
|
# crc16.tcl -- Copyright (C) 2002 Pat Thoyts <[email protected]>
# crc16.tcl -- Copyright (C) 2002, 2017 Pat Thoyts <[email protected]>
#
# Cyclic Redundancy Check - this is a Tcl implementation of a general
# table-driven CRC implementation. This code should be able to generate
# the lookup table and implement the correct algorithm for most types
# of CRC. CRC-16, CRC-32 and the CCITT version of CRC-16. [1][2][3]
# Most transmission CRCs use the CCITT polynomial (including X.25, SDLC
# and Kermit).
|
︙ | | |
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
-
+
|
-i* { set opts(impl) [uplevel 1 namespace origin [Pop args 1]] }
-s* { set opts(seed) [Pop args 1] }
default {
if {[llength $args] == 1} { break }
if {[string compare $option "--"] == 0} { Pop args; break }
set options [join [lsort [array names opts]] ", -"]
return -code error "bad option $option:\
must be one of -$options"
must be one of -$options or -- to indicate end of options"
}
}
Pop args
}
if {$opts(filename) != {}} {
set opts(channel) [open $opts(filename) r]
|
︙ | | |
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
-
+
|
if {$opts(filename) != {}} {
close $opts(channel)
}
} else {
if {[llength $args] != 1} {
return -code error "wrong \# args: should be\
\"crc16 ?-format string? ?-seed value? ?-impl procname?\
-file name | data\""
-file name | -- data\""
}
set r [$opts(impl) [lindex $args 0] $opts(seed)]
}
return [format $opts(format) $r]
}
# -------------------------------------------------------------------------
|
︙ | | |
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
|
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
|
-
+
|
proc ::crc::crc-32 {args} {
return [eval [list crc -impl [namespace origin CRC-32] -seed 0xFFFFFFFF]\
$args]
}
# -------------------------------------------------------------------------
package provide crc16 1.1.2
package provide crc16 1.1.3
# -------------------------------------------------------------------------
#
# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:
|
Changes to modules/crc/pkgIndex.tcl.
1
2
3
4
5
|
1
2
3
4
5
|
-
+
|
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded cksum 1.1.4 [list source [file join $dir cksum.tcl]]
package ifneeded crc16 1.1.2 [list source [file join $dir crc16.tcl]]
package ifneeded crc16 1.1.3 [list source [file join $dir crc16.tcl]]
package ifneeded crc32 1.3.2 [list source [file join $dir crc32.tcl]]
package ifneeded sum 1.1.2 [list source [file join $dir sum.tcl]]
|
Changes to modules/devtools/dialog.tcl.
︙ | | |
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
-
-
-
+
+
+
|
coserv::run $id {
package require tls
tls::init \
-keyfile $devtools/transmitter.key \
-certfile $devtools/transmitter.crt \
-cafile $devtools/ca.crt \
-ssl2 1 \
-ssl3 1 \
-tls1 0 \
-ssl2 0 \
-ssl3 0 \
-tls1 1 \
-require 1
proc Server {} {
global port
# Start listener for dialog
set listener [tls::socket -server Accept 0]
set port [lindex [fconfigure $listener -sockname] 2]
|
︙ | | |
Changes to modules/http/ChangeLog.
1
2
3
4
5
6
7
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
+
+
+
+
+
+
+
|
2017-10-28 Pat Thoyts <[email protected]>
* autoproxy.tcl: allow unsetting basic auth information
* autoproxy.test: added basic tests of the package options
* autoproxy.man: update documentation for "configure -basic --"
Bumped to version 1.5.4 given new option.
2013-02-01 Andreas Kupries <[email protected]>
*
* Released and tagged Tcllib 1.15 ========================
*
2012-05-28 Andreas Kupries <[email protected]>
|
︙ | | |
| | | | | | |
Changes to modules/http/autoproxy.man.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
+
-
+
-
+
|
[vset VERSION 1.6]
[manpage_begin autoproxy n 1.5.3]
[manpage_begin autoproxy n [vset VERSION]]
[see_also http(n)]
[keywords authentication]
[keywords http]
[keywords proxy]
[moddesc {HTTP protocol helper modules}]
[titledesc {Automatic HTTP proxy usage and authentication}]
[category Networking]
[require Tcl 8.2]
[require http [opt 2.0]]
[require autoproxy [opt 1.5.3]]
[require autoproxy [opt [vset VERSION]]]
[description]
[para]
This package attempts to automate the use of HTTP proxy servers in Tcl
HTTP client code. It tries to initialize the web access settings from
system standard locations and can be configured to negotiate
authentication with the proxy if required.
|
︙ | | |
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
+
+
+
|
called when [cmd configure] [option -basic] is called with either no or
insufficient authentication details. This can be used to present a
dialog to the user to request the additional information.
[opt_def -basic]
Following options are for configuring the Basic authentication
scheme parameters. See [sectref "Basic Authentication"].
To unset the proxy authentication information retained from a previous
call of this function either "--" or no additional parameters can be
supplied. This will remove the existing authentication information.
[list_end]
[section "Basic Authentication"]
Basic is the simplest and most commonly use HTTP proxy authentication
scheme. It is described in (1 section 11) and also in (2). It offers
|
︙ | | |
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
-
+
+
+
+
+
+
|
The following options exists for this scheme:
[list_begin options]
[opt_def "-username" "name"]
The username required to authenticate with the configured proxy.
[opt_def "-password" "password"]
The password required for the username specified.
[opt_def "-realm" "realm"]
This option is not used.
This option is not used by this package but may be used in requesting
authentication details from the user.
[opt_def "--"]
The end-of-options indicator may be used alone to unset any
authentication details currently enabled.
[list_end]
[section "EXAMPLES"]
[para]
[example {
package require autoproxy
|
︙ | | |
|
Changes to modules/http/autoproxy.tcl.
1
2
3
4
5
6
7
8
|
1
2
3
4
5
6
7
8
|
-
+
|
# autoproxy.tcl - Copyright (C) 2002-2008 Pat Thoyts <[email protected]>
# autoproxy.tcl - Copyright (C) 2002-2008, 2017 Pat Thoyts <[email protected]>
#
# On Unix the standard for identifying the local HTTP proxy server
# seems to be to use the environment variable http_proxy or ftp_proxy and
# no_proxy to list those domains to be excluded from proxying.
#
# On Windows we can retrieve the Internet Settings values from the registry
# to obtain pretty much the same information.
|
︙ | | |
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
|
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
|
+
+
+
+
-
-
-
-
+
+
+
+
+
|
variable options
array set opts {user {} passwd {} realm {}}
foreach {opt value} $arglist {
switch -glob -- $opt {
-u* { set opts(user) $value}
-p* { set opts(passwd) $value}
-r* { set opts(realm) $value}
-- { break }
default {
return -code error "invalid option \"$opt\": must be one of\
-username or -password or -realm"
}
}
}
# If nothing was provided, try calling the authProc
if {$options(authProc) != {} \
&& ($opts(user) == {} || $opts(passwd) == {})} {
set r [$options(authProc) $opts(user) $opts(passwd) $opts(realm)]
set opts(user) [lindex $r 0]
set opts(passwd) [lindex $r 1]
}
if {$opts(user) eq ""} {
set options(basic) ""
} else {
# Store the encoded string to avoid re-encoding all the time.
set options(basic) [list "Proxy-Authorization" \
[concat "Basic" \
[base64::encode $opts(user):$opts(passwd)]]]
# Store the encoded string to avoid re-encoding all the time.
set options(basic) [list "Proxy-Authorization" \
[concat "Basic" \
[base64::encode $opts(user):$opts(passwd)]]]
}
return
}
# -------------------------------------------------------------------------
# Description:
# An http package proxy filter. This attempts to work out if a request
# should go via the configured proxy using a glob comparison against the
|
︙ | | |
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
|
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
|
-
+
|
set state(tls_status) [tls::status $s]
return $s
}
# -------------------------------------------------------------------------
package provide autoproxy 1.5.3
package provide autoproxy 1.6
# -------------------------------------------------------------------------
#
# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:
|
Added modules/http/autoproxy.test.