Merge branch 'docs'

This commit is contained in:
0x676e67 2025-06-21 19:54:27 +08:00
commit f8918297cc
1 changed files with 1 additions and 41 deletions

View File

@ -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(|_| ()) }