aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl/mod.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-08-05 20:55:05 -0700
committerSteven Fackler <[email protected]>2016-08-05 20:55:05 -0700
commitb4145c6fa51ad59b0df2e0f48f67b8a0e56e1863 (patch)
tree5da4891856d6c6f305d8bc77eb1635c6913a272b /openssl/src/ssl/mod.rs
parentMake x509 constructors unsafe (diff)
downloadrust-openssl-b4145c6fa51ad59b0df2e0f48f67b8a0e56e1863.tar.xz
rust-openssl-b4145c6fa51ad59b0df2e0f48f67b8a0e56e1863.zip
Clean up x509
Diffstat (limited to 'openssl/src/ssl/mod.rs')
-rw-r--r--openssl/src/ssl/mod.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 8cfc209a..c95f2646 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -21,7 +21,7 @@ use std::marker::PhantomData;
use ffi;
use dh::DH;
-use x509::{X509StoreContext, X509FileType, X509};
+use x509::{X509StoreContext, X509FileType, X509, X509Ref};
use crypto::pkey::PKey;
use error::ErrorStack;
@@ -577,15 +577,15 @@ impl SslContext {
}
/// Specifies the certificate
- pub fn set_certificate(&mut self, cert: &X509) -> Result<(), ErrorStack> {
- wrap_ssl_result(unsafe { ffi::SSL_CTX_use_certificate(self.ctx, cert.get_handle()) })
+ pub fn set_certificate(&mut self, cert: &X509Ref) -> Result<(), ErrorStack> {
+ wrap_ssl_result(unsafe { ffi::SSL_CTX_use_certificate(self.ctx, cert.handle()) })
}
/// Adds a certificate to the certificate chain presented together with the
/// certificate specified using set_certificate()
- pub fn add_extra_chain_cert(&mut self, cert: &X509) -> Result<(), ErrorStack> {
+ pub fn add_extra_chain_cert(&mut self, cert: &X509Ref) -> Result<(), ErrorStack> {
wrap_ssl_result(unsafe {
- ffi::SSL_CTX_add_extra_chain_cert(self.ctx, cert.get_handle()) as c_int
+ ffi::SSL_CTX_add_extra_chain_cert(self.ctx, cert.handle()) as c_int
})
}
@@ -910,7 +910,7 @@ impl Ssl {
if ptr.is_null() {
None
} else {
- Some(X509::new(ptr, true))
+ Some(X509::new(ptr))
}
}
}