Skip to content

Commit 1eaf74c

Browse files
committed
Bug 1928110 - Vendor libwebrtc from d79a1859e0
Upstream commit: https://webrtc.googlesource.com/src/+/d79a1859e058b6a030177b24ed8e4bb14525af79 ssl: increase default RSA key size to 2048 bits since 1024 is already deprecated by OpenSSL and causes "too small key" issues on systems enforcing a minimum size. Similar issue here: nodejs/node#44498 The minimum key size is not yet changed from 1024, this will require more effort for deprecation. BUG=webrtc:364338811 Change-Id: Id4b24a2c289ec5e3f112288d32b8ac697ba1cfed Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361128 Reviewed-by: David Benjamin <[email protected]> Reviewed-by: Harald Alvestrand <[email protected]> Commit-Queue: Philipp Hancke <[email protected]> Cr-Commit-Position: refs/heads/main@{#43110}
1 parent 770b0b9 commit 1eaf74c

7 files changed

+142
-93
lines changed

third_party/libwebrtc/README.moz-ff-commit

+3
Original file line numberDiff line numberDiff line change
@@ -33123,3 +33123,6 @@ a6e555648e
3312333123
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
3312433124
# base of lastest vendoring
3312533125
a6fbb35ac1
33126+
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
33127+
# base of lastest vendoring
33128+
d79a1859e0

third_party/libwebrtc/README.mozilla

+2
Original file line numberDiff line numberDiff line change
@@ -22108,3 +22108,5 @@ libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc
2210822108
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-11-19T17:34:26.240686.
2210922109
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
2211022110
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-11-19T17:35:25.280581.
22111+
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
22112+
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-11-19T17:36:24.201635.

third_party/libwebrtc/rtc_base/boringssl_identity.cc

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ std::unique_ptr<SSLIdentity> BoringSSLIdentity::CreateFromPEMChainStrings(
129129
uint32_t err = ERR_peek_error();
130130
if (ERR_GET_LIB(err) == ERR_LIB_PEM &&
131131
ERR_GET_REASON(err) == PEM_R_NO_START_LINE) {
132+
err = ERR_get_error();
132133
break;
133134
}
134135
RTC_LOG(LS_ERROR) << "Failed to parse certificate from PEM string.";

third_party/libwebrtc/rtc_base/openssl_identity.cc

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ std::unique_ptr<SSLIdentity> OpenSSLIdentity::CreateFromPEMChainStrings(
128128
uint32_t err = ERR_peek_error();
129129
if (ERR_GET_LIB(err) == ERR_LIB_PEM &&
130130
ERR_GET_REASON(err) == PEM_R_NO_START_LINE) {
131+
err = ERR_get_error();
131132
break;
132133
}
133134
RTC_LOG(LS_ERROR) << "Failed to parse certificate from PEM string: "

third_party/libwebrtc/rtc_base/openssl_stream_adapter.cc

+6-2
Original file line numberDiff line numberDiff line change
@@ -1131,8 +1131,10 @@ static const cipher_list OK_RSA_ciphers[] = {
11311131
#ifdef TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA256
11321132
CDEF(ECDHE_RSA_WITH_AES_256_GCM_SHA256),
11331133
#endif
1134-
#ifdef TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
1134+
#ifdef TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 // BoringSSL.
11351135
CDEF(ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256),
1136+
#elif defined(TLS1_RFC_ECDHE_ECDSA_WITH_CHACHA20_POLY1305) // OpenSSL.
1137+
CDEF(ECDHE_RSA_WITH_CHACHA20_POLY1305),
11361138
#endif
11371139
};
11381140

@@ -1143,8 +1145,10 @@ static const cipher_list OK_ECDSA_ciphers[] = {
11431145
#ifdef TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA256
11441146
CDEF(ECDHE_ECDSA_WITH_AES_256_GCM_SHA256),
11451147
#endif
1146-
#ifdef TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
1148+
#ifdef TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 // BoringSSL.
11471149
CDEF(ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256),
1150+
#elif defined(TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305) // OpenSSL.
1151+
CDEF(ECDHE_ECDSA_WITH_CHACHA20_POLY1305),
11481152
#endif
11491153
};
11501154
#undef CDEF

third_party/libwebrtc/rtc_base/ssl_identity.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ class SSLCertificate;
3232
// KT_DEFAULT is used as the default KeyType for KeyParams.
3333
enum KeyType { KT_RSA, KT_ECDSA, KT_LAST, KT_DEFAULT = KT_ECDSA };
3434

35-
static const int kRsaDefaultModSize = 1024;
35+
static const int kRsaDefaultModSize = 2048;
3636
static const int kRsaDefaultExponent = 0x10001; // = 2^16+1 = 65537
37+
// TODO(bugs.webrtc.org/364338811): raise the bar to 2048 bits.
3738
static const int kRsaMinModSize = 1024;
3839
static const int kRsaMaxModSize = 8192;
3940

0 commit comments

Comments
 (0)