Commit graph

40 commits

Author SHA1 Message Date
Rashad Sookram
f93cee1ebf
Add receive support for encrypted TOC byte 2024-03-26 10:37:56 -04:00
Rashad Sookram
e700b8d658
Detect received dependency descriptor 2024-02-20 12:46:23 -05:00
Jim Gustafson
6e5158df93 m120 merge fixes
- Use worker_thread TaskQueue for channel operations
- Fix use of deprecated DNS resolver
- Restore quantization of audio levels
- Simplify crypto options change
- Move channel blocking operations to pc
- Sync opus for merge
2024-01-24 09:14:46 -08:00
Jim Gustafson
3d44a9e3b5 Merge branch m120 2024-01-17 12:11:58 -08:00
Saúl Ibarra Corretgé
4408575d18 Reland "Enable SRTP GCM ciphers by default"
This is a reland of commit d8633868b3

Original change's description:
> Enable SRTP GCM ciphers by default
>
> Bug: webrtc:15178
> Change-Id: I0216ce8f194fffc820723d82b9c04a76573c2f4f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305381
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Victor Boivie <boivie@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40828}

Bug: webrtc:15178
Change-Id: I5ea939ed6263547ebc177d9dd1763ba888936866
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321961
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40862}
2023-10-03 22:39:48 +00:00
Manashi Sarkar
c2bbe4b952 Revert "Enable SRTP GCM ciphers by default"
This reverts commit d8633868b3.

Reason for revert: Breaks downstream project.

Original change's description:
> Enable SRTP GCM ciphers by default
>
> Bug: webrtc:15178
> Change-Id: I0216ce8f194fffc820723d82b9c04a76573c2f4f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305381
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Victor Boivie <boivie@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40828}

Bug: webrtc:15178
Change-Id: I88433e899cb4b705eafa3fceff3edc520629f603
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321863
Owners-Override: Artem Titov <titovartem@webrtc.org>
Auto-Submit: Manashi Sarkar <manashi@google.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40832}
2023-09-28 14:42:18 +00:00
Saúl Ibarra Corretgé
d8633868b3 Enable SRTP GCM ciphers by default
Bug: webrtc:15178
Change-Id: I0216ce8f194fffc820723d82b9c04a76573c2f4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305381
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40828}
2023-09-28 10:18:56 +00:00
Rashad Sookram
147fdb9f46 Merge branch 'm112' into 5615 2023-04-27 12:45:13 -04:00
Florent Castelli
a6b9924988 Remove all usage of //rtc_base target
Bug: webrtc:9838
Change-Id: If813dbb426b4dc848185b64c0349d03fa9c059f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290986
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39116}
2023-01-16 14:36:06 +00:00
Florent Castelli
a138c6c8a5 Split rtc_base into multiple targets
Keeping the headers to allow compatibility with current users
that expect the headers to be in that target before they are
also updated.

Bug: webrtc:9838
Change-Id: I8b1e88850958e92c043686587a37791f01860220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290569
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39031}
2023-01-09 12:21:25 +00:00
Peter Thatcher
1a0b210a9d ks 2021-10-29 07:49:26 -06:00
Mirko Bonadei
7750d802a5 Rename rtc_base/ssl_stream_adapter.h constants.
Uppercase constants are more likely to conflict with macros (for
example rtc::SRTP_AES128_CM_SHA1_80 and OpenSSL SRTP_AES128_CM_SHA1_80).

This CL renames some constants and follows the C++ style guide.

