Skip to content

Commit

Permalink
feat(net): Add OpensslClient constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
softprops authored and seanmonstar committed May 17, 2016
1 parent 1ec56fe commit 3c0e105
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,10 +657,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<T: NetworkStream + Send + Clone> super::SslClient<T> for OpensslClient {
type Stream = SslStream<T>;
Expand Down

0 comments on commit 3c0e105

Please sign in to comment.