diff options
author | Max Heller <hellerm@deshaw.com> | 2020-11-13 11:14:04 -0500 |
---|---|---|
committer | mxheller <max.a.heller@gmail.com> | 2020-11-17 21:30:03 -0500 |
commit | 6857463592e0474459ede9b73329e2ce1e751b1f (patch) | |
tree | 69bf5ae3cd3124c7c73b7a4e7048fb68203df2c3 /openssl/src/ssl | |
parent | 39e2d12eb6b051b8676e10f7d2ba18d11b686093 (diff) | |
download | rust-openssl-6857463592e0474459ede9b73329e2ce1e751b1f.zip |
SSL_CTX_get0_param
Diffstat (limited to 'openssl/src/ssl')
-rw-r--r-- | openssl/src/ssl/mod.rs | 12 |
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. |