]> gitweb.factorcode.org Git - factor.git/commitdiff
io.sockets.secure: add SNI support for Windows
authorBenjamin Pollack <benjamin@bitquabit.com>
Sat, 12 Mar 2016 14:27:31 +0000 (09:27 -0500)
committerBenjamin Pollack <benjamin@bitquabit.com>
Sat, 12 Mar 2016 14:27:31 +0000 (09:27 -0500)
M: secure ((client)) is identical between Unix and Windows, so this probably
could be moved out of the platform-specific vocab, but doing it sanely would
require a refactor I'm not excited about, so punting on that for now.

Fixes #1551

basis/io/sockets/secure/windows/windows.factor

index 1a1cb3c52eb45b9f31e9d392fc2b1d1c01019e8b..ef3bbdf8de13cb4ccba079c7b086d3f6ecee4c7b 100644 (file)
@@ -9,7 +9,7 @@ M: openssl ssl-certificate-verification-supported? f ;
 M: windows socket-handle handle>> alien-address ;
 
 M: secure ((client)) ( addrspec -- handle )
-    addrspec>> ((client)) f <ssl-socket> ;
+    [ addrspec>> ((client)) ] [ hostname>> ] bi <ssl-socket> ;
 
 M: secure (get-local-address) ( handle remote -- sockaddr )
     [ file>> ] [ addrspec>> ] bi* (get-local-address) ;