From 0bcee646bf60a8d7a5fbd32545c52ec1da4bf82d Mon Sep 17 00:00:00 2001 From: mxheller Date: Mon, 16 Nov 2020 18:08:03 -0500 Subject: [PATCH] SslContextBuilder::verify_param --- openssl/src/ssl/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 8a91305c9..639fa948b 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -1342,6 +1342,18 @@ impl SslContextBuilder { unsafe { X509StoreBuilderRef::from_ptr_mut(ffi::SSL_CTX_get_cert_store(self.as_ptr())) } } + /// Returns a 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 verify_param(&self) -> &X509VerifyParamRef { + unsafe { X509VerifyParamRef::from_ptr(ffi::SSL_CTX_get0_param(self.as_ptr())) } + } + /// Returns a mutable reference to the X509 verification configuration. /// /// Requires OpenSSL 1.0.2 or newer. -- GitLab