Bug: webrtc:12997
Change-Id: I2398232568b352f88afed571a9b698040bb81c30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226564
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34553}
2021-07-26 16:33:54 +00:00
Peter Thatcher
13cb722ac9
Update to WebRTC 4389 (e7d9f74)
Contains changes for M86 (4240), M87 (4280), M88 (4324), and M89 (4389).
2021-04-16 13:26:31 -07:00
Peter Thatcher
a5e62f514e
Enable GCM SRTP crypto suites by default (#22) 2020-08-06 18:20:38 -07:00
Philipp Hancke
b33b12d4fb frame encryptor: remove note about not being production ready
as it has been used in production for a while already.

BUG=None

Change-Id: Idd466f3ad02129a8125e54122e77036959e67aa4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175131
Reviewed-by: Justin Uberti <juberti@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#31817}
2020-07-31 06:49:29 +00:00
Mirko Bonadei
ccbe95fd8a Reformat GN files.
`gn format` recently [1] changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.

Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.

CL generated with:
$ git ls-files | grep BUILD.gn | xargs gn format
$ gn format build_overrides/build.gni
$ gn format build_overrides/gtest.gni
$ gn format modules/audio_coding/audio_coding.gni
$ gn format webrtc.gni
$ gn format .gn

Plus a few manual changes to add exceptions for
"public_deps" (after changing these lines the presubmit
started to complain).

[1] - https://gn-review.googlesource.com/c/gn/+/6860

Bug: webrtc:11302
Change-Id: Iac29d23c1618ebef925c972e2891cd9f4e8cd613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166882
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30334}
2020-01-21 12:13:11 +00:00
Philipp Hancke
2ebbff83ee do not offer gcm as the preferred cipher suite
Move the GCM srtp cipher suites below the default SRTP_AES128_CM_SHA1_80 one.
This will not negotiate them by default since they have an impact on packet overhead for audio-only calls.
GCM can still be negotiated if the peer offers it as preferred cipher suite or answers with just that cipher suite.

BUG=chromium:713701

Change-Id: I79bd4ab827e5c7f55f5550d14db3f4217a7eff86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158404
Reviewed-by: Justin Uberti <juberti@google.com>
Reviewed-by: Justin Uberti <juberti@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Justin Uberti <juberti@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29672}
2019-10-31 20:59:42 +00:00
Mirko Bonadei
86d053c2db Use source_sets in component builds and static_library in release builds.
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).

Source sets always pass all the object files to the linker.

On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.

See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set

Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
2019-10-17 21:17:18 +00:00
Mirko Bonadei
35214fcfe2 Add missing RTC_EXPORT for the component build.
Bug: webrtc:9419
Change-Id: I3225259fb4cc55e9820f590928795f4587f1e3cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153884
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29479}
2019-10-15 09:07:44 +00:00
Mirko Bonadei
eaaaf41298 Introduce api/crypto/BUILD.gn.
No-Try: True
Bug: webrtc:8733
Change-Id: I8679735be1e5069e371a9f1115a54e897e09964b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152622
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29186}
2019-09-13 17:21:47 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Benjamin Wright
2af5dcbe9e Reland "Refactor FrameDecryptorInterface::Decrypt to use new API."
This reverts commit 7dd83e2bf7.

Reason for revert: This wasn't the cause of the break. 

Original change's description:
> Revert "Refactor FrameDecryptorInterface::Decrypt to use new API."
> 
> This reverts commit 642aa81f7d.
> 
> Reason for revert: Speculative revert. The chromium roll is failing:
> https://ci.chromium.org/p/chromium/builders/try/linux-rel/64388
> But I can't figure out exactly what is failing, this looks suspecious.
> 
> Original change's description:
> > Refactor FrameDecryptorInterface::Decrypt to use new API.
> > 
> > This change refactors the FrameDecryptorInterface to use the new API. The new
> > API surface simply moves bytes_written to the return type and implements a
> > simple Status type.
> > 
> > Bug: webrtc:10512
> > Change-Id: I622c5d344d58e618853c94c2f691cf7c8fb73a36
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131460
> > Reviewed-by: Steve Anton <steveanton@webrtc.org>
> > Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Commit-Queue: Benjamin Wright <benwright@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27497}
> 
> TBR=brandtr@webrtc.org,steveanton@webrtc.org,solenberg@webrtc.org,ossu@webrtc.org,stefan@webrtc.org,benwright@webrtc.org
> 
> Change-Id: Ia9ec70263762c34671af13f0d519e636eb8473cd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10512
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132013
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27510}

TBR=brandtr@webrtc.org,steveanton@webrtc.org,solenberg@webrtc.org,hbos@webrtc.org,ossu@webrtc.org,stefan@webrtc.org,benwright@webrtc.org

