Commit 0bcee646 authored by mxheller's avatar mxheller
Browse files

SslContextBuilder::verify_param

parent e8b7b4a8
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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.