tls: fix handling of asterisk in SNI context
authorFedor Indutny <fedor.indutny@gmail.com>
Thu, 5 Dec 2013 15:16:01 +0000 (19:16 +0400)
committerTimothy J Fontaine <tjfontaine@gmail.com>
Fri, 6 Dec 2013 03:45:19 +0000 (19:45 -0800)
commitf572b91c3ea71e6854cb699ae728a320662bc261
tree241ef3770b1b4fa5f6501eaf678bf5e9b94d1bf1
parent9e32a7daaa62c809eaafa171e898f6d61865cff2
tls: fix handling of asterisk in SNI context

Wildcard server names should not match subdomains.

Quote from RFC2818:

   ...Names may contain the wildcard
   character * which is considered to match any single domain name
   component or component fragment. E.g., *.a.com matches foo.a.com but
   not bar.foo.a.com. f*.com matches foo.com but not bar.com.

fix #6610
lib/_tls_wrap.js
test/simple/test-tls-sni-server-client.js