* IWYU export <sys/socket.h> from rtc_base/net_helpers.h.
* Add a presubmit check to ensures that <sys/socket.h> is included through net_helpers.h (expect if there is a IWYU pragma or a no-presubmit-check).
* Clean up existing includes of <sys/socket.h>
Change-Id: I4bc6cce045c046287f8f74f89edfc9321293b274
Bug: b/236227627
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362082
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42996}
When the stdlib task queue has no work for >= 3s on
Android, it will emit bogus deadlock warnings. Fix
this by ensuring we're not triggering this behavior.
Fixed: b/364436627
Change-Id: I3fe02e13993cbb4a59d5669df06c4c293d237bc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361721
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42955}
rtc::Network must be defined before classes that
use it as an instance variable.
Bug: webrtc:360158397
Change-Id: I5ca0acbc70cb5c27318d0ad01081b10b0b4dbff5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360440
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Ho Cheung <hocheung@chromium.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42843}
improving the error message from PEM parsing and adding a few DCHECKs
Tested locally with OpenSSL 3.x
BUG=webrtc:42225468
Change-Id: Ia2ff1e5826f486060db73bee979e2703fc6c5823
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358441
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: David Benjamin <davidben@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42776}
since OpenSSL 3.x deprecated SHA1 there and SHA256 has been the default
in Chrome for a decade. Test all variants with a reduced test suite.
BUG=webrtc:42225468
Change-Id: I728bfd953c3248d6a7804c55ab71009fcc701a45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358820
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42765}
If the includes are in /usr/include, adding this path to the include path
may break resolution of internal compiler headers.
If the variable is required, I would expect users to already have it set
properly.
Bug: None
Change-Id: I1d86776da4ae516aba99c58ecee1135dcd27aec8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359240
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42763}
BoringSSL includes cannot be included in an OpenSSL build.
Links the SSL related target against the crypto and ssl libs
the proper way.
Bug: None
Change-Id: I4252e6207815d7d7e35bb8d4d966e3d1b83e659d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358941
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42754}
SHA384 and SHA512 are not yet tested since our (custom)
HMAC code does not support those algorithms and rejects a block size.
Note that this is only used for computing TURN MD5 and STUN SHA1 HMACs
BUG=None
Change-Id: Idabc651d988a5e5f3abd1fad0f36726bcc7a69a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358780
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42753}
follow-up to
https://webrtc-review.googlesource.com/c/src/+/358300
which links the unit tests against OpenSSL when building with that by using
rtc_build_ssl = false
rtc_ssl_root = "/usr/include/openssl"
as gn args which showed an additional gn check failure
BUG=None
Change-Id: Id3356f3e211509141f2a05f096f19a7b1b8eee9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358340
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42720}
To test:
- ensure openssl files live in /usr/include/openssl
- make a config with the following values:
```
rtc_build_ssl = false
rtc_ssl_root = "/usr/include/openssl
```
- compile rtc_unittests
There will be link errors, but no compile errors.
Bug: None
Change-Id: I3d28b1613e11a716b11c7def808100ef58ab75f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358300
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42714}
since we do not need two adapters with TLS and DTLS modes.
SSLAdapter is the TLS adapter,
SSLStreamAdapter is the DTLS adapter.
BUG=webrtc:353750117
Change-Id: I223917c71c88437339380e1f196dcf3c0e2021c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42713}
This is a reland of commit e13945bf07
with additional backward compability defaulting to the new value.
Original change's description:
> Enable TLS Client Hello extension permutation by default
>
> similar to the previous change for DTLS. This affects native TURN/TLS
> connections which are already using this in Chromium.
>
> BUG=webrtc:422225803
>
> Change-Id: I605f106371f2dbe23b1ad5f8385e0e01abe7c48f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357903
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42688}
Bug: webrtc:422225803
Change-Id: Ic194e4f763029e65c1a15a6bbaabcfbcd2866eac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358120
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42702}
similar to the previous change for DTLS. This affects native TURN/TLS
connections which are already using this in Chromium.
BUG=webrtc:422225803
Change-Id: I605f106371f2dbe23b1ad5f8385e0e01abe7c48f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357903
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42688}
this is flipping
WebRTC-PermuteTlsClientHello
to a killswitch in the SSLStreamAdapter used for DTLS.
BUG=webrtc:42225803
Change-Id: I942851c474ec5e723c5b6c9f6206e7eafbe80ea4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357901
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42676}
num_ref are represented using golomb and may be very large.
BitstreamReader is generally resilent to many consenquites fail reads, but not when number of reads comparable to int limit.
This change address the issue in two ways, either one is enough, but both are helpful in their own way:
H264 parser now fails faster when number of references is too large.
BitstreamReader now is resilent to unlimited number of fail reads.
Bug: chromium:352402499
Change-Id: I19646bc3f53cd2970393d00bc143400b1fdf5473
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357100
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42628}
Some dependencies still exist but are a bit more complex to remove.
This CL removes either unused or easily replaced with ToString()
instances of ostream usage. In one case, moving the operator<<
implementation to the one test file that requires it.
Bug: webrtc:8982
Change-Id: Ia5c840b12a42893494af401317a3daf2fe50ba9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356240
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42582}
Otherwise targets which don't need threads but transitively include this
fail to build due to missing thread priority symbols as described in the
bug.
Bug: webrtc:349961287
Change-Id: I33098a150387b8d20ab9344f49d7c7cb19be2db4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355901
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42563}
In https://webrtc-review.googlesource.com/c/src/+/355181 I supposed to add RTC_EXPORT to the TimeUTCMicros function. However in the code I added it to TimeUTCMillis(). I hadn't realized there where two similar functions, so I did a poor error check.
I think it make sense to have RTC_EXPORT on both of them, since they are similar. So I opted to not revert the change in the previous faulty CL.
Bug: chromium:333359951
Change-Id: Icb3d3adeebd4fbf56244986a9e801bee84ff04df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355760
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42546}