From 088822b23da99bcb0bd95cc50fcba5e5fc3d7a96 Mon Sep 17 00:00:00 2001 From: softprops Date: Tue, 17 May 2016 00:00:35 -0400 Subject: [PATCH] feat(net): Add OpensslClient constructor --- src/net.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/net.rs b/src/net.rs index 57b18d1cd1..d8fbd7a60b 100644 --- a/src/net.rs +++ b/src/net.rs @@ -457,10 +457,16 @@ mod openssl { // cipher list taken from curl: // https://github.com/curl/curl/blob/5bf5f6ebfcede78ef7c2b16daa41c4b7ba266087/lib/vtls/openssl.h#L120 ctx.set_cipher_list("ALL!EXPORT!EXPORT40!EXPORT56!aNULL!LOW!RC4@STRENGTH").unwrap(); - OpensslClient(ctx) + OpensslClient::new(ctx) } } + impl OpensslClient { + /// Creates a new OpensslClient with a custom SslContext + pub fn new(ctx: SslContext) -> OpensslClient { + OpensslClient(ctx) + } + } impl super::SslClient for OpensslClient { type Stream = OpensslStream;