Commit Graph

7234 Commits

Author SHA1 Message Date
Kyle Zhang
79ab04a34e Revert "Limit output buffer size during decrypt fallback"
This reverts commit df29c42108.

Reason for revert: b/372348308

Change-Id: Ib87b0f3045f9962a3cc0bf725cf535a3409fe5bd
2024-10-11 18:05:18 +00:00
John W. Bruce
df29c42108 Limit output buffer size during decrypt fallback
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.

Cherry-picked from http://go/wvgerrit/205311

Bug: 354834629
Test: x86-64
Merged from https://widevine-internal-review.googlesource.com/204810

Change-Id: I412f43d8f88c72072ef1dd5293436bdb58e500b3
2024-08-14 00:40:35 +00:00
John W. Bruce
0f28592676 Remove OEMCryptoLicenseTest.RejectCbc1API16
This test should have been removed in v17, when we allowed this pattern
to be used with cbcs. Although we can't start enforcing the correct
behavior until v20 now, we can remove enforcement of the incorrect
behavior.

Cherry-picked from http://go/wvgerrit/205310

Bug: 356173926
Merged from https://widevine-internal-review.googlesource.com/204832

Change-Id: Idc6e3109286daabb83874d52ad3abaff5e14badb
2024-08-14 00:40:30 +00:00
John W. Bruce
6089f50d28 Fix OEMCrypto documentation for (0,0) patterns
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/204611

Bug: 336330529
Change-Id: Ic6c81d8f04904b83c34fbc0235ebbae8705a4182
2024-08-01 16:29:37 +00:00
Vicky Min
f9049a58ed Update DecryptZeroSizeSubSample test to accept success or error
Bug: 338010108
Merged from https://widevine-internal-review.googlesource.com/198002

Change-Id: I52c72a5c1a287e8556a243b6072faf23ce4bbdad
(cherry picked from commit 8b806d128e450ab0bf9cba17e21b5ed5ff97c277)
(cherry picked from commit 1c6ec56725)
2024-07-19 15:55:20 +00:00
Alex Dale
9b3d1b24b7 Improved SystemIdExtractor's opened/closed session behavior.
[ Merge of http://go/wvgerrit/200415 ]

UDC specific: No DRM reprovisioning support

The SystemIdExtractor did not properly define behavior when working
with opened/closed CryptoSessions.  Due to the CryptoSession's class
dual role of being both a session and a general handle into the
crypto engine, small bugs relying on undefined behavior which happened
to return expected output allowed tests to pass.

This CL makes the following changes:
1) Have SystemIdExtractor verify caller expectations when session is
   open.
2) Improved SystemIdExtractor to operate when CryptoSession is opened
   or closed.
3) Updates several SystemIdExtractorTest cases to better test defined
   behavior without relying on undefined behavior.
4) Better code comments; hopefully some which will help prevent future
   misuse of the internal APIs.

Test: system_id_extractor_unittest on Oriole
Test: WVTS on oriole
Bug: 329713288
Change-Id: I65518fe62f43e8060ea752852eb08a3d7132e2a0
2024-07-01 13:45:02 -07:00
Kyle Zhang
b47eb3ffbd Drop Widevine apex prebuilt files for release 11868851
Note: Apexes in this change are signed with different release key than previous versions.

The following files have been updated as part of this change:

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.lazy
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.lazy
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.lazy
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.lazy
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/release/com.google.android.widevine.lazy-11868851.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.lazy
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/release/com.google.android.widevine.lazy-11868851.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.lazy
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/release/com.google.android.widevine.lazy-11868851.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.lazy
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/release/com.google.android.widevine.lazy-11868851.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.lazy
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/release/com.google.android.widevine.nonupdatable-11868851.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/release/com.google.android.widevine.nonupdatable-11868851.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/release/com.google.android.widevine.nonupdatable-11868851.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/release/com.google.android.widevine.nonupdatable-11868851.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341910000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

The change is generated with prebuilt drop tool.

