Loading openssl-sys/src/ssl.rs +3 −0 Original line number Diff line number Diff line Loading @@ -1003,6 +1003,9 @@ extern "C" { pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; #[cfg(any(ossl102, libressl261))] pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; #[cfg(any(ossl102, libressl261))] pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; } Loading openssl/src/ssl/mod.rs +12 −0 Original line number Diff line number Diff line Loading @@ -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. Loading Loading
openssl-sys/src/ssl.rs +3 −0 Original line number Diff line number Diff line Loading @@ -1003,6 +1003,9 @@ extern "C" { pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; #[cfg(any(ossl102, libressl261))] pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; #[cfg(any(ossl102, libressl261))] pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; } Loading
openssl/src/ssl/mod.rs +12 −0 Original line number Diff line number Diff line Loading @@ -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. Loading