Skip to content

Commit 4514d19

Browse files
committed
add set_permute_extensions for boringssl
1 parent feb1e2f commit 4514d19

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

openssl/src/ssl/mod.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,6 +1683,18 @@ impl SslContextBuilder {
16831683
unsafe { ffi::SSL_CTX_set_grease_enabled(self.as_ptr(), enabled as c_int) }
16841684
}
16851685

1686+
/// Configures whether sockets on ctx should permute extensions.
1687+
///
1688+
/// This corresponds to [`SSL_CTX_set_permute_extensions`].
1689+
///
1690+
/// [`SSL_CTX_set_permute_extensions`]: https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#SSL_CTX_set_permute_extensions
1691+
///
1692+
/// Requires BoringSSL.
1693+
#[cfg(boringssl)]
1694+
pub fn set_permute_extensions(&mut self, enabled: bool) {
1695+
unsafe { ffi::SSL_CTX_set_permute_extensions(self.as_ptr(), enabled as c_int) }
1696+
}
1697+
16861698
/// Enable the processing of signed certificate timestamps (SCTs) for all connections that share the given SSL context.
16871699
#[corresponds(SSL_CTX_enable_ct)]
16881700
#[cfg(ossl111)]
@@ -3403,6 +3415,18 @@ impl SslRef {
34033415
unsafe { ffi::SSL_enable_signed_cert_timestamps(self.as_ptr()) }
34043416
}
34053417

3418+
/// Configures whether sockets on ssl should permute extensions.
3419+
///
3420+
/// This corresponds to [`SSL_set_permute_extensions`].
3421+
///
3422+
/// [`SSL_set_permute_extensions`]: https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#SSL_set_permute_extensions
3423+
///
3424+
/// Requires BoringSSL.
3425+
#[cfg(boringssl)]
3426+
pub fn set_permute_extensions(&mut self, enabled: bool) {
3427+
unsafe { ffi::SSL_set_permute_extensions(self.as_ptr(), enabled as c_int) }
3428+
}
3429+
34063430
/// Enable the processing of signed certificate timestamps (SCTs) for the given SSL connection.
34073431
#[corresponds(SSL_enable_ct)]
34083432
#[cfg(ossl111)]

0 commit comments

Comments
 (0)