Fix SSL server sockets
commita540ebbc23bccbcd2094a3664b9ffd0363fe8838
authorapaloma <drunkenf00l@hotmail.com>
Tue, 2 Feb 2016 19:56:32 +0000 (2 11:56 -0800)
committerhhvm-bot <hhvm-bot@fb.com>
Tue, 2 Feb 2016 20:00:57 +0000 (2 12:00 -0800)
tree048f3afde5c9b6f9077e3f9444cb0aab25beb390
parent6ed43a377d52e5aa2e52ab691957deff55df311e
Fix SSL server sockets

Summary:
It looks like SSL servers were half-implemented. Neither stream_socket_server nor stream_socket_accept would do the right thing for SSL servers, but the SSLSocket class already had a bunch of code for dealing with servers. This change allows for a server to accept SSL connections and adds tests for it.
Closes https://github.com/facebook/hhvm/pull/6382

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2554291

Pulled By: sgolemon

fb-gh-sync-id: d09c6d24d22d0e63f115bb485baa446fafbb0532
hphp/runtime/base/ssl-socket.cpp
hphp/runtime/base/ssl-socket.h
hphp/runtime/ext/sockets/ext_sockets.cpp
hphp/runtime/ext/sockets/ext_sockets.h
hphp/runtime/ext/stream/ext_stream.cpp
hphp/test/slow/ext_socket/persistent_socket.php
hphp/test/slow/ext_socket/persistent_socket.php.expect