Does anyone have an example snippet code connecting to, reading from and writing to a server using SSL under Windows with Secure Channel? Something in a personal project you wouldn't mind sharing a part of to let me dissect?

My project (IRC bot) supports connecting to a server using SSL, for which I'm currently using OpenSSL with [requests.ssl_adapter](https://github.com/ikod/dlang-requests/blob/master/source/requests/ssl_adapter.d). It's a simple thing that just sets up an SSL context, connects using the normal `Socket.connect`, establishes SSL, and then uses OpenSSL functions to read and write instead of Phobos' `Socket.{receive,send}`. It works, but unlike in Linux where OpenSSL is ubiquitous, on Windows you have to manually download and install OpenSSL from a third-party site. It still works, but it's not ideal.

Frustratingly there is no `std.socket.ssl`.

I'm helplessly a Linux creature and I don't know where to start. Does anyone have anything I could look at?

Reply via email to