From 3a32ea51f7961d0f7b2d15f6ce3481dafcb14c42 Mon Sep 17 00:00:00 2001 From: 0x676e67 Date: Sat, 21 Jun 2025 19:54:17 +0800 Subject: [PATCH] docs(connector): update documents --- boring/src/ssl/connector.rs | 42 +------------------------------------ 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/boring/src/ssl/connector.rs b/boring/src/ssl/connector.rs index f4836e85..4061a82c 100644 --- a/boring/src/ssl/connector.rs +++ b/boring/src/ssl/connector.rs @@ -266,14 +266,6 @@ impl ConnectConfiguration { impl ConnectConfiguration { /// Enables or disables ECH grease. - /// - /// # Arguments - /// - /// * `enable` - A boolean indicating whether to enable ECH grease. - /// - /// # Safety - /// - /// This function is unsafe because it calls an FFI function. #[cfg(not(feature = "fips"))] #[corresponds(SSL_set_enable_ech_grease)] pub fn set_enable_ech_grease(&mut self, enable: bool) { @@ -298,19 +290,7 @@ impl ConnectConfiguration { unsafe { ffi::SSL_set_prefer_chacha20(self.as_ptr(), enable as _) } } - /// Adds application settings. - /// - /// # Arguments - /// - /// * `alps` - A slice of bytes representing the application settings. - /// - /// # Returns - /// - /// * `Result<(), ErrorStack>` - Returns `Ok(())` if the operation is successful, otherwise returns an `ErrorStack`. - /// - /// # Safety - /// - /// This function is unsafe because it calls an FFI function. + /// Sets application settings flag for ALPS (Application-Layer Protocol Negotiation). #[corresponds(SSL_add_application_settings)] pub fn add_application_settings(&mut self, alps: &[u8]) -> Result<(), ErrorStack> { unsafe { @@ -326,32 +306,12 @@ impl ConnectConfiguration { } /// Sets the ALPS use new codepoint flag. - /// - /// # Arguments - /// - /// * `use_new` - A boolean indicating whether to use the new codepoint. - /// - /// # Safety - /// - /// This function is unsafe because it calls an FFI function. #[corresponds(SSL_set_alps_use_new_codepoint)] pub fn set_alps_use_new_codepoint(&mut self, use_new: bool) { unsafe { ffi::SSL_set_alps_use_new_codepoint(self.as_ptr(), use_new as _) } } /// Sets the SSL options. - /// - /// # Arguments - /// - /// * `options` - An `SslOptions` bitmask representing the options to set. - /// - /// # Returns - /// - /// * `Result<(), ErrorStack>` - Returns `Ok(())` if the operation is successful, otherwise returns an `ErrorStack`. - /// - /// # Safety - /// - /// This function is unsafe because it calls an FFI function. #[corresponds(SSL_set_options)] pub fn set_options(&mut self, options: SslOptions) -> Result<(), ErrorStack> { unsafe { cvt(ffi::SSL_set_options(self.as_ptr(), options.bits()) as _).map(|_| ()) }