Commit Graph

6222 Commits

Author SHA1 Message Date
Rahul Frias
13da693dd6 Generic crypto tests: use license holder
[ Merged from http://go/wvgerrit/143635 ]

Use a license holder for the generic crypto tests.

Bug: 192700112
Test: GtsMediaTestCases on sunfish
Change-Id: Ia2c802263562b11845e55ae0a24254ea54e364c7
2022-03-16 01:36:17 -07:00
Rahul Frias
41b5bd18de Reboot tests: verify offline license is valid after reboot
[ Merge of http://go/wvgerrit/143749 ]

Tests are added to verify that the policy durations are enforced for
an offline license after a device has been rebooted.

Bug: 26163469
Test: GtsMediaTestCases on sunfish
Change-Id: I54e65d7abc5e59eae7c150555b2244dbf96da3f5
2022-03-16 01:35:50 -07:00
Rahul Frias
3fd20d9b28 Policy integration tests: use license holder
[ Merge of http://go/wvgerrit/143634 ]

Refactor the policy integration tests to use the license holder.

Bug: 195691232
Test: GtsMediaTestCases on sunfish
Change-Id: I58ffa64caec05c617065e4781657e85914f8369e
2022-03-16 01:35:26 -07:00
Edwin
3da1d24a1d Integration tests: add license holder
Merged from http://go/wvgerrit/146154

Many integration tests require a license from a license server. This
CL creates a helper class to fetch, load, and hold a license.

Test: ./build_and_run_all_unit_tests.sh

Bug: 194342800
Bug: 194342778
Change-Id: I0de7bcab4db1b365f074bad29fc157a5eca135d8
2022-03-16 01:35:01 -07:00
Rahul Frias
6cda6717a9 Reboot test: Initialize fake clock
[ Merge of http://go/wvgerrit/143630 ]

When we run a test with the fake clock, the clock had been initialized
to the current time, or to 0. This causes a problem for reboot tests
because the clock might go backwards over the reboot. With this
change, we monitor the clock at the end of one reboot pass and
initialize the clock for the next pass based on the previous value.

Bug: 26163469
Test: GtsMediaTestCases on sunfish
Change-Id: Ibd0024f963634382af70553fced38da6e1d857d2
2022-03-16 01:34:36 -07:00
Rahul Frias
520368cea2 Reboot test: save large files
[ Merge of http://go/wvgerrit/143629 ]

The standard b2a_hex only saves about 2k, so we need a special version
that can handle larger strings. This is needed because a license file
is about 7k.

Bug: 194342751
Test: GtsMediaTestCases on sunfish
Change-Id: I6a6ac3f8f4fa6d9cd8a0119fc64fc8f3cc5f3ae8
2022-03-16 01:34:12 -07:00
Rahul Frias
57353b4941 Test max number of DRM private keys
[ Merge of http://go/wvgerrit/143909 ]

The max. number of DRM keys that can be loaded depends on the resource
rating.

Add a test to verify:
1. We can load up to MAX. drm keys
2. Loading the MAX+1 key can fail
3. The loaded keys should work even if loading other keys failed

Bug: 209084113
Test: opk_ta, run_x86_64_tests, run_level3_static_tests,
run_fake_l1_tests
Test: GtsMediaTestCases on sunfish

Change-Id: Ib9821e8a1994d41d3e9c2063440c109a2332ba89
2022-03-16 01:33:48 -07:00
Rahul Frias
5f45485175 Merge oemcrypto-v17 to master
[ Merge of http://go/wvgerrit/144530 ]

It's time to copy all the v17 work to our main branch.
I had to re-run clang-format to match local style.

Merge from commit b14f08374f9a48aed49850cc230daf384725b15f
Fix allow_null for key control iv in L3 v17

Bug: 161477208
Test: GtsMediaTestCases on sunfish
Change-Id: I97caa851e9e65eb0e42034d2f4a28dfb7499df0d
2022-03-16 01:33:23 -07:00
Rahul Frias
83a4100d11 Update cipher mode elsewhere
[ Merge of http://go/wvgerrit/144696 ]

In v17,
OEMCrypto_CipherMode_CTR renamed to OEMCrypto_CipherMode_CENC
OEMCrypto_CipherMode_CBC renamed to OEMCrypto_CipherMode_CBCS

Bug: 224375138
Test: GtsMediaTestCases on sunfish
Change-Id: I2d96e9c6d22a9d9e2fbbd15a8aea3f2d5dac6dcb
2022-03-16 01:33:02 -07:00
Rahul Frias
4532802ea0 Fix 1 ClangTidyBuild finding:
[ Merge of http://go/wvgerrit/145289 ]

* missing #include <string> for 'std::string' For more info see go/clang_tidy/checks/google3-build-missing-std-includes

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 ClangTidyBuild if the change looks generally problematic.
* 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.
Anything wrong with the signup? File a bug at go/clrobot-bug.

Tested:
    Local presubmit tests passed.

Bug: 224375138
Test: GtsTestCases on sunfish

PiperOrigin-RevId: 426761099
Merged from https://widevine-internal-review.googlesource.com/145250

Change-Id: I5a66b6eccc2b08ee11f92f90ce3b725f24c8d33c
2022-03-16 01:31:53 -07:00
Rahul Frias
bc6e841ccd Add out of bounds testing for LoadKeys()
[ Merge of http://go/wvgerrit/146249 ]

Update the OEMCryptoMemoryLoadLicense* tests so they cover LoadKeys()
for v15 and prior and LoadLicense() for v16 and later versions.

Merged from https://widevine-internal-review.googlesource.com/145951

Bug: 190749256
Test: GtsMediaTestCases on sunfish
Change-Id: If90f7afd82819375f52a2fe619675bf0c4c4dd3a
2022-03-16 01:30:39 -07:00
Rahul Frias
8350badbb5 Separate invalid session test for ReuseUsageEntry
[ Merge of http://go/wvgerrit/144729 ]

Since OEMCrypto_ReuseUsageEntry() was introduced in v17, splitting the
test case for an invalid session from the other usage entry methods
since they were implemented in v15/16 as well.

Bug: 216193739
Test: GtsMediaTestCases on a sunfish
Change-Id: I7f4399c07a19227495a15807228b930066f6a794
2022-03-16 01:20:02 -07:00
Edwin Wong
4fbefccb3a Merge "Build both AIDL and HIDL targets." into tm-dev am: 9361eb803b am: bb26fe14e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17158449

Change-Id: I8e43a917712c646ec45451b93e9f0d50e3011c27
2022-03-14 21:35:52 +00:00
Edwin Wong
bb26fe14e2 Merge "Build both AIDL and HIDL targets." into tm-dev am: 9361eb803b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17158449

Change-Id: Ie172294840317e8b7385889b26057c83fa41e305
2022-03-14 21:10:47 +00:00
Edwin Wong
03cb9e4ba1 Merge "Build both AIDL and HIDL targets." into tm-dev am: 9361eb803b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17158449

Change-Id: Ife41ef2048564aa3ccec11c071a50d9509b64b76
2022-03-14 21:10:08 +00:00
Edwin Wong
9361eb803b Merge "Build both AIDL and HIDL targets." into tm-dev 2022-03-14 20:31:42 +00:00
Edwin
77f1fedde2 Build both AIDL and HIDL targets.
Merged from http://go/wvgerrit/147689

The default is to build for AIDL Widevine service.
Use "-t hidl" in build_and_run_all_unit_tests.sh or
build_all_unit_tests.sh to build for HIDL service.

Test: ./build_all_unit_tests -t hidl
Test: ./build_and_run_all_unit_tests -t hidl
Test: ./build_all_unit_tests
Test: ./build_and_run_all_unit_tests

Bug: 217247987
Change-Id: Ie7c51033f4aba341c829ccc8f846a6cfeab76df3
2022-03-11 15:36:55 -08:00
TreeHugger Robot
3ad026ab04 Merge "wv aidl: fix native handle memory leak 2" into tm-dev am: 6eb5161dc1 am: 90b85ced5a
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16987763

Change-Id: I723109b707dbd1d1817149877689ed9b0f2647dd
2022-03-11 06:03:14 +00:00
TreeHugger Robot
b94f645290 Merge "wv aidl: fix native handle memory leak 2" into tm-dev am: 6eb5161dc1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16987763

Change-Id: Iadb3389781776511b1596996ac903834f319dfd0
2022-03-11 05:42:18 +00:00
TreeHugger Robot
90b85ced5a Merge "wv aidl: fix native handle memory leak 2" into tm-dev am: 6eb5161dc1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16987763

Change-Id: I784272f962db3ef9c017c1e33385c1c9d63925eb
2022-03-11 05:40:49 +00:00
TreeHugger Robot
6eb5161dc1 Merge "wv aidl: fix native handle memory leak 2" into tm-dev 2022-03-11 05:20:59 +00:00
Edwin
8b7135134f Add lazy service for Widevine AIDL HAL. am: 28feb283f3 am: 0bf6d6a469
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17091932

Change-Id: Ibef4d9d8ca33e8837bb15405c06515a20521cf26
2022-03-10 19:50:53 +00:00
Edwin
366b54d522 Add lazy service for Widevine AIDL HAL. am: 28feb283f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17091932

Change-Id: Iae533b0a29389eaf456b0d41faf7d946d4269fd0
2022-03-10 19:29:18 +00:00
Edwin
0bf6d6a469 Add lazy service for Widevine AIDL HAL. am: 28feb283f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17091932

Change-Id: I25ee15d212c33385ea418f31012e4b4ecddf2f98
2022-03-10 19:27:46 +00:00
Edwin
28feb283f3 Add lazy service for Widevine AIDL HAL.
Merged from http://go/wvgerrit/147329

Test: atest VtsAidlHalDrmTargetTest
Test: atest GtsMediaTestCases

Bug: 221078453
Change-Id: I4345816f18c44de4187f03a087d58e890a6d6b01
2022-03-09 23:30:31 +00:00
TreeHugger Robot
af7da0db1f Merge "Update dump() for Aidl HALs." into tm-dev am: f2384c1b22 am: f8ac8e07d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16994828

Change-Id: I404ba447feb8bdd3bed3bbe005084770fb7d0813
2022-02-28 18:41:11 +00:00
TreeHugger Robot
a4489b0998 Merge "Update dump() for Aidl HALs." into tm-dev am: f2384c1b22
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16994828

Change-Id: I5cb2f380da652bb0802b77464fa8f320bb6a19e3
2022-02-28 18:20:32 +00:00
TreeHugger Robot
f8ac8e07d4 Merge "Update dump() for Aidl HALs." into tm-dev am: f2384c1b22
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16994828

Change-Id: Iba64235e754aaef9619871615bce1e2e9bcf4d8b
2022-02-28 18:19:49 +00:00
TreeHugger Robot
f2384c1b22 Merge "Update dump() for Aidl HALs." into tm-dev 2022-02-28 17:55:35 +00:00
Sam Dubey
24fa58799b Revert "Enable Widevine Aidl service." am: 304da5e399 am: bb3db4073a
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17030421

Change-Id: I15e465a32ae324a0da01139e2bbe05c0bcf6504d
2022-02-28 08:46:49 +00:00
Sam Dubey
6d4656c416 Revert "Enable Widevine Aidl service." am: 304da5e399
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17030421

Change-Id: Ie89d3c4a913c16360130a6a8e3e7cc15561d8317
2022-02-28 08:26:42 +00:00
Sam Dubey
bb3db4073a Revert "Enable Widevine Aidl service." am: 304da5e399
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/17030421

Change-Id: Ia22fec5d563b919d195241174f4baaccef688d07
2022-02-28 08:25:31 +00:00
Sam Dubey
304da5e399 Revert "Enable Widevine Aidl service."
This reverts commit 2269503129.

Reason for revert: Breaking hal_implementation_test

Bug: 221773661
Change-Id: I85e483fe1fc4f7d71c2cc5c2fc8892b1a57476ab
2022-02-28 05:57:22 +00:00
Edwin
b5284c5376 Update dump() for Aidl HALs.
Merged from http://go/wvgerrit/146589

lshal is for hidl HALs only, dumpsys is for aidl HALs.
Add option "-a" to dump both CDM metrics and properties
because adb bugreport calls dump() with option "-a".

Test: adb bugreport

Bug: 220996660
Change-Id: Ib2a73f3f9f353b8435735dd019a547b62b066725
2022-02-25 14:00:31 -08:00
Edwin
0b378e2bd1 Enable Widevine Aidl service. am: 2269503129 am: a3a6f1e853
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16984707

Change-Id: Ice9a398bf024438ef2d2dc7de22f576202f8ac70
2022-02-25 20:41:20 +00:00
Edwin
b346e7ef85 Enable Widevine Aidl service. am: 2269503129
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16984707

Change-Id: If2faf4513ae5c2d943bfeee7176a2c07a0414c90
2022-02-25 20:33:18 +00:00
Edwin
a3a6f1e853 Enable Widevine Aidl service. am: 2269503129
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16984707

Change-Id: I8623d82f74e72194ce04b8369ad88c1bda076206
2022-02-25 20:17:49 +00:00
Jeffrey Kardatzke
6b7f2f34a9 libwvdrmengine: Add custom CDM properties for ARCVM
We need to have extra properties we can check for this so they don't
conflict with the main ones for ro.product.{manufacturer|make|device}.

Bug: 197771575
Test: None

Change-Id: I63d57d59f3473beaa825b9f20e711f15d6280461
(cherry picked from commit 0f000ac305528059fc6ebdf4a3c82dd698ef4161)
(cherry picked from commit f46a1b9adcdaa103c394a2017a58e0ab6a6a4c77)
2022-02-23 19:19:21 +00:00
Robert Shih
21cbd7906e [automerger skipped] Merge "aidl drm: independent min/max SecurityLevel for each supported mime" into tm-dev am: 3fa23b250b -s ours am: 89cd3b2b46 -s ours
am skip reason: Merged-In I5c0d511358c394aff6885135de851395f199dac0 with SHA-1 f2d89aaf77 is already in history

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

Change-Id: I7f5ef4561b2a8f4565c5e063deb5bd5ba9bd255b
2022-02-23 17:48:53 +00:00
Robert Shih
89cd3b2b46 [automerger skipped] Merge "aidl drm: independent min/max SecurityLevel for each supported mime" into tm-dev am: 3fa23b250b -s ours
am skip reason: Merged-In I5c0d511358c394aff6885135de851395f199dac0 with SHA-1 f2d89aaf77 is already in history

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

Change-Id: I357e466041cc8b4fa28e53306646da42daf5eeff
2022-02-23 17:14:02 +00:00
Edwin
2269503129 Enable Widevine Aidl service.
Merged from http://go/wvgerrit/146409

Bug: 219538389
Test: atest GtsMediaTestCases
Change-Id: I93f1270b304816636babe5a8d76325835793a137
2022-02-23 17:06:11 +00:00
Robert Shih
9386d774f1 [automerger skipped] Merge changes from topic "cherrypick-SupportedContentType-myxl3uejg2" into tm-mainline-prod am: 438a40b016 -s ours
am skip reason: Merged-In I5c0d511358c394aff6885135de851395f199dac0 with SHA-1 f2d89aaf77 is already in history

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

Change-Id: Id2896de094647ffe879a60fd51caa9547908165b
2022-02-23 16:51:14 +00:00
Robert Shih
c5aa870dbd wv aidl: fix native handle memory leak 2
[ Merge of go/wvgerrit/146369 ]

Bug: 219754570
Test: atest GtsMediaTestCases
Change-Id: Id3e443d5e39ae416d6e566a129ebed423e19e98d
2022-02-23 09:40:15 +00:00
Robert Shih
3fa23b250b Merge "aidl drm: independent min/max SecurityLevel for each supported mime" into tm-dev 2022-02-23 02:08:46 +00:00
Robert Shih
438a40b016 Merge changes from topic "cherrypick-SupportedContentType-myxl3uejg2" into tm-mainline-prod
* changes:
  [automerge] aidl drm: independent min/max SecurityLevel for each supported mime 2p: f2d89aaf77
  aidl drm: independent min/max SecurityLevel for each supported mime
2022-02-23 02:08:46 +00:00
Robert Shih
87c09d08a1 Merge changes from topic "cherrypick-SupportedContentType-myxl3uejg2"
* changes:
  [automerged blank] aidl drm: independent min/max SecurityLevel for each supported mime 2p: f2d89aaf77 2p: 29c148914e
  [automerge] aidl drm: independent min/max SecurityLevel for each supported mime 2p: f2d89aaf77
  aidl drm: independent min/max SecurityLevel for each supported mime
2022-02-23 02:08:46 +00:00
Robert Shih
436511707e [automerger skipped] Merge "wv aidl: fix native handle memory leak" into tm-dev am: 06587fd100 -s ours am: 14a161b77a -s ours
am skip reason: Merged-In Id4705d5bc10ba6dfbe878f2d95fdd9ae9d2e9f1d with SHA-1 c6d7d6e69b is already in history

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

Change-Id: I338fae6d0c415aa1fbcf8b01289615bb59f9cd41
2022-02-22 20:40:36 +00:00
Robert Shih
b2800169e0 [automerger skipped] Merge "Update cipher mode enumeration in AIDL WvDrmPlugin" into tm-dev am: 7b3a37fa2f -s ours am: c668b798ec -s ours
am skip reason: Merged-In I7eb25a5db30a82cf8015e3c19af419c02a1d5002 with SHA-1 0684df3b6c is already in history

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

Change-Id: I338d35bc76dbfcab7d3e8bac4157b56d6e26b527
2022-02-22 20:40:29 +00:00
Robert Shih
2687bcf667 [automerger skipped] Merge changes from topic "presubmit-am-53eaa6b33a3a42bba34a4724a8ebe4b0" into tm-mainline-prod am: 176c4f4e2a -s ours
am skip reason: Merged-In Id4705d5bc10ba6dfbe878f2d95fdd9ae9d2e9f1d with SHA-1 c6d7d6e69b is already in history

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

Change-Id: Ib0a3094768133636f73bc5714a9b0675691cf408
2022-02-22 20:40:21 +00:00
Robert Shih
5eae50d688 [automerger skipped] Merge changes from topic "presubmit-am-69964c88cf1f4ba9b4fac91dde2f2412" into tm-mainline-prod am: c5c74fa36d -s ours
am skip reason: Merged-In I7eb25a5db30a82cf8015e3c19af419c02a1d5002 with SHA-1 0684df3b6c is already in history

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

Change-Id: Id47dfb7a916611f0fcf202e4bed993ff0b3fb076
2022-02-22 20:39:34 +00:00