Skip to content

Commit f57f4e4

Browse files
committed
Update
1 parent 503819f commit f57f4e4

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

boring-sys/patches/boringssl-44b3df6f03d85c901767250329c571db405122d5.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5099,7 +5099,7 @@ index 6e5cc2da1..b1b31f3a7 100644
50995099
ticket_age_skew < std::numeric_limits<int32_t>::min()) {
51005100
return false;
51015101
diff --git a/src/ssl/handshake_client.cc b/src/ssl/handshake_client.cc
5102-
index 971ebd0b1..abcc9ef47 100644
5102+
index 971ebd0b1..3ccda1a78 100644
51035103
--- a/src/ssl/handshake_client.cc
51045104
+++ b/src/ssl/handshake_client.cc
51055105
@@ -158,6 +158,8 @@
@@ -5134,7 +5134,7 @@ index 971ebd0b1..abcc9ef47 100644
51345134
- return false;
51355135
+ if (ssl->config->preserve_tls13_cipher_list &&
51365136
+ ssl->ctx->tls13_cipher_list != NULL &&
5137-
+ sk_SSL_CIPHER_num(ssl->ctx->tls13_cipher_list->ciphers.get()) == 3) {
5137+
+ sk_SSL_CIPHER_num(ssl->ctx->tls13_cipher_list->ciphers.get()) >= 1) {
51385138
+ for (size_t i = 0; i < sk_SSL_CIPHER_num(ssl->ctx->tls13_cipher_list->ciphers.get()); i++) {
51395139
+ const SSL_CIPHER *cipher = sk_SSL_CIPHER_value(ssl->ctx->tls13_cipher_list->ciphers.get(), i);
51405140
+ uint16_t cipher_id = SSL_CIPHER_get_protocol_id(cipher);

boring/src/ssl/mod.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1910,14 +1910,26 @@ impl SslContextBuilder {
19101910
unsafe { ffi::SSL_CTX_set_aes_hw_override(self.as_ptr(), enable as _) }
19111911
}
19121912

1913-
/// Sets whether the preserve TLS 1.3 cipher list option should be enabled.
1913+
/// Sets whether to preserve the TLS 1.3 cipher list as configured by [`Self::set_cipher_list`].
1914+
///
1915+
/// By default, BoringSSL does not preserve the TLS 1.3 cipher list. When this option is disabled
1916+
/// (the default), BoringSSL uses its internal default TLS 1.3 cipher suites in its default order,
1917+
/// regardless of what is set via [`Self::set_cipher_list`].
1918+
///
1919+
/// When enabled, this option ensures that the TLS 1.3 cipher suites explicitly set via
1920+
/// [`Self::set_cipher_list`] are retained in their original order, without being reordered or
1921+
/// modified by BoringSSL's internal logic. This is useful for maintaining specific cipher suite
1922+
/// priorities for TLS 1.3. Note that if [`Self::set_cipher_list`] does not include any TLS 1.3
1923+
/// cipher suites, BoringSSL will still fall back to its default TLS 1.3 cipher suites and order.
19141924
///
19151925
/// This feature isn't available in the certified version of BoringSSL.
19161926
///
19171927
/// # Note
19181928
///
1919-
/// This method must be called before [`Self::set_cipher_list`] to take effect.
1929+
/// This method must be called **before** [`Self::set_cipher_list`] to take effect.
19201930
/// If called after [`Self::set_cipher_list`], the setting will be ignored.
1931+
///
1932+
/// [`Self::set_cipher_list`]: #method.set_cipher_list
19211933
#[cfg(not(feature = "fips"))]
19221934
#[corresponds(SSL_CTX_set_preserve_tls13_cipher_list)]
19231935
pub fn set_preserve_tls13_cipher_list(&mut self, enable: bool) {

0 commit comments

Comments
 (0)