Menu

#12 Add rudimentary SNI support

None
closed-fixed
None
5
2014-12-08
2013-04-09
No

This patch adds rudimentary support for Server Name Indication as specified in sec. 3.1 of RFC 4366. It has been tested against OpenSSL only; I'm not sure if it works with GNU TLS. This patch assumes an SNI-capable version of OpenSSL, but autoconf macros and ifdefs can be added to avoid issues with earlier versions.

Trivial usage example:

package require http
package require tls

::http::register https 443 [list ::tls::socket -tls1 true -sni foo.bar.com]
set tok [http::geturl https://foo.bar.com -channel stdout]

Discussion

  • Kevin J. Woolley

    Take 2 of adding the feature.

    - now errors out if -require is true and adding the TLS extension host name fails

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2013-04-11
    • assigned_to: nobody --> hobbs
     
  • Kevin J. Woolley

    Added what I think should work for Tcl_AppendResult around line 892-ish, but if I take that code path I get the segfault I mentioned.

     
  • Kevin J. Woolley

    This latest patch includes proper OPENSSL_NO_TLSEXT ifdefs for all but the OPTBAD, which I haven't been able to get shown in tclsh. If it's worth the duplication to have alternates ifdef'd there, let me know and I'll add them.

     
  • Kevin J. Woolley

    New patch with -servername instead of -sni.

     
  • Kevin J. Woolley

    Latest patch version includes a change from -sni to -servername, so touches tls.tcl as well.

     
  • Andreas Kupries

    Andreas Kupries - 2014-11-20

    Patch looks ok to me. Is missing a change to the documentation (tls.htm).
    Builds fine for linux. Other platforms will be checked in the upcoming nightly.

     
  • Andreas Kupries

    Andreas Kupries - 2014-11-27

    Patch looks to be working for the stackato client.
    I vote for committing this to the official code base.

     
    • Jeffrey Hobbs

      Jeffrey Hobbs - 2014-11-28

      Definitely in favor of committing to core tls with version bump.

       
  • Andreas Kupries

    Andreas Kupries - 2014-12-08

    Committed to CVS, under version 1.6.4

     
  • Andreas Kupries

    Andreas Kupries - 2014-12-08
    • status: open --> closed-fixed
    • assigned_to: Jeffrey Hobbs --> Andreas Kupries
    • Group: -->