Commit Graph

6818 Commits

Author SHA1 Message Date
Alex Dale
659301abd3 Specified /bin/bash for Android scripts.
[ Merge of http://go/wvgerrit/165139 ]

Changed the specified shell program used to execute our team's Android
scripts to bash.

Bug: 266891333
Test: ./build_all_unit_tests.sh
Change-Id: Id6fc8e4db10a71e9f17fc48a52a4883331e908d3
2023-01-26 22:23:25 -08:00
Kyle Zhang
dd935f3feb Merge "Update linker config settings" 2023-01-25 18:16:51 +00:00
TreeHugger Robot
c72114c82c Merge "Update L3 after key double free fix master" 2023-01-20 18:52:38 +00:00
Edwin Wong
94f86b717c Fixed race condition in closeSession
Merged from http://go/wvgerrit/164799

Fix race that corrupts mCryptoSessions std::map,
and race that occurs when CryptoSessions are used after free.

Test: poc
Test: atest MediaDrmParameterizedTests
Test: atest GtsMediaTestCases

Bug: 258189255
Change-Id: I298d3e0770ace9cd590dfaacaa4c52a0732c2fe3
2023-01-18 20:04:44 +00:00
Kyle Zhang
dfb0b0d877 Update linker config settings
Update Widevine Apex linker config settings according to b/264330513.

Bug: 243699259
Test: atp v2/widevine-eng/drm_compliance
Change-Id: I0c7581e44dff9f8a4193ef29e68ddef42451b4f6
2023-01-18 06:36:08 +00:00
Cong Lin
7aceca7310 Update L3 after key double free fix master
Merge of https://widevine-internal-review.googlesource.com/c/cdm/+/165018

Orignal commit message:
Update L3 in master branch after key double free fix

The fix is here:
https://widevine-internal-review.googlesource.com/c/cdm/+/164909/

Re-generated L3 libraries.

Test: ran L3 unit tests
Test: verified GTS tests on arm32 device
Bug: 252434586
Change-Id: Iea022b3d1087b79edf6649c038e1f701375989c6
2023-01-17 16:52:36 -08:00
Bob Badour
d676bd9c6d [LSC] Add LOCAL_LICENSE_KINDS to vendor/widevine
Added legacy_by_exception_only to:
  libwvdrmengine/apex/device/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I9eee9c7bdc6125447499996f49f88e055bd38f83
2023-01-11 10:17:02 -08:00
Kyle Zhang
a95cd36de5 Merge "Add liboemcrypto.so as required by WV APEX" 2023-01-11 05:37:46 +00:00
TreeHugger Robot
d933e34824 Merge "Renaming of Usage Table related variables and types." 2023-01-10 02:43:26 +00:00
Kyle Zhang
a5c7a48f8a Add liboemcrypto.so as required by WV APEX
[ Merge of go/wvgerrit/164757 ]

Modify Widevine apex configuration to add add liboemcrypto.so as
required by WV APEX.

Bug: 243699259
Test: atp v2/widevine-eng/drm_compliance
Change-Id: I136dde5d77aed4fb14737e4692153c8f3b2c701b
2023-01-09 06:32:39 +00:00
Rahul Frias
609349c314 Merge changes Ib18af309,Iebd58823,Ic3a503ef
* changes:
  Support renew on load
  Move functionality to policy_timer.
  Remove references to policy_timers_v15
2022-12-22 08:11:29 +00:00
Rahul Frias
1208c78e94 Merge changes Iec2a8b7f,I01530934
* changes:
  Support ATSC license installation
  Add error codes to support ATSC license installation
2022-12-22 07:07:14 +00:00
Rahul Frias
ab91cf934e Support renew on load
[ Merge of http://go/wvgerrit/164477 ]

Renew on load is supported when OEMCrypto is >= v18.
A new class, policy_timer_v18 has been added to support this
functionality. In addtition,offsets of renewal from first decrypt
and license start are also included.

Bug: 256038127
Test: GtsMediaTestCases
Change-Id: Ib18af3096d1d8807af6a03fd2f84783123ab6b6d
2022-12-21 17:33:02 -08:00
Rahul Frias
78a4902214 Move functionality to policy_timer.
[ Merge of http://go/wvgerrit/164277 ]

No functional changes are made in this CL. policy_timer_v16 and
policy_timer_v15 derive from policy_timer. We have removed
support for OEMCrypto v15. policy_timer_v15 has also been removed.

This allows us to move functionality from policy_timer_v16
to policy_timer class. This will ease subsequent renew on
license load functionality.

Bug: 256038127
Test: Luci tests
Change-Id: Iebd588237edd02b30a820c4d9d57ce041c26964e
2022-12-21 16:10:01 -08:00
Alex Dale
1603ba127f Renaming of Usage Table related variables and types.
[ Merge of http://go/wvgerrit/164077 ]

This CL makes major changes to the names of variables and types that
are related to the usage table, header, entries, entry indexes, and
other related data.

The renaming followed these rules:
1)  "Usage table header" will exclusively refer to the header blob
    that is OEMCrypto specific.  The CDM class "UsageTableHeader"
    is the CDM-layer's abstraction around the "usage table" concept.
    The name has been updated to reflect that.
2)  The "Cdm" prefix is only used for the CDM-specific data types for
    the usage table and entry info.  It has been removed from
    OEMCrypto-specific types.
    - UsageTableHeader -> CdmUsageTable
    - CdmUsageTableHeader -> UsageTableHeader
    - CdmUsageEntry -> UsageEntry
3)  The "usage_" prefix has been removed from variables when the usage
    table or usage entries are the subject of the function or class.
4)  UsageEntryIndex is the type for entry indexes, instead of directly
    using uint32_t.  This matches how we wrap other types in
    "wv_cdm_types.h"
