Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 16aa6496610ae087f7d0faf7569e53904c6760df
Ticket: c31ca233cacd7d6184877c54182f4b3a6ccb30f1
tlsIO-2.11 failure
User & Date: dgp on 2014-07-02 20:07:07
Changes

  1. icomment:
    New attachment, eof.patch, is another way to
    fix the failing test tlsIO-2.10.  
    
    I believe the best thing is to apply both patches to tls.
    After these patches, tls should continue to operate successfully
    everywhere it always has, and in addition function correctly with
    the current Tcl trunk.
    
    What's happening is that during the handshake processing,
    an EOF happens on the low-level encrypted socket.
    
    Until recently, Tcl's I/O core has been allowing EOF
    status flags to leak between levels in a channel stack.
    In this case, the bug was an advantage to tls because it caused
    the tls::socket to apparently also present an EOF state,
    and this causes [gets] to complete successfully returning
    an empty string.
    
    Now that the core bugs are fixed, the EOF doesn't bubble up,
    and so the failed handshake gets noticed and reported as
    an error.  The failing [gets] causes the test to fail.
     
    The eof.patch adds a tiny bit of code to explicitly notice
    the low-level EOF and explicitly raise it again at the higher
    level.
    
    An additional change that might be worthwhile is to [catch]
    the [gets] in the test.  The purpose of the test is to verify
    that [readit] is called at all, not whether [gets] succeeds.
    
  2. login: "dgp"
  3. mimetype: "text/plain"