Artifacts Associated With Ticket 219235ffffffffff
Ticket change [db91024c69] (rid 107985) by nobody on 2000-10-26 05:03:57:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 4653 Bug Version: 8.3 SubmitDate: '2000-03-28' LastModified: '2000-04-04' Severity: LOW Status: Assigned Submitter: mroe ChangedBy: sandeep OS: Solaris FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Sample script: # httpsConnect.tcl - # # Short tcl test script for tcl TLS and OpenSSL. # Open socket connection to secure web server. package require http package require tls package require base64 set ::tls::debug 1 set headers [list Authorization "Basic [base64::encode mroe:mroe]"] set url https://elche:8016 set cvsPath [file join / home mroe cvs] set certFile [file join $cvsPath xmlserver modules x509 certs client.pem] set keyFile [file join $cvsPath xmlserver modules x509 certs ckey.pem] set caFile [file join $cvsPath xmlserver modules x509 certs cacert.pem] set caDir [file join $cvsPath xmlserver modules x509 certs] http::register https 443 [list ::tls::socket -request 1 -require 1 -certfile $certFile -keyfile $keyFile -cafile $caFile ] http::geturl $url -query "test" -headers $headers -timeout 15000 exit 0 Run the above script while the server is not running. Expected result: Same as when running this command without running http::register first, http::status = ioerror. Actual result: error flushing "sock4": broken pipe while executing "flush $s" ("eval" body line 35) (procedure "wait" line 35) invoked from within "wait $token" (procedure "http::geturl" line 219) invoked from within "http::geturl $url -query "test" -headers $headers -timeout 15000" (file "httpsConnect.tcl" line 53) The problem is that we open a socket to the remote server using tls::socket, but the normal way we check whether a socket is "good" doesn't work on tls sockets. (The normal way is to check eof on the socket and do fconfigure $sock -error.} One way to figure out if the socket is invalid early on is to call tls::handshake on the tls socket. But the http package currently has no way to know this when checking the connection in http::Connect. I believe the right thing to do is to register two tls methods for doing https: tls::socket for establishing the connection and tls::handshake for checking if the connection is good. Then http::Connect can call tls::handshake to check if the socket is good for tls sockets while doing what it usually does for normal sockets. I believe this approach would also solve some other annoying problems that pop up due to lack of communication between the http package and tls. For now, the work-around is to catch the geturl and massage the error message. -- 04/04/2000 sandeep - foundin initialized to: "obsolete: 8.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "62. (unused)"
- title initialized to:
Get broken pipe error while making a https connection to a n
- type initialized to: "Bug"
Ticket change [2e617688a1] (rid 119213) by dkf on 2001-02-05 04:30:41:
- subsystem changed to: "29. http Package"
Ticket change [91dfa9fde5] (rid 120692) by hobbs on 2001-09-06 08:42:26:
- priority changed to: "3 Low"
Ticket change [cc5343079d] (rid 95679) by andreas_kupries on 2001-09-08 06:36:23:
- assignee changed to: "hobbs"
Ticket change [bd6a78f073] (rid 101900) by hobbs on 2001-09-11 07:58:40:
- closedate changed to: "2001-09-11T00:58:40"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 This may have been with 8.3.1 and would need to be reverified in 8.3.3. Also, this looks like it could be worked around, if it is really a core "bug" at all.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Wont Fix"
- status changed to: "Deleted"
- username: "hobbs"