summaryrefslogtreecommitdiff
path: root/openssl/src/ssl
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/src/ssl')
-rw-r--r--openssl/src/ssl/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index e69b3ca5..6958fa81 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -1995,6 +1995,18 @@ impl SslContextRef {
let mode = unsafe { ffi::SSL_CTX_get_verify_mode(self.as_ptr()) };
SslVerifyMode::from_bits(mode).expect("SSL_CTX_get_verify_mode returned invalid mode")
}
+
+ /// Returns a mutable reference to the X509 verification configuration.
+ ///
+ /// Requires OpenSSL 1.0.2 or newer.
+ ///
+ /// This corresponds to [`SSL_CTX_get0_param`].
+ ///
+ /// [`SSL_CTX_get0_param`]: https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_get0_param.html
+ #[cfg(any(ossl102, libressl261))]
+ pub fn param_mut(&mut self) -> &mut X509VerifyParamRef {
+ unsafe { X509VerifyParamRef::from_ptr_mut(ffi::SSL_CTX_get0_param(self.as_ptr())) }
+ }
}
/// Information about the state of a cipher.