Change-Id: I8e4b7965cf1d1a1554c3b46e6245f5ad0d2dcbb4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10512
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131982
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27529}
2019-04-09 20:08:56 +00:00
Henrik Boström
7dd83e2bf7 Revert "Refactor FrameDecryptorInterface::Decrypt to use new API."
This reverts commit 642aa81f7d.

Reason for revert: Speculative revert. The chromium roll is failing:
https://ci.chromium.org/p/chromium/builders/try/linux-rel/64388
But I can't figure out exactly what is failing, this looks suspecious.

Original change's description:
> Refactor FrameDecryptorInterface::Decrypt to use new API.
> 
> This change refactors the FrameDecryptorInterface to use the new API. The new
> API surface simply moves bytes_written to the return type and implements a
> simple Status type.
> 
> Bug: webrtc:10512
> Change-Id: I622c5d344d58e618853c94c2f691cf7c8fb73a36
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131460
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Benjamin Wright <benwright@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27497}

TBR=brandtr@webrtc.org,steveanton@webrtc.org,solenberg@webrtc.org,ossu@webrtc.org,stefan@webrtc.org,benwright@webrtc.org

Change-Id: Ia9ec70263762c34671af13f0d519e636eb8473cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10512
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132013
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27510}
2019-04-09 10:36:48 +00:00
Benjamin Wright
642aa81f7d Refactor FrameDecryptorInterface::Decrypt to use new API.
This change refactors the FrameDecryptorInterface to use the new API. The new
API surface simply moves bytes_written to the return type and implements a
simple Status type.

Bug: webrtc:10512
Change-Id: I622c5d344d58e618853c94c2f691cf7c8fb73a36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131460
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27497}
2019-04-08 20:45:09 +00:00
Benjamin Wright
d1c6085cb3 Added FrameDecryptorInterface::Result constructor and IsOk() member function.
Bug: webrtc:10512
Change-Id: I48bdaad57739382b5c1040d94f4e3657e2054e4b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131364
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27475}
2019-04-08 07:04:07 +00:00
Benjamin Wright
72e977135c Add Result FrameDecryptorInterface::Decrypt
This change adds FrameDecryptorInterface::Result to the FrameDecryptorInterface
API. Result contains a Status and bytes_written. This removes requiring out
parameters from the API and provides a simpler status return code for the
function. This is in response to comments suggested here:
https://webrtc-review.googlesource.com/c/src/+/131358

int FrameDecryptorInterface::Decrypt() will be removed in a follow up CL.

Bug: webrtc:10512
Change-Id: I47f19f154d1d8430acd6e4a6f433ab24c455fd51
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131362
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27470}
2019-04-05 21:07:16 +00:00
Steve Anton
f380284035 (7) Rename files to snake_case: remove forwarding headers
Bug: webrtc:10159
Change-Id: I2ba899e0283b953538c7941c8790213e36d7c70e
Reviewed-on: https://webrtc-review.googlesource.com/c/118561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26417}
2019-01-26 00:33:46 +00:00
Steve Anton
aec15aa810 (5) Rename files to snake_case: install forwarding headers
Mechanically generated with this command:

tools_webrtc/do-renames.sh install all-renames.txt && git cl format

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ic8e99f71f2da62e5c99863c6d24a8cfe311466cd
Reviewed-on: https://webrtc-review.googlesource.com/c/115682
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26227}
2019-01-11 17:13:36 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00
Yves Gerey
988cc0870b [Cleanup] Add missing #include. Remove useless ones.
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.

bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
2018-10-23 11:32:56 +00:00
Benjamin Wright
bfb444ce2c Adds new CryptoOption crypto_options.frame.require_frame_encryption.
This change adds a new subcategory to the public native webrtc::CryptoOptions
structure: webrtc::CryptoOptions::Frame.

This new structure has a single off by default property:
crypto_options.frame.require_frame_encryption.

This new flag if set prevents RtpSenders from sending outgoing payloads unless
a frame_encryptor_ is attached and prevents RtpReceivers from receiving
incoming payloads unless a frame_decryptor_ is attached.

This option is important to enforce no unencrypted data can ever leave the
device or be received.