Bug: 343556226
Change-Id: Ie0ca9d28ce66d831dba19a99316e252b587b1464
2024-06-04 18:06:04 +00:00
Cong Lin
a65f9d8806 Re-generate Android U L3 after renewal policy fix
Merge of
https://widevine-internal-review.git.corp.google.com/c/cdm/+/198672

Fix to L3 renewal policy bypass attack:
OEMCrypto_DeriveKeysFromSessionKey cannot be called after a license is
loaded.

System IDs:
build_arm_u_2024() { build_arm_with_id 34136; }
build_arm64_u_2024() { build_arm64_with_id 34137; }
build_x86_u_2024() { build_x86_with_id 34138; }
build_x86_64_u_2024() { build_x86_64_with_id 34139; }

Test: tested with
https: //widevine-internal-review.git.corp.google.com/c/cdm/+/196392
Test: run_level3_static_tests
Test: run wvts on Pixel7
Bug: 334154045
Change-Id: I3ffad1ccec288d89456db98a2055d453f571fb5c
2024-05-17 21:50:51 +00:00
Vicky Min
a7a1d49256 Integration tests to verify clear lead content plays successfully
Also added a unit test to verify that decryption without a license fails
with the correct error code. Also changed comment types for policy
integration tests and core integration tests to be picked up by Doxygen.

Bug: 320785945
Merged from https://widevine-internal-review.googlesource.com/194910

Change-Id: Ibdb70683003bb430dde9b4a1bd9fc9839bace342
(cherry picked from commit d05d3738b4)
2024-04-04 17:40:31 +00:00
Treehugger Robot
1552592420 Merge "Do not fall back to L3 if L1 has test keybox" into udc-widevine-dev 2024-03-27 19:23:44 +00:00
Fred Gylys-Colwell
608c278be0 Reduce clock skew in flaky duration tests
There are three changes here that should help reduce the
amount of duration test failures caused by clock skew.

First, we reported some skew when the test expected playback
to start immediately after loading the license. However,
with round-off, this could easily be more than 1 second. So
this does not warrent even a warning.

Second, the fake and real clocks were only synced after
computing how long to sleep. This is fixed by moving
SleepUntil to the TestSleep class and having it sync before
computing the delta and after doing the sleep.

Third, I am guessing that some failures due to unexpected
lenience were caused by the rental or playback clock being
started at the end of signing the license or the end of the
first decrypt instead of the beginning. We work around this
by recording how long these operations take, and then adding
this extra time at the end of the check for FailDecrypt.

Bug: 275003529
Bug: 279249646
Bug: 207500749
Test: Luci tests
Change-Id: I6a973565edfbebca53ee7f239b4b93f8f73d1e0a
2024-03-27 03:19:22 +00:00
Alex Dale
d098c7df56 Merge "Update support for HDCP levels on Android and CE CDM." into udc-widevine-dev 2024-03-25 21:21:05 +00:00
Treehugger Robot
170b2bcc93 Merge "Revert CDM changes from oemcrypto 18.4" into udc-widevine-dev 2024-03-25 05:50:59 +00:00
Alex Dale
a19e487c47 Update support for HDCP levels on Android and CE CDM.
[ Merge of http://go/wvgerrit/194930 ]
[ Cherry-pick of http://ag/26577931 ]

OEMCrypto v17 introduced higher granularity in the device's HDCP V1
levels.  Previously, all HDCP v1.x were group together.  The change
was aimed towards server policy enforcement, not device enforcement.

Core code was updated, and could then be reflected in license
requests; however, reporting the new v1.x subversions was never
exposed to the higher app layers.

It is likely that devices which attempted to use specific 1.x versions
encountered test failures (for both CE CDM and Android CDM) as neither
implementations could handle such versions when communicating with
the app.

This change updates both CE CDM and Android CDM:
1) The CE CDM now uses the same subversion version comparisons as
   performed by the core code.
2) The Android CDM will now recognize new HDCP levels, and not return
   unexpected values.

