aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-10-30 11:05:29 -0700
committerSteven Fackler <[email protected]>2016-10-30 11:05:29 -0700
commiteb735f519aa1a5b7033b640ee6229efa5f98c19c (patch)
tree4ba13b9bea17eb3ac894905845393b62bf12731e
parentMerge pull request #496 from sfackler/connectors (diff)
downloadrust-openssl-eb735f519aa1a5b7033b640ee6229efa5f98c19c.tar.xz
rust-openssl-eb735f519aa1a5b7033b640ee6229efa5f98c19c.zip
Clean up generics a bit
-rw-r--r--openssl/src/ssl/connector.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/openssl/src/ssl/connector.rs b/openssl/src/ssl/connector.rs
index da2c03df..7d0bc4cd 100644
--- a/openssl/src/ssl/connector.rs
+++ b/openssl/src/ssl/connector.rs
@@ -105,25 +105,25 @@ pub struct ServerConnectorBuilder(SslContextBuilder);
impl ServerConnectorBuilder {
/// Creates a new builder for server-side TLS connections.
///
- /// The default configuration is based off of the intermediate profile of Mozilla's SSL
- /// Configuration Generator, and is subject to change.
- pub fn tls<I, T>(private_key: &PKeyRef,
- certificate: &X509Ref,
- chain: I)
- -> Result<ServerConnectorBuilder, ErrorStack>
- where I: IntoIterator<Item = T>,
- T: AsRef<X509Ref>
+ /// The default configuration is based off of the intermediate profile of Mozilla's server side
+ /// TLS configuration recommendations, and is subject to change.
+ pub fn tls<I>(private_key: &PKeyRef,
+ certificate: &X509Ref,
+ chain: I)
+ -> Result<ServerConnectorBuilder, ErrorStack>
+ where I: IntoIterator,
+ I::Item: AsRef<X509Ref>
{
ServerConnectorBuilder::new(SslMethod::tls(), private_key, certificate, chain)
}
- fn new<I, T>(method: SslMethod,
- private_key: &PKeyRef,
- certificate: &X509Ref,
- chain: I)
- -> Result<ServerConnectorBuilder, ErrorStack>
- where I: IntoIterator<Item = T>,
- T: AsRef<X509Ref>
+ fn new<I>(method: SslMethod,
+ private_key: &PKeyRef,
+ certificate: &X509Ref,
+ chain: I)
+ -> Result<ServerConnectorBuilder, ErrorStack>
+ where I: IntoIterator,
+ I::Item: AsRef<X509Ref>
{
let mut ctx = try!(ctx(method));
ctx.set_options(ssl::SSL_OP_SINGLE_DH_USE | ssl::SSL_OP_CIPHER_SERVER_PREFERENCE);