5)  Changed entry "number" to entry "index".
6)  Vectors of elements have been renamed to be either pluralized or
    have a suffix "_list".
7)  "Usage info" was occasionally being used to refer to the usage
    table or entries generally, rather than specifically secure-stop.
    - CryptoSession::HasUsageInfoSupport() -> HasUsageTableSupport()

The most major change is that the files "usage_table_header*" have
been renamed to be "cdm_usage_table*".

Bug: 242914226
Test: run_x86_64_tests and request_license_test
Change-Id: Iee98446b71f4f2934d3c9e0fb949eb05b84d1f8c
2022-12-21 15:50:49 -08:00
Cong Lin
7474b41fd0 Temporarily remove json dependency in oemcrypto v18 unit test
Disable one oemcrypto v18 unit test which takes nlohmann-json dependency
for now, until the json dependency is fixed.

Test: build widevine and oemcrypto unit tests
Bug: 263397641
Change-Id: I065b28a81cc481b2b64bda27733640e0fdea0c2c
2022-12-21 13:23:21 -08:00
Rahul Frias
1e15b36b1a Support ATSC license installation
[ Merge of http://go/wvgerrit/163900/ ]

ATSC licenses can be saved by calling
MediaDrm#setPropertyString("storeAtscLicense",<value>)
where <value> is
"<atsc-key-set-ID>:<license-file-data in Base64 format>"

Before storing an ATSC license a session must be opened and the
ATSC mode must be enabled.

Use MediaDrm#setPropertyString("atscMode","enable");

Bug: 176871821
Test: WV Unit/integration/Luci tests
Test: libwvdrmdrmplugin_hal_test
Test: GtsMediaTestCases
Change-Id: Iec2a8b7f87b1122395d06856202278b92316fdfe
2022-12-21 11:56:18 -08:00
Rahul Frias
233bac3a6f Add error codes to support ATSC license installation
[ Merge of http://go/wvgerrit/163899 ]

Bug: 176871821
Test: WV Unit/integration/Luci tests
Test: libwvdrmdrmplugin_hal_test
Change-Id: I0153093433715b1357d3854043cc6362f9261c57
2022-12-21 11:55:08 -08:00
Kyle Zhang
0080d04579 Merge "Pick widevine oemcrypto-v18 change" 2022-12-21 19:44:33 +00:00
Cong Lin
a39f926419 Merge "Internal BCC extraction tool to consume verified device info" 2022-12-21 18:22:18 +00:00
Rahul Frias
539843da00 Remove references to policy_timers_v15
[ Merge of http://go/wvgerrit/164257 ]

Support for OEMCrypto v15 is being removed from the CDM. The
policy_timers_v15 will no longer be invoked and can be removed.

Bug: 256038127
Test: WV unit/integration tests
Change-Id: Ic3a503ef2a17223dd0bc13696960dcd6822cc343
2022-12-21 05:42:14 -08:00
Cong Lin
691f43cbef Factory BCC extraction tool to consume verified device info
BCC extraction tool calls OEMCrypto_GetDeviceInformation() to read
verified device info from TEE. If the verified device info is not
available, (e.g. not implemented), it falls back to using OS properties.

This CL is mostly identical to ag/20799640, which has the same change
for our internal extraction tool. For historical reason, we keep two
copies of the extraction tool which are slightly different from each
other, one for factory use, one for debug use. Long term they will be
merged.

Test: Ran the tool on Pixel 7 w/wo verified device info being present
Bug: 263312447
Change-Id: Ib9c77dee45e9ff996fc2dc2da14f16f60eaff77c
2022-12-20 20:07:10 -08:00
Cong Lin
a880498f36 Internal BCC extraction tool to consume verified device info
BCC extraction tool calls OEMCrypto_GetDeviceInformation() to read
verified device info from TEE. If the verified device info is not
available, (e.g. not implemented), it falls back to using OS properties.

This CL changes the tool used by widevine internally. Another CL will
update the tool for factory use.

Test: Ran the tool on Pixel 7 w/wo verified device info being present
Bug: 263312447

Change-Id: I71a48cc210f6a6f26f339f512a1851237ba94172
2022-12-20 17:45:14 -08:00
Kyle Zhang
11255b7426 Pick widevine oemcrypto-v18 change
No-Typo-Check: From a third party header file
Bug: 260918793
Test: unit tests
Test: atp v2/widevine-eng/drm_compliance
Change-Id: I36effd6a10a99bdb2399ab1f4a0fad026d607c70
2022-12-21 00:03:50 +00:00
Rahul Frias
ead412cc55 Merge "Sync license_protocol.proto" 2022-12-20 22:06:14 +00:00
Edwin Wong
4586522c07 Remove comment.
Merged from http://go/wvgerrit/163817

Based on review comment in PS10 of http://go/ag/ag/20608670

Test: Google TV
Test: atest MediaDrmParameterizedTests
Test: atest DrmSessionManagerTest

Bug: 262797186
Change-Id: I28ed90255df1a16fb252000f8a8a0f89246563c3
2022-12-16 19:16:33 +00:00
Robert Shih
1fdbd3cd2c aidl plugin: add error details to return status
Merged from http://go/wvgerrit/163639

Bug: 253271674
Test: Google TV
Test: atest MediaDrmParameterizedTests
Test: atest DrmSessionManagerTest
Change-Id: I9f0e83774d405466a389d2fd90d693830682dde4
2022-12-15 14:50:56 +00:00
Rahul Frias
915efa9894 Sync license_protocol.proto
[ Merge of http://go/wvgerrit/159982 ]

Add in TimerDelayBase, initial_renewal_delay_base, client version
and DTCPUsageRules.

Bug: 256038127
Test: WV unit/integration tests
Change-Id: I0ea7490ff2663a3df15d150836b06277f14eaa0f
2022-12-13 23:53:14 -08:00
Robert Shih
2384efde1e New CdmResponseType fields: oec_result & crypto_session_method
[ Merge of go/wvgerrit/163437 ]

Bug: 253271674
Test: cdm unit tests
Change-Id: I064e28af593e4a55c13d03115bb5181a879a1ed4
2022-12-12 19:06:59 -08:00
TreeHugger Robot
adf20ed758 Merge "Dump error_detail in dumpsys" 2022-12-13 01:32:30 +00:00
Edwin Wong
b1fd332cc5 Fix mapCdmResponseType template.
Merged from http://go/wvgerrit/163457

mapCdmResponseType is called either with an enum or
a CdmResponseType struct.

Test: build android.hardware.drm-service.widevine
Test: Netflix and Play Movies & TV
Test: build_and_run_all_unit_tests.sh
Test: atest MediaDrmParameterizedTests
Test: atest DrmSessionManagerTest

Bug: 253271674
Bug: 262210157
Change-Id: Ieb9fccf33f54a98c67ddf7655d2a5ada7a946114
2022-12-12 20:48:46 +00:00
Robert Shih
096b0eda5a Squashed merge 3 CLs.
1. "Change CdmResponseType from enum into a struct"
Merged from http://go/wvgerrit/163199
Bug: 253271674

2. "Log request information when server returns 401"
Bug: 260760387
Bug: 186031735
Merged from http://go/wvgerrit/162798

3. "Specify server version on the command line"
Bug: 251599048
Merged from http://go/wvgerrit/158897

Test: build android.hardware.drm-service.widevine
Test: Netflix and Play Movies & TV
Test: build_and_run_all_unit_tests.sh

Bug: 253271674
Change-Id: I70c950acce070609ee0343920ec68e66b058bc23
2022-12-08 21:08:14 +00:00
Alex Dale
ac9641ae13 Merge "Revert "Core CDM: Removed secure stop support."" 2022-12-05 22:05:07 +00:00
Alex Dale
16a4c2690a Revert "Core CDM: Removed secure stop support."
This reverts commit b039f31b27.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: I8cd6014b4e2de93b3c574d407d6c8885863fed4f
2022-12-03 00:46:22 +00:00
Alex Dale
cd51e53a98 Merge "Revert "Core CDM: Retrieving USAGE_INFO triggers clean-up."" 2022-12-03 00:32:27 +00:00
Alex Dale
d62d71189e Revert "Core CDM: Retrieving USAGE_INFO triggers clean-up."
This reverts commit da9ba6c3ba.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: Ia9ee53b4a897b4b52551c665e8551233abee6b6b
2022-12-02 22:48:05 +00:00
Alex Dale
f4ca978229 Merge "Revert "Core CDM: Remove secure stop from LRU algorithm."" 2022-12-02 22:41:06 +00:00
Alex Dale
0c353d6851 Revert "Core CDM: Remove secure stop from LRU algorithm."
This reverts commit 7a34c1748c.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: I63a730a6e5fa16d0d2425d216fd7f0fff8c09a4c
2022-12-01 23:50:05 +00:00
Alex Dale
8bfd31402b Merge "Revert "Core CDM: Removed ability to add secure stop entry."" 2022-12-01 23:47:43 +00:00
Alex Dale
40181d5ea7 Revert "Core CDM: Removed ability to add secure stop entry."
This reverts commit afcadcc793.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: Ibf018322d65af9a2a7808b81823907f3226f1950
2022-12-01 03:36:42 +00:00
Alex Dale
672f7aee80 Merge "Revert "Core CDM: Remove usage info API from DeviceFiles."" 2022-12-01 03:34:24 +00:00
Alex Dale
3012cd1ee6 Revert "Core CDM: Remove usage info API from DeviceFiles."
This reverts commit 244e6301bd.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: I00a6e223dfabd85a5f12a224dfea6456a24a1770
2022-11-30 23:58:52 +00:00
Alex Dale
5ffa2885c9 Merge "Revert "Core CDM: Do not store/retrieve USAGE_INFO entries."" 2022-11-30 23:51:37 +00:00
TreeHugger Robot
0397428512 [automerger skipped] Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev am: 29aa1f3732 am: e19017df16 am: 65afc697d1 am: d43eb608de -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I864d77cac1efc319d8c2d417efcc1154d44c94a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 21:31:33 +00:00
Vicky Min
28d0edf092 [automerger skipped] [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 0890df5b16 am: 6ededbee26 am: a132079383 am: e75c40590f -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I3c3b3762915786b20be747051d22989bf2c86bfb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 21:31:31 +00:00
TreeHugger Robot
d43eb608de Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev am: 29aa1f3732 am: e19017df16 am: 65afc697d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I344a64df7bccd4518dc3dccf4e0f418f86041e53
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 21:00:56 +00:00
Vicky Min
e75c40590f [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 0890df5b16 am: 6ededbee26 am: a132079383
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: Ib3eb2449d0388c0717c7d05cf23e55271bbaafe5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 21:00:55 +00:00
TreeHugger Robot
5b4eed29c7 [automerger skipped] Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev am: 29aa1f3732 am: b0fe007cc6 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I0a1bbcaf4f51db4b18dadfe6f633a98f576d7ba3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 20:27:20 +00:00
Vicky Min
f3e98f7fd1 [automerger skipped] [DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse() am: 0890df5b16 am: 38c5136b8c -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: I42a643644307fca2f1ffc0c829038ef1b788c197
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 20:27:19 +00:00
TreeHugger Robot
65afc697d1 Merge "[DO NOT MERGE] Fix out of bounds buffer error in CreateCoreLicenseResponse()" into tm-dev am: 29aa1f3732 am: e19017df16
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/18687130

Change-Id: Iac9f6d50283755f09824171b53ca63496e7fb4c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 20:26:27 +00:00