Skip to content

Commit 3c0e105

Browse files
softpropsseanmonstar
authored andcommitted
feat(net): Add OpensslClient constructor
1 parent 1ec56fe commit 3c0e105

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/net.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,10 +657,16 @@ mod openssl {
657657
// cipher list taken from curl:
658658
// https://github.com/curl/curl/blob/5bf5f6ebfcede78ef7c2b16daa41c4b7ba266087/lib/vtls/openssl.h#L120
659659
ctx.set_cipher_list("ALL!EXPORT!EXPORT40!EXPORT56!aNULL!LOW!RC4@STRENGTH").unwrap();
660-
OpensslClient(ctx)
660+
OpensslClient::new(ctx)
661661
}
662662
}
663663

664+
impl OpensslClient {
665+
/// Creates a new OpensslClient with a custom SslContext
666+
pub fn new(ctx: SslContext) -> OpensslClient {
667+
OpensslClient(ctx)
668+
}
669+
}
664670

665671
impl<T: NetworkStream + Send + Clone> super::SslClient<T> for OpensslClient {
666672
type Stream = SslStream<T>;

0 commit comments

Comments
 (0)