[ Cherry-pick of v19 http://go/wvgerrit/219592 ]
[ Merge of http://go/wvgerrit/219554 ]
The original CheckBuildInformation_OutputLengthAPI17 test was
written with the assumption that the estimated length would not
be too much larger than the real length of the build info; however
this is not true for some vendors.
This CL changes the short-buffer length to be based on a real
build info length from a successful call to OEMCrypto.
Bug: 411308060
Change-Id: I6504288ca59d7d41facaadc45adc76a5236826d9
[ Merge of http://go/wvgerrit/219213 ]
Updates CheckJsonBuildInformationAPI18 to better check the contents
of the JSON build information introduced in V18.
Bug: 348498112
Bug: 348497732
Change-Id: I567700eb2ba451a9b10c52159d5fd30d5ae94841
[ Merge of http://go/wvgerrit/219212 ]
This CL adds a new OEMCrypto test CheckBuildInformation*API17 which
ensures that OEMCrypto_BuildInformation() is generating valid build
information.
Bug: 348498112
Bug: 348497732
Change-Id: I22f9878d8ffa05b2b1b1b6ec28718e231438d4a7
Merged-In: I22f9878d8ffa05b2b1b1b6ec28718e231438d4a7
Merge of https://widevine-internal-review.git.corp.google.com/c/cdm/+/206431
Message to be signed by CAST funciton is supposed to be in a certain
format: "constant prefix + SHA1(message)".
Some of our current CAST tests uses random message which break this
specification. This fixes the input message.
Test: Cast tests with run_fake_l1_tests
Bug: 359893908
Change-Id: I6b318d749971d837f13daa7b147313e8e0b1d3d0
We are receiving reports from partners in the field that they are
failing the OEMCrypto tests only because the tests assume the BCC will
fit into 5k of memory but their BCC is nearly 8k in size.
This patch increases the buffer to 10k.
Bug: 354834629
Test: x86-64
Merged from https://widevine-internal-review.googlesource.com/204773
Change-Id: I360196518b7651139c003505253d1aed6a0c3907
This is based on a patch submitted by Amlogic.
When we're doing decrypt fallback, either in the CDM or the OEMCrypto
tests, we sometimes fall back to a point where we're synthesizing new
samples and/or subsamples for the content being decrypted. When this
happens and the output buffer is clear, we should limit the size of the
output buffer to only the space needed to hold the output.
Previously, we've been passing the entire output buffer to every call.
This can create a problem if the reason for the fallback is a lack of
enough memory to communicate the buffers to the TA, since the output
buffer will remain the same size as the total output. Restricting the
buffer passed to each call to only the space needed by that call will
reduce the memory requirement.
Bug: 354834629
Test: x86-64
Merged from https://widevine-internal-review.googlesource.com/204810
Merged from https://widevine-internal-review.googlesource.com/204953
Change-Id: I412f43d8f88c72072ef1dd5293436bdb58e500b3
The docs on OEMCrypto_DecryptCENC() weren't updated correctly when we
allowed the (0,0) pattern in v17. This patch brings the header docs
in-line with the handwritten part of the devsite documentation.
Merged from http://go/wvgerrit/204630
Bug: 336330529
Change-Id: Ic6c81d8f04904b83c34fbc0235ebbae8705a4182
[ Merge of http://go/wvgerrit/199050 ]
Fix to L3 renewal policy bypass attack:
OEMCrypto_DeriveKeysFromSessionKey cannot be called after a license is
loaded.
Re-generated L3 from oemcrypto-v19 branch.
Also needed to update a few tests because it now returns a different
error code.
Test: tested with
https: //widevine-internal-review.git.corp.google.com/c/cdm/+/196392
Bug: 334154045
Merged from https://widevine-internal-review.googlesource.com/197957
Change-Id: Id0e81123b140085654106e99a05ae2405091f101
[ Merge of http://go/wvgerrit/195850 ]
Since Widevine device builds now include APEX prebuilts,
shared library dependencies for the prebuilts are in
are in /apex/com.google.android.widevine/lib[64] rather
than /system/lib[64] or /vendor/lib[64]. When tests are
run not all the dependencies are present.
These changes include
* Statically linking missing dependencies
* Adding /apex/com.google.android.widevine/lib[64] to
the shared library path
* Searching for some of the test executables in
/data/nativetest[64]/vendor/
Bug: 329888778
Bug: 329891889
Bug: 329891175
Bug: 329891049
Test: ./build_and_run_all_unit_tests.sh
Change-Id: I067685cedc7701c4e6502bdac98b53e22b61ad1e
This is necessary so we can remove `-Wno-unused-parameter` in the CDM and OPK builds.
PiperOrigin-RevId: 618255022
Merged from https://widevine-internal-review.googlesource.com/194110
Change-Id: I67b9b8cd27422c4b62d361d627fd1c05ed0cbdef
Extract BCC and build info from oemcrypto, construct BCC uploading
record and dumps it out a JSON file.
The BCC uploader will pick up the output file later.
Bug: 312787974
Change-Id: Ie8ef6a75408e8ef8355b1c0de14532de0ae83732
[ Partial merge of http://go/wvgerrit/188279 ]
This CL adds unit tests to verify that the following
forbidden uses of an RSA private key do not work:
- ForbidPrepAndSign -- A cast cert key cannot sign a license
request.
- ForbidUseAsDRMCert -- A cast cert cannot be used with the
DRM cert's padding scheme and it cannot be used to derive
keys from a session key.
- *ForbidRSASignatureForDRMKey* -- A DRM cert key cannot be
used with GenerateRSASignature.
- *OEMCertForbidGenerateRSASignature* -- An OEM cert key
cannot be used with GenerateRSASignature.
Bug: 251875110
Test: WVTS
Change-Id: I55b1eb04465023352edea55ba4ef532d1cd07231
[ Merge of http://go/wvgerrit/192010 ]
Adding files not merged in ag/26501922
Updates the CDM to add support for DRM reprovisioning request creation.
- Load the baked-in certificate for use as the client token.
- Add functions to build and sign a drm reprovisioning request.
- Update the Rikers L3 OEMCrypto implementation to support signing
provisioning requests and getting embedded certificate.
- Update client id token to handle DRM reprovisioning.
- Add OEMCrypto function to load the baked-in device certificate in
Rikers CDMs and stubs for non-Rikers CDMs.
- Add dynamic adapter support for getting embedded device certificate
only on L3.
Bug: 305093063
Test: WVTS
Change-Id: I839db69a48c1add196f9b56e6ee3812f549f814d
[ Merge of http://go/wvgerrit/186825 ]
Remove the words ` All rights reserved.` from Widevine's
existing copyright headers.
For context, see cl/578224540
Bug: 330655176
Test: WVTS
PiperOrigin-RevId: 580020267
Change-Id: I43e845b83f438e4ef7f0f542c2f4e427a188ab06
[ Merge of http://go/wvgerrit/192010 ]
Updates the CDM to add support for DRM reprovisioning request creation.
- Load the baked-in certificate for use as the client token.
- Add functions to build and sign a drm reprovisioning request.
- Update the Rikers L3 OEMCrypto implementation to support signing
provisioning requests and getting embedded certificate.
- Update client id token to handle DRM reprovisioning.
- Add OEMCrypto function to load the baked-in device certificate in
Rikers CDMs and stubs for non-Rikers CDMs.
- Add dynamic adapter support for getting embedded device certificate
only on L3.
Bug: 305093063
Test: WVTS
Change-Id: I9a0ecf95e27213b046f03baa0781fb164179323b
It is used by prov4 only. So L3 will just return
OEMCrypto_ERROR_NOT_IMPLEMENTED.
Test: build L3
Bug: 307969500
Change-Id: Iff6c79a3fb0220a6c995186f5923ce5ad6bc256f
functions
In CL https://widevine-internal-review.git.corp.google.com/c/cdm/+/183531
KDF was merged into new OEMCrypto_LoadLicense() and
OEMCrypto_LoadProvisioning().
This change renames L3 existing old functions with suffix _V18, and adds
the two new functions.
Note: jenkins/run_dynamic_level3 and jenkis/run_level3_static_tests
can't be enabled util https://b.corp.google.com/issues/320525541 is
resolved.
Test: the generated L3 from this CL can pass static and dynamic adapter
tests with commit ID 567069f2fb800c4ec4e844e03273d1924ae6673b. More
updates may be need to L3 source for it to work with the latest
oemcrypto-v19 branch.
Bug: 299333403
Change-Id: If6dec630c00b65468d4194196f3ff6f308c6dbe8
Since the L3 functions are meant to alias the OEMCrypto functions,
they shouldn't appear in a namespace.
Change-Id: I8d11279ff86c5b5c9eab0598d134f6904f0021ad
OEMCrypto_LoadProvisioning() has changed signature in v19.
Added lipcppbor library and utils to Android tests.
Test: build_all_unit_tests.sh
Bug: 324147162
Change-Id: Id890f97602f684e38d6e42cace9d5dc225958bec
* Used header "video/widevine/export/common/oemcrypto_core_message/odk/include/OEMCryptoCENCCommon.h" is not included directly (4 times)
* Used header "video/widevine/export/common/oemcrypto_core_message/odk/include/core_message_features.h" is not included directly (3 times)
* Used header "video/widevine/protos/public/certificate_provisioning.proto.h" is not included directly (2 times)
* Used header "video/widevine/export/common/oemcrypto_core_message/odk/include/odk_structs.h" is not included directly
* Used header "video/widevine/export/common/oemcrypto_core_message/odk/include/odk_target.h" is not included directly
* Used header "third_party/absl/log/log.h" is not included directly
* See go/include-cleaner for more information about the tool that generated this change.
* The global approvers for this change category are currently piloting the go/reviewbot tool so you may see global-review-bot-composite as the approver. Please contact code-health-team@google.com if you have any questions/concerns about the approval process.
See go/include-cleaner-lsc-approval for more information on why you've received this change and why it is important.
This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/include-cleaner-bug for category IncludeCleaner if there's an issue with the CL content.
* File a bug under go/rosie-bug if there's an issue with how the CL was managed.
* For all other issues such as the formatting of the CL, please file a bug under
go/clrobot-bug.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.
This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/METADATA by
following go/clrobot#how-to-opt-in. Anything wrong with the signup? File a bug
at go/clrobot-bug.
#codehealth
Tested:
Local presubmit tests passed.
PiperOrigin-RevId: 605228343
Change-Id: I7f5f581b6b2e2b359317324df7097f9da101ab94
Convert ODK_LAST_STRESSABLE_TYPE to an aliased enum value so that
ODK_FieldLength always returns a valid value instead of SIZE_MAX.
PiperOrigin-RevId: 602823670
Change-Id: I7a843cacca8201677c0f31249112c04f6c3e04cb
* This is a change required to migrate function parameters to absl::Span from const std::vector (2 times)
See go/vector2span for more information on why you've received this change and why it is important.
This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/absl-span-params-bug for category AbslSpanParams if there's an issue with the CL content.
* File a bug under go/rosie-bug if there's an issue with how the CL was managed.
* For all other issues such as the formatting of the CL, please file a bug under
go/clrobot-bug.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.
This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/METADATA by
following go/clrobot#how-to-opt-in. Anything wrong with the signup? File a bug
at go/clrobot-bug.
#codehealth
Tested:
Local presubmit tests passed.
PiperOrigin-RevId: 601411040
Change-Id: I4235e711867fde7cf3c9f27bb0cae3453853394d
* This is a change required to migrate function parameters to absl::Span from const std::vector
See go/vector2span for more information on why you've received this change and why it is important.
This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/absl-span-params-bug for category AbslSpanParams if there's an issue with the CL content.
* File a bug under go/rosie-bug if there's an issue with how the CL was managed.
* For all other issues such as the formatting of the CL, please file a bug under
go/clrobot-bug.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.
This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/METADATA by
following go/clrobot#how-to-opt-in. Anything wrong with the signup? File a bug
at go/clrobot-bug.
#codehealth
Tested:
Local presubmit tests passed.
PiperOrigin-RevId: 601343954
Change-Id: I1d138aee430e96915a238464ee3b2277ce9b6772
This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/scythe-bug for category DeadCode if there's an issue with the CL content.
See also go/scythe-known-issues.
* See go/abandoned-code for more information on what is considered dead code and why removing it is important.
* File a bug under go/rosie-bug if there's an issue with how the CL was managed.
* For all other issues such as the formatting of the CL, please file a bug under
go/clrobot-bug.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.
This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/video/METADATA by
following go/clrobot#how-to-opt-in. Anything wrong with the signup? File a bug
at go/clrobot-bug.
#codehealth
Tested:
Local presubmit tests passed.
PiperOrigin-RevId: 596797565
Change-Id: I01cbdf234c27c10cca092afda94858c2ed35cacf
The new vendor code requires some new header libraries to work correctly.
PiperOrigin-RevId: 596077868
Change-Id: I7d12f113f8457dfc3317f2a602c65cf7fe9bd703
* do not use 'std::endl' with streams; use '\n' instead For more info see go/clang_tidy/checks/performance-avoid-endl (3 times)
This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/clang-tidy-bug for category ClangTidyPerformance if there's an issue with the CL content.
* File a bug under go/rosie-bug if there's an issue with how the CL was managed.
* For all other issues such as the formatting of the CL, please file a bug under
go/clrobot-bug.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.
This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/video/METADATA by
following go/clrobot#how-to-opt-in. Anything wrong with the signup? File a bug
at go/clrobot-bug.
#codehealth
Tested:
Local presubmit tests passed.
PiperOrigin-RevId: 595366848
Change-Id: If21671ab8613c5efd069071d5bf93bf294004423