From 189ef8f0471e60bbfd81e8fe6a221c2a0e890249 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Mon, 16 Oct 2017 14:59:49 -0400 Subject: [PATCH] enable -version=without_openssl for now --- http2.d | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/http2.d b/http2.d index 491138c..71fff6f 100644 --- a/http2.d +++ b/http2.d @@ -453,9 +453,12 @@ class HttpRequest { Socket getOpenSocketOnHost(string host, ushort port, bool ssl) { Socket openNewConnection() { Socket socket; - if(ssl) + if(ssl) { + version(with_openssl) socket = new SslClientSocket(AddressFamily.INET, SocketType.STREAM); - else + else + throw new Exception("SSL not compiled in"); + } else socket = new Socket(AddressFamily.INET, SocketType.STREAM); socket.connect(new InternetAddress(host, port)); @@ -600,6 +603,7 @@ class HttpRequest { if(request.onDataReceived) request.onDataReceived(request); + version(with_openssl) if(auto s = cast(SslClientSocket) sock) { // select doesn't handle the case with stuff // left in the ssl buffer so i'm checking it separately @@ -1237,6 +1241,8 @@ void main() { // From sslsocket.d +version(without_openssl) {} +else version=use_openssl; version(use_openssl) {