ocsigen/lwt — pull request #50 by mfp (2014-04-17 20:27:11+00:00)
Title: Minor Lwt_ssl API addition to support Ssl functions used to set socket options before handshake

Some OpenSSL functions (such as those that configure TLS extensions like SNI) are meant
to operate on sockets before the SSL/TLS handshake is performed.

`Lwt_ssl`'s `ssl_accept` and `ssl_connect` functions both "embed" the socket and
initiate/await a handshake, so there's no chance to call these functions on them in
between. This patch allows to perform the socket embedding and the handshake
separately, thus making it possible to use `Ssl` functions on the socket before
the SSL/TLS connection is established.

The API extension is fairly minimal and allows to support newer functions in `Ssl`
(like https://github.com/mfp/ocaml-ssl/commit/0866090b2d07f161f3e4e01a54ce5ab2227360fd#commitcomment-6048750 )
while remaining oblivious to them.