I have also attached bindings for Java and Objective-C.

I have implemented this functionality for E2EE audio but not E2EE video
since the changes are still in review.

Bug: webrtc:9681
Change-Id: Ie184711190e0cdf5ac781f69e9489ceec904736f
Reviewed-on: https://webrtc-review.googlesource.com/c/105540
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25238}
2018-10-17 17:44:19 +00:00
Benjamin Wright
5e23a41ef4 Removes backwards compatability CryptoOptions support.
CryptoOptions provided top level optional fields to support Chromium and
internal use cases. These locations have been updated to use the new API and
this CL removes these legacy compatability options.

This CL will be checked in after the chromium CL lands:
https://chromium-review.googlesource.com/c/chromium/src/+/1275025

Bug: webrtc:9860
Change-Id: I2790b42c91c49b83e5380a5271df2ceda556c53f
Reviewed-on: https://webrtc-review.googlesource.com/c/105644
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25148}
2018-10-12 18:22:23 +00:00
Benjamin Wright
a54daf162f Reland "Move CryptoOptions to api/crypto from rtc_base/sslstreamadapter.h"
Promotes rtc::CryptoOptions to webrtc::CryptoOptions converting it from class
that only handles SRTP configuration to a more generic structure that can be
used and extended for all per peer connection CryptoOptions that can be on a
given PeerConnection.

Now all SRTP related options are under webrtc::CryptoOptions::Srtp and can be
accessed as crypto_options.srtp.whatever_option_name. This is more inline with
other structures we have in WebRTC such as VideoConfig. As additional features
are added over time this will allow the structure to remain compartmentalized
and concerned components can only request a subset of the overall configuration
structure e.g:

void MySrtpFunction(const webrtc::CryptoOptions::Srtp& srtp_config);

In addition to this it made little sense for sslstreamadapter.h to hold all
Srtp related configuration options. The header has become loo large and takes on
too many responsibilities and spilting this up will lead to more maintainable
code going forward.

This will be used in a future CL to enable configuration options for the newly
supported Frame Crypto.

Reland Fix:
- cryptooptions.h - now has enable_aes128_sha1_32_crypto_cipher as an optional
                    root level configuration.
- peerconnectionfactory - If this optional is set will now overwrite the
                          underyling value.

This along with the other field will be deprecated once dependent projects
are updated.

TBR=sakal@webrtc.org,kthelgason@webrtc.org,emadomara@webrtc.org,qingsi@webrtc.org

Bug: webrtc:9681
Change-Id: Iaa6b741baafb85d352e42f54226119f19d97151d
Reviewed-on: https://webrtc-review.googlesource.com/c/105560
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Emad Omara <emadomara@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25135}
2018-10-11 23:09:07 +00:00
Oleh Prypin
8f4bc41c42 Revert "Move CryptoOptions to api/crypto from rtc_base/sslstreamadapter.h"
This reverts commit ac2f3d14e4.

Reason for revert: Breaks downstream project

Original change's description:
> Move CryptoOptions to api/crypto from rtc_base/sslstreamadapter.h
> 
> Promotes rtc::CryptoOptions to webrtc::CryptoOptions converting it from class
> that only handles SRTP configuration to a more generic structure that can be
> used and extended for all per peer connection CryptoOptions that can be on a
> given PeerConnection.
> 
> Now all SRTP related options are under webrtc::CryptoOptions::Srtp and can be
> accessed as crypto_options.srtp.whatever_option_name. This is more inline with
> other structures we have in WebRTC such as VideoConfig. As additional features
> are added over time this will allow the structure to remain compartmentalized
> and concerned components can only request a subset of the overall configuration
> structure e.g:
> 
> void MySrtpFunction(const webrtc::CryptoOptions::Srtp& srtp_config);
> 
> In addition to this it made little sense for sslstreamadapter.h to hold all
> Srtp related configuration options. The header has become loo large and takes on
> too many responsibilities and spilting this up will lead to more maintainable
> code going forward.
> 
> This will be used in a future CL to enable configuration options for the newly
> supported Frame Crypto.
> 
> Change-Id: I99d1be36740c59548c8e62db52d68d738649707f
> Bug: webrtc:9681
> Reviewed-on: https://webrtc-review.googlesource.com/c/105180
> Reviewed-by: Emad Omara <emadomara@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Commit-Queue: Benjamin Wright <benwright@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25130}