Bug: 329155501
Test: run_x86_64_tests
Test: request_license_test on Oriole
Change-Id: I61fc0f11808f594456bd00210fd9b2bb5ed16c0e
2024-03-21 14:13:41 -07:00
Treehugger Robot
8d23655439 Merge "Fix default cipher mode for CAS unit test" into udc-widevine-dev 2024-03-20 19:39:12 +00:00
Alex Dale
bb71b1261e Reset crypto session pointers on RemoveKeys.
[ Merge of http://go/wvgerrit/189650 ]

The CDM session shares its CryptoSession instance with a few additional
member objects (CdmLicense and PolicyEngine).  When the CDM session's
crypto session is reset, it must also reset the CdmLicense and
PolicyEngine otherwise, a potential stale pointer reference may occur.

Test: request_license_test on Oriole
Test: WVTS on Oriole
Bug: 311239278
Change-Id: Ie175513ae652dcd96e12e5e1def574a8a56d5863
2024-03-18 16:24:47 -07:00
Kyle Zhang
069782c6f6 Do not fall back to L3 if L1 has test keybox
ag/26105061 accidentally reverted some of these changes so I am pushing
up another patch to add them back in.

[ Merged of go/wvgerrit/186370 ]

CDM by default allows test keybox from device side.

Bug: 299987160
Bug: 301669353
Change-Id: I6acf93c78f76a13f2c4539aabfd0262670b54c48
2024-03-18 16:47:44 +00:00
Cong Lin
89871ba834 Fix default cipher mode for CAS unit test
Merge of
https://widevine-internal-review.git.corp.google.com/c/cdm/+/193670

Default to OEMCrypto_CipherMode_CBC instead of OEMCrypto_CipherMode_CENC
which is not used by CAS.

Test: CAS unit tests
Bug: 325639114
Bug: 322928572
Change-Id: I8876d5262643015fb6a322eae6444ef4001d146d
2024-03-15 17:30:19 +00:00
Vicky Min
7fd4541eab Call CopyBuffer in Decrypt if key handle is empty
(Merged from go/wvgerrit/193672)

Bug: 320785945
Test: GTS + unit tests
Change-Id: I4a0c7568bf8323187f1156874ea98718511120f4
2024-03-13 18:51:44 +00:00
Rahul Frias
8e0a3f5600 Revert CDM changes from oemcrypto 18.4
[ Merge of TBD ]

The merge of oemcrypto-v18 cdm branch to udc-widevine-dev
caused a number of CDM/plugin fixes to be lost.

This undoes the non-oemcrypto changes in http://go/ag/26105061

Bug: 290252845
Test: WVTS, unittests on panther
Change-Id: I2bb99f423bda351eee30276cb0e26e3d9e27fa7d
2024-02-16 14:38:05 -08:00
Treehugger Robot
c5e171867b Merge "Cherry pick 18.4 changes to udc-widevine-dev" into udc-widevine-dev 2024-02-06 00:09:56 +00:00
Vicky Min
4129b3ac9f Cherry pick 18.4 changes to udc-widevine-dev
Get the udc-widevine-dev Android branch and oemcrypto-v18 cdm branch in
sync. The commit ID for 18.4 on oemcrypto-v18 is
https://widevine-internal.git.corp.google.com/cdm/+/a2f23a2281e5e06dc2867585bdc516fa132b639.

Merged from go/wvgerrit/190151

Bug: 290252845
Test: unit tests passing on Panther device
Change-Id: I63fa3f1c784f737ca1480e5febe4f3f5a8a49948
2024-02-05 18:08:40 +00:00
Ling-Yu Lee
dce4be593f Merge "Add GMScore into allow list to invoke signRSA API." into udc-widevine-dev 2024-02-01 03:23:50 +00:00
Kensuke Miyagi
540c8dfd50 Revert "Cherry pick 18.4 changes to udc-widevine-dev"
This reverts commit 7186433edf.

Reason for revert: Build breakage - b/323194350

Change-Id: Ibba4f5289b8f0d5e835dfba9ceb1e601784af634
2024-01-31 18:13:05 +00:00
Vicky Min
7186433edf Cherry pick 18.4 changes to udc-widevine-dev
Get the udc-widevine-dev Android branch and oemcrypto-v18 cdm branch in
sync. The commit ID for 18.4 on oemcrypto-v18 is
a2f23a2281e5e06dc2867585bdc516fa132b6396.

Merged from go/wvgerrit/190151

Bug: 290252845
Test: WVTS tests are running and passing
Change-Id: I457332e7ca70a5b5169345e1279b3eb9f18413b6
2024-01-29 18:18:50 +00:00
Ling-Yu Lee
ebd9428c57 Add GMScore into allow list to invoke signRSA API.
Purpose: Moving cast auth into GMScore.
Deisign doc: go/gtv-cast-auth

Bug: b/322097595
Test: Manual
Change-Id: Ic18188dfa61df0d64c1b19fddc99abe851f8b724
2024-01-26 03:09:13 +00:00
Rahul Frias
e001272e4d Merge "Offline playback failure for ATSC 3.0" into udc-widevine-dev 2024-01-25 04:52:49 +00:00
Robert Shih
26be4cfdc2 NON-GMS Android BCC upload tool
Based on CE upload tool: go/wvgerrit/153632

Bug: 321252577
Test: python3 ./wv_upload_tool.py
Change-Id: I266f11585c1025e49ed807bec0b91b83af6742ae
2024-01-24 00:27:41 +00:00
Rahul Frias
63ff6596b6 Offline playback failure for ATSC 3.0
[ Merge of http://go/wvgerrit/148949 ]

For ATSC licenses use ATSC certificates/private keys rather than
any cert/private key specified in the license.

Bug: 216420542
Test: WV unit/integration tests
Change-Id: I12541577e672c67cc4c6eb3365e48bf2034fd9a4
2024-01-16 14:37:47 -08:00
Robert Shih
8b52f39a58 Embed build number in non-apex build
Bug: 316978205
Test: m android.hardware.drm-service.widevine
Change-Id: Ibf77a0135fa832424f38619bdd2df0ccc53f5849
2024-01-16 06:09:26 +00:00
Alex Dale
0a0fea75a8 Merge "Check if license exists before calling remove." into udc-widevine-dev 2023-11-16 23:06:59 +00:00
Alex Dale
3ba1dd3fe6 Merge "Filter out key set IDs based on ATSC mode." into udc-widevine-dev 2023-11-16 22:27:11 +00:00
Kyle Zhang
45fd4728bc Drop Widevine apex prebuilt files for Widevine partners
The following files have been updated as part of this change:

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.lazy
versionCode=341310000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.lazy
versionCode=341310000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.lazy
versionCode=341310000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.lazy
versionCode=341310000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341310000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341310000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341310000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341310000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

Built here: ab/11084883

The change is generated with prebuilt drop tool.

Change-Id: I6b327930a786b80254ea22088e09996220892aac
2023-11-15 20:23:11 +00:00
Kyle Zhang
c6c49c68b0 Merge "Do not fall back to L3 if L1 has test keybox" into udc-widevine-dev 2023-11-13 22:14:30 +00:00
Alex Dale
fa6fbd16b6 Check if license exists before calling remove.
[ Merge of http://go/wvgerrit/187610 ]
[ Partial cherry-pick of http://ag/25096962 ]

The removeOfflineLicense() API in the Media DRM plug would attempt
to remove the specified license from L1, then retry L3 if L1 failed
for any reason.  This causes error emitted by L1 to be masked by
errors emitted from L3.  In particular, if an internal error occurs
on L1 when removing the license, because the plugin would then
try L3 which does not contain the license, the app will receive either
a "does not exist" or "needs provisioning" error from L3.

This CL changes the plugin to first determines which security level
the license exists for.  Then only attempts removal on that security
level.

Bug: 301910628
Bug: 291181955
Bug: 296300842
Bug: 302612540
Test: MediaDrmParameterizedTests GTS on oriole
Change-Id: I5fbb6805e598650f9b384a3b0e8d67f1c2a0f78d
2023-11-10 14:39:55 -08:00
Alex Dale
6b1758dcb7 Filter out key set IDs based on ATSC mode.
[ Merge of http://go/wvgerrit/187610 ]
[ Partial cherry-pick of http://ag/25096961 ]

Certain GTS tests do not fully consider restrictions on ATSC devices.
In particular, GTS assumes if there are any key set IDs returned to
the app via the MediaDrm API, then the device must already be
provisioned.  ATSC license are special in that they may be available,
but the CDM is not provisioned while outside of ATCS mode.

To work around this assumption made by GTS, we filter out ATSC licenses
returned by getOfflineLicenseKeySetIds() when the device is not in
ATSC mode, and filter out non-ATSC license when it is in ATSC mode.

This is only a soft enforcement mechanism as calling the API with a
valid ATSC license while outside ATSC mode (or a non-TSC license in
ATSC mode) will continue to result in the failures experienced by
certain OEMs.

Bug: 301910628
Bug: 291181955
Bug: 296300842
Bug: 302612540
Test: MediaDrmParameterizedTests GTS on oriole
Change-Id: Idb1853a7b7c93c7f22bc4db530ec26f20402dbb7
2023-11-10 14:38:30 -08:00
Robert Shih
83b2c78732 Allow system user csr access
Bug: 296971609
Test: Oppo rkp_factory_extraction_tool
Change-Id: I0e51bc52cc269e69fb3d3f056dfa7fbaa414e6a5
2023-11-08 19:48:57 -08:00
Kyle Zhang
c1ba10fd16 Do not fall back to L3 if L1 has test keybox
[ Merged of go/wvgerrit/186370 ]

CDM by default allows test keybox from device side.

Bug: 299987160
Bug: 301669353
Change-Id: I06f1936ccd068eb71364a5a8931970954233b686
2023-11-08 01:04:06 +00:00
Kyle Zhang
cce17b9b68 Drop Widevine apex prebuilt files to android source tree.
The following files have been updated as part of this change:

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.lazy
versionCode=341113000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.lazy
versionCode=341113000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.lazy
versionCode=341113000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.lazy
versionCode=341113000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341113000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341113000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341113000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=341113000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

Built here: ab/10842987

The change is generated with prebuilt drop tool.

Change-Id: I689bd25ff5111644237be39d4121389e3249262a
2023-10-02 22:26:31 +00:00
Rahul Frias
bc0b49e63a Merge "Correct stability issues for SPOIDs for provisioning 4.0" into udc-widevine-dev 2023-09-21 05:31:46 +00:00
Treehugger Robot
df7846a20f Merge "Correct stability issues for SPOIDs for provisioning 4.0" into udc-qpr-dev am: 05f045d802
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24537206

Change-Id: I9bf72cd82f4c8821344ec1134c22d105b76f6cbe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 21:17:31 +00:00
Treehugger Robot
05f045d802 Merge "Correct stability issues for SPOIDs for provisioning 4.0" into udc-qpr-dev 2023-09-20 20:15:28 +00:00
Rahul Frias
ae8e23f0b1 Correct stability issues for SPOIDs for provisioning 4.0
[ Merge of http://go/wvgerrit/183472 and http://go/ag/24537206 ]

For provisioning 4.0 devices, the DRM certificate serial number
was changing on a reprovisioning attempt or factory reset. The
app parameters sent up in the client identification name-value
pair field were being filtered out in provisioning requests.
This has been corrected for provisioning 4.0 stage 2
(DRM certificate request). There is no need to include them for
stage 1 (OEM certificate request).

The test case WvCdmRequestLicenseTest.ProvisioningSpoidTest
was created earlier to ensure that SPOIDs and DRM certificates are
stable. Unfortunately due to another bug b/250099615, the RKP service
was holding a connection to the Widevine TA for provisioning 4.0
devices. When native tests ran as their own process, L1 would fail
to load due to a connection failure and the test would run as L3.
The tests passed for provisioning 4.0 devices Pixel 7 and 8 when
they should have failed. This gave us a false sense of confidence
that the SPOIDs were stable.

For now a workaround is to run a shell command to kill the widevine
TA before running native tests.

$ adb shell pkill -f -9 widevine

New tests have been introduced to provide integration coverage
WVPluginTest at the WV plugin level and CoreIntegrationTest
for core. GTS tests are also being written in b/295538002.

Bug: 294451432
Bug: 293950895
Test: WVPluginTest.ProvisioningStableSpoidTestL1, WVTS tests
Change-Id: Ib9ace4387866ea38bb1840feb69cea78d2d2c09c
2023-09-19 17:38:18 -07:00
Rahul Frias
2f83cd0e49 Correct stability issues for SPOIDs for provisioning 4.0
[ Merge of http://go/wvgerrit/183472 ]

For provisioning 4.0 devices, the DRM certificate serial number
was changing on a reprovisioning attempt or factory reset. The
app parameters sent up in the client identification name-value
pair field were being filtered out in provisioning requests.
This has been corrected for provisioning 4.0 stage 2
(DRM certificate request). There is no need to include them for
stage 1 (OEM certificate request).

The test case WvCdmRequestLicenseTest.ProvisioningSpoidTest
was created earlier to ensure that SPOIDs and DRM certificates are
stable. Unfortunately due to another bug b/250099615, the RKP service
was holding a connection to the Widevine TA for provisioning 4.0
devices. When native tests ran as their own process, L1 would fail
to load due to a connection failure and the test would run as L3.
The tests passed for provisioning 4.0 devices Pixel 7 and 8 when
they should have failed. This gave us a false sense of confidence
that the SPOIDs were stable.

For now a workaround is to run a shell command to kill the widevine
TA before running native tests.

$ adb shell pkill -f -9 widevine

New tests have been introduced to provide integration coverage
WVPluginTest at the WV plugin level and CoreIntegrationTest
for core. GTS tests are also being written in b/295538002.

Bug: 294451432
Bug: 293950895
Test: WVPluginTest.ProvisioningStableSpoidTestL1, WVTS tests
Change-Id: Ib9ace4387866ea38bb1840feb69cea78d2d2c09c
2023-09-19 09:39:13 -07:00
Kyle Zhang
76401a2668 Sign nonupdatable widevine apex with its dev key
Bug: 299149538
Change-Id: Ic99838e4e8410b92bcef2bb88da4d64841546819
2023-09-06 22:33:49 +00:00
Treehugger Robot
aac5b59efd Merge "Skip entitlement session tests that are only supported on CAS devices" into udc-widevine-dev 2023-09-06 21:20:37 +00:00
Treehugger Robot
fdf0ed469d Merge "Filter keybox tests with GTEST_SKIP" into udc-widevine-dev 2023-09-01 18:03:53 +00:00
Vicky Min
6b71f72709 Skip entitlement session tests that are only supported on CAS devices
(merged from go/wvgerrit/183690)

Bug: 297497167, 297244784
Test: OEMCryptoEntitlementLicenseTest
Change-Id: I25b87ee922080fa7c245041a70c58ac120e789e5
2023-09-01 17:21:07 +00:00
Vicky Min
fe0ddc8098 Filter keybox tests with GTEST_SKIP
(merged from go/wvgerrit/183630)

Bug: 288404945, 251240681
Test: keybox tests
Change-Id: I38ed2ba54c9f756693902fd7d0044d4e42bbc2fd
2023-09-01 17:01:52 +00:00
Kyle Zhang
717a0b756b Merge "Drop Widevine CDM v17 prebuilt files" into udc-qpr-dev am: 50b61a6d15
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24578415

Change-Id: Ifecb347ca73b17f408ff185eb38de9a9f1d2117a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 23:26:34 +00:00