aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-10-31 20:12:55 -0700
committerSteven Fackler <[email protected]>2016-10-31 20:12:55 -0700
commitf640613863f0b66bc004f9d9d89f73a31701d396 (patch)
tree923728c8959f6582e5f6da5b7472b304ed387e1e /openssl/src/ssl
parentUpdate EcKey (diff)
downloadrust-openssl-f640613863f0b66bc004f9d9d89f73a31701d396.tar.xz
rust-openssl-f640613863f0b66bc004f9d9d89f73a31701d396.zip
Update PKey
Diffstat (limited to 'openssl/src/ssl')
-rw-r--r--openssl/src/ssl/connector.rs9
-rw-r--r--openssl/src/ssl/mod.rs4
2 files changed, 7 insertions, 6 deletions
diff --git a/openssl/src/ssl/connector.rs b/openssl/src/ssl/connector.rs
index c7bfb209..752126e0 100644
--- a/openssl/src/ssl/connector.rs
+++ b/openssl/src/ssl/connector.rs
@@ -4,8 +4,9 @@ use dh::Dh;
use error::ErrorStack;
use ssl::{self, SslMethod, SslContextBuilder, SslContext, Ssl, SSL_VERIFY_PEER, SslStream,
HandshakeError};
-use pkey::PKeyRef;
+use pkey::PKey;
use x509::X509Ref;
+use types::Ref;
// apps/dh2048.pem
const DHPARAM_PEM: &'static str = r#"
@@ -116,7 +117,7 @@ impl SslAcceptorBuilder {
///
/// [docs]: https://wiki.mozilla.org/Security/Server_Side_TLS
pub fn mozilla_intermediate<I>(method: SslMethod,
- private_key: &PKeyRef,
+ private_key: &Ref<PKey>,
certificate: &X509Ref,
chain: I)
-> Result<SslAcceptorBuilder, ErrorStack>
@@ -151,7 +152,7 @@ impl SslAcceptorBuilder {
///
/// [docs]: https://wiki.mozilla.org/Security/Server_Side_TLS
pub fn mozilla_modern<I>(method: SslMethod,
- private_key: &PKeyRef,
+ private_key: &Ref<PKey>,
certificate: &X509Ref,
chain: I)
-> Result<SslAcceptorBuilder, ErrorStack>
@@ -169,7 +170,7 @@ impl SslAcceptorBuilder {
}
fn finish_setup<I>(mut ctx: SslContextBuilder,
- private_key: &PKeyRef,
+ private_key: &Ref<PKey>,
certificate: &X509Ref,
chain: I)
-> Result<SslAcceptorBuilder, ErrorStack>
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 97b0fe6e..6a6916fc 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -96,7 +96,7 @@ use ec_key::EcKey;
use x509::{X509StoreContextRef, X509FileType, X509, X509Ref, X509VerifyError};
#[cfg(any(ossl102, ossl110))]
use verify::X509VerifyParamRef;
-use pkey::PKeyRef;
+use pkey::PKey;
use error::ErrorStack;
use opaque::Opaque;
use types::Ref;
@@ -615,7 +615,7 @@ impl SslContextBuilder {
}
/// Specifies the private key
- pub fn set_private_key(&mut self, key: &PKeyRef) -> Result<(), ErrorStack> {
+ pub fn set_private_key(&mut self, key: &Ref<PKey>) -> Result<(), ErrorStack> {
unsafe { cvt(ffi::SSL_CTX_use_PrivateKey(self.as_ptr(), key.as_ptr())).map(|_| ()) }
}