TBR=steveanton@webrtc.org,sakal@webrtc.org,kthelgason@webrtc.org,emadomara@webrtc.org,qingsi@webrtc.org,benwright@webrtc.org

Bug: webrtc:9681
Change-Id: Ib0075c477c951b540d4deecb3b0cf8cf86ba0fff
Reviewed-on: https://webrtc-review.googlesource.com/c/105541
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25133}
2018-10-11 21:59:05 +00:00
Benjamin Wright
ac2f3d14e4 Move CryptoOptions to api/crypto from rtc_base/sslstreamadapter.h
Promotes rtc::CryptoOptions to webrtc::CryptoOptions converting it from class
that only handles SRTP configuration to a more generic structure that can be
used and extended for all per peer connection CryptoOptions that can be on a
given PeerConnection.

Now all SRTP related options are under webrtc::CryptoOptions::Srtp and can be
accessed as crypto_options.srtp.whatever_option_name. This is more inline with
other structures we have in WebRTC such as VideoConfig. As additional features
are added over time this will allow the structure to remain compartmentalized
and concerned components can only request a subset of the overall configuration
structure e.g:

void MySrtpFunction(const webrtc::CryptoOptions::Srtp& srtp_config);

In addition to this it made little sense for sslstreamadapter.h to hold all
Srtp related configuration options. The header has become loo large and takes on
too many responsibilities and spilting this up will lead to more maintainable
code going forward.

This will be used in a future CL to enable configuration options for the newly
supported Frame Crypto.

Change-Id: I99d1be36740c59548c8e62db52d68d738649707f
Bug: webrtc:9681
Reviewed-on: https://webrtc-review.googlesource.com/c/105180
Reviewed-by: Emad Omara <emadomara@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25130}
2018-10-11 19:14:42 +00:00
Benjamin Wright
1f87ec6813 Add AEAD support to Frame Encryption API. Add Contribuitng Source To Decryptor.
This change allows supporting additional data for authentication and adds a
requirement for the contributing source to be provided during decryption.

Change-Id: Ifc19cb2d8a7d6c3715c83c95cf12f64df0bca454
Bug: webrtc:9681
Reviewed-on: https://webrtc-review.googlesource.com/100001
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24712}
2018-09-12 21:09:30 +00:00
Benjamin Wright
88e3e3f570 Updated FrameEncryptorInterface and FrameDecryptorInterface with status code.
This change allows an implementer to provide a custom error code to be returned
on failure with 0 being reserved for success. It also modifies the output size
APIs to be more specific and requests the number of bytes written to be returned
so we can determine how many bytes we need to send.

Bug: webrtc:9681
Change-Id: I13d34861bf851527fcbb350d0cfb480c0f95a6b3
Reviewed-on: https://webrtc-review.googlesource.com/98720
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24613}
2018-09-06 21:08:59 +00:00
Benjamin Wright
d81ac953aa Injects FrameEncryptorInterface into RtpSender.
This change injects the FrameEncryptorInterface and the FrameDecryptorInterface
into the RtpSenderInterface and RtpReceiverInterface respectively. This is the
second stage of the injection. In a follow up CL non owning pointers to these
values will be passed down into the media channel.

This change also updates the corresponding mock files.

Bug: webrtc:9681
Change-Id: I964084fc270e10af9d1127979e713493e6fbba7d
Reviewed-on: https://webrtc-review.googlesource.com/96625
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24489}
2018-08-30 00:33:54 +00:00
Benjamin Wright
ea0869145e This change integrates the FrameEncryptorInterface and the
FrameDecryptorInterface into the public WebRTC API surface.

This change just addresses the headers and not the internal changes.

Bug: webrtc:9681
Change-Id: I1db0172fe55ba378f62e7781c2b7dcdb93d63239
Reviewed-on: https://webrtc-review.googlesource.com/96622
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24488}
2018-08-29 21:15:19 +00:00