Check-in [ca1a846290]
Overview
Comment:Tag as TLS 1.8 release
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | main
Files: files | file ages | folders
SHA3-256: ca1a846290939404a5ed4c440fd512da3ba731874cfb356a471fc33d423fc47f
User & Date: bohagan on 2025-01-02 18:05:37
Other Links: branch diff | manifest | tags
Context
2025-01-02
19:36
Created TLS 2.0 branch. Incremented version to 2.0b1 check-in: 7b51585287 user: bohagan tags: trunk, tls-2.0
18:05
Tag as TLS 1.8 release Leaf check-in: ca1a846290 user: bohagan tags: trunk, main
08:38
Fix source dir path for installing docs when not building in source root check-in: 4056acea19 user: [email protected] tags: trunk, main
Changes
34
35
36
37
38
39
40
41

42
43
44
45
46
47
48
34
35
36
37
38
39
40

41
42
43
44
45
46
47
48







-
+







    close $ch
}



proc gets_blocking_no_variable {host port path protocol} {
    set result ""
    

    # Open socket
    set ch [::tls::socket -servername $host -request 1 -require 1 -alpn [list [string tolower $protocol]] $host $port]
    chan configure $ch -blocking 1 -buffering line -buffersize 16384 -encoding utf-8 -translation {auto crlf}

    # Initiate handshake
    ::tls::handshake $ch
    after 1000
34
35
36
37
38
39
40
41

42
43
44
45
46
47
48
34
35
36
37
38
39
40

41
42
43
44
45
46
47
48







-
+







    close $ch
}



proc gets_blocking_with_variable {host port path protocol} {
    set result ""
    

    # Open socket
    set ch [::tls::socket -servername $host -request 1 -require 1 -alpn [list [string tolower $protocol]] $host $port]
    chan configure $ch -blocking 1 -buffering line -buffersize 16384 -encoding utf-8 -translation {auto crlf}

    # Initiate handshake
    ::tls::handshake $ch
    after 1000
10
11
12
13
14
15
16
17

18
19
20
21
22
23
24
10
11
12
13
14
15
16

17
18
19
20
21
22
23
24







-
+








set url "https://wiki.tcl-lang.org/sitemap.xml"
set protocol "http/1.1"
set filename [file tail $url]

# Register https protocol handler with http package
http::register https 443 [list ::tls::socket -autoservername 1 -require 1 -alpn [list [string tolower $protocol]]]
	    

# Open output file
set ch [open $filename wb]

# Get webpage
set token [::http::geturl $url -blocksize 16384 -channel $ch]
if {[http::status $token] ne "ok"} {
    puts [format "Error %s" [http::status $token]]
34
35
36
37
38
39
40
41

42
43
44
45
46
47
48
34
35
36
37
38
39
40

41
42
43
44
45
46
47
48







-
+







    close $ch
}



proc read_blocking {host port path protocol} {
    set result ""
    

    # Open socket
    set ch [::tls::socket -servername $host -request 1 -require 1 -alpn [list [string tolower $protocol]] $host $port]
    chan configure $ch -blocking 1 -buffering line -buffersize 16384 -encoding utf-8 -translation {auto crlf}

    # Initiate handshake
    ::tls::handshake $ch
    after 1000
42
43
44
45
46
47
48
49

50
51
52
53
54
55
56
42
43
44
45
46
47
48

49
50
51
52
53
54
55
56







-
+







	close $ch
	set ::wait 1
    }
}

proc read_nonblocking {host port path protocol} {
    set result ""
    

    # Open socket
    set ch [::tls::socket -servername $host -request 1 -require 1 -alpn [list [string tolower $protocol]] $host $port]
    chan configure $ch -blocking 1 -buffering line -buffersize 16384 -encoding utf-8 -translation {auto crlf}
    fileevent $ch readable [list handler $ch]

    # Initiate handshake
    ::tls::handshake $ch