diff options
author | Steven Fackler <sfackler@gmail.com> | 2018-05-29 21:53:22 -0700 |
---|---|---|
committer | Steven Fackler <sfackler@gmail.com> | 2018-05-29 21:53:22 -0700 |
commit | 3456add537d03aef8a5becc9cbaa77910a1ecb3f (patch) | |
tree | 95cc0ab016a037e8bd5f560bd798c5a2778a043e /openssl/src/x509/store.rs | |
parent | a523219f6cdf761019d0125bf4818acb90c47477 (diff) | |
download | rust-openssl-3456add537d03aef8a5becc9cbaa77910a1ecb3f.zip |
Add SslRef::verified_chain
Diffstat (limited to 'openssl/src/x509/store.rs')
-rw-r--r-- | openssl/src/x509/store.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/openssl/src/x509/store.rs b/openssl/src/x509/store.rs index 4d6bc9ab..f533d9c7 100644 --- a/openssl/src/x509/store.rs +++ b/openssl/src/x509/store.rs @@ -44,11 +44,11 @@ use ffi; use foreign_types::ForeignTypeRef; use std::mem; -use {cvt, cvt_p}; use error::ErrorStack; use x509::X509; +use {cvt, cvt_p}; -foreign_type! { +foreign_type_and_impl_send_sync! { type CType = ffi::X509_STORE; fn drop = ffi::X509_STORE_free; @@ -82,9 +82,7 @@ impl X509StoreBuilderRef { /// Adds a certificate to the certificate store. // FIXME should take an &X509Ref pub fn add_cert(&mut self, cert: X509) -> Result<(), ErrorStack> { - unsafe { - cvt(ffi::X509_STORE_add_cert(self.as_ptr(), cert.as_ptr())).map(|_| ()) - } + unsafe { cvt(ffi::X509_STORE_add_cert(self.as_ptr(), cert.as_ptr())).map(|_| ()) } } /// Load certificates from their default locations. @@ -97,7 +95,7 @@ impl X509StoreBuilderRef { } } -foreign_type! { +foreign_type_and_impl_send_sync! { type CType = ffi::X509_STORE; fn drop = ffi::X509_STORE_free; |