Commit Graph

3286 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
10d9bc272f Mark some ODK types as undocumented, and document others
Bug: 293188660
PiperOrigin-RevId: 551019650
Merged from https://widevine-internal-review.googlesource.com/180470

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

Change-Id: I28aa1d82437128ac2862cf0d6de325644e4af067
2024-01-29 12:39:48 -08:00
Vicky Min
e765453b35 Update ODK minor version to match when major version is updated
PiperOrigin-RevId: 551930047
Merged from https://widevine-internal-review.googlesource.com/180430
(cherry picked from commit d85aa8107dbe292490f9897b1e76f72bc0144bff)

Change-Id: If973113886a19cb720ad635e68830b9afbcf22b5
2024-01-29 12:39:48 -08:00
Fred Gylys-Colwell
06ad24bce0 Update ODK and test version to 18.3
PiperOrigin-RevId: 546349606

Merged from
https://widevine-internal-review.googlesource.com/178000
and
https://widevine-internal-review.googlesource.com/178061

Bug: 290252863
Change-Id: I0d6d9a0214d556ae39efe8a720df8ac60c1e67fb
2024-01-29 12:39:46 -08:00
Matt Feddersen
2e7c68440b Bump OEMCrypto API to 18.2 to match ODK
Merged from https://widevine-internal-review.googlesource.com/170295

Change-Id: I9e9cc0c7c3296db71ac31518cf2d3d8608066686
2024-01-29 12:38:34 -08:00
Fred Gylys-Colwell
84e27c660d Initialize renewal request time
The `time_of_renewal_request` field in the clock_values struct was not being initialized. With this CL, we use a value of 0 to indicate a renewal has not been requested yet.

We also modify the check in `ODK_ParseRenewal` to use a value of 0 for the `time_of_renewal_request` to skip the check for a stale renewal. This is done because now that a "renew on license load" license starts the playback clock immediately, we need a different way to decide if a renewal from a previous session can be loaded.

PiperOrigin-RevId: 546129556
Merged from https://widevine-internal-review.googlesource.com/177998

Change-Id: I17282cf918d0cdb4d9b5108a41914ecd7d87cc8f
2024-01-29 12:31:37 -08:00
Fred Gylys-Colwell
d0752047fc Document b/290249855 in ODK
PiperOrigin-RevId: 546118816
Merged from https://widevine-internal-review.googlesource.com/177992

Change-Id: I6ab0b599a2d858f9451a5fbd3e3612275b729ee6
2024-01-29 12:31:36 -08:00
Vicky Min
414e928238 Remove version check in ODK_InitializeSessionValues
It seems ODK_InitializeSessionValues is only used in initializing the session in OEMCrypto, so we can remove this check.

PiperOrigin-RevId: 545729842
Merged from https://widevine-internal-review.googlesource.com/169914

Change-Id: Idcc58166f64116214540591dc71a774f3ce3f3d1
2024-01-29 12:31:36 -08:00
Alex Dale
48b1aed404 Set min_sdk_version for the Widevine APEX on ODK
This change brings the odk/Android.bp in sync with the Android repo.  Change was originally made in ag/22120778

PiperOrigin-RevId: 540398693
Merged from https://widevine-internal-review.googlesource.com/177000

Change-Id: Id3bf7193da8de3b9942da052c32065f031102d9b
2024-01-29 12:31:03 -08:00
Vicky Min
ff80927f90 Allow server to send license with larger ODK_MAX_NUM_KEYS
PiperOrigin-RevId: 538676411
Merged from https://widevine-internal-review.googlesource.com/175915

Change-Id: Iadef2115fe3f9001034223e647cbfa6228484281
2024-01-29 12:31:03 -08:00
Fred Gylys-Colwell
57e997fe19 Add golden test data for ODK
This data was generated using the code in CLs go/wvgerrit/163726 (for v16),
go/wvgerrit/171730 (for v17), and go/wvgerrit/171750 (for v18).

PiperOrigin-RevId: 535679470
Change-Id: Ib644bbed7e7329dfea30ce25d325fd0556fdb7a7
2024-01-29 12:30:15 -08:00
John Bruce
db670e7bcc Add tests for ODK overflow functions
Merged from http://go/wvgerrit/175855

This includes testing overflow functions that are only used in the Widevine client repository.

This patch also includes the following fix for the previous commit:

Add type casting for ODK overflow function unit tests

Merged from http://go/wvgerrit/175893

The new ODK overflow unit tests are causing some unit test failures in oemcrypto-v18 due to mismatched type comparisons.

PiperOrigin-RevId: 535308670
PiperOrigin-RevId: 534890798
Change-Id: I8bb67e47193a92191a91c83bf8a0de61e1b87793
2024-01-29 11:51:41 -08:00
Vicky Min
8f6dbdb94e Set rental clock if not already set in ODK_ParseLicense
PiperOrigin-RevId: 535020833
Merged from https://widevine-internal-review.googlesource.com/175851

Change-Id: Idc5e2123e56346b9d7c036683c184057f49ea58a
2024-01-29 11:51:41 -08:00
Vicky Min
d5afa3fd99 Cleanup design of ODK_ParsedLicense handling and maintain backwards compatibility
PiperOrigin-RevId: 529531139
Merged from https://widevine-internal-review.googlesource.com/172870

Change-Id: Id07dc82a8c2729cdbf10a9c8680ed979f8de51b5
2024-01-29 11:51:41 -08:00
Vicky Min
6c953ab651 Fix license response default values error in CreateCoreLicenseResponse
PiperOrigin-RevId: 529588784
Merged from https://widevine-internal-review.googlesource.com/174260

# Conflicts:
#	oemcrypto/odk/include/odk_structs.h

Change-Id: I96f348bfc9b5be7113ddb2af18a38c36d337697c
2024-01-29 11:51:41 -08:00
Vicky Min
f71014507d Set renewal_delay_base in function CreateCoreLicenseResponseFromProto
PiperOrigin-RevId: 525261485
Merged from https://widevine-internal-review.googlesource.com/170810

Change-Id: I96f16639a728db9b6922d3f23e0212fa2902602e
2024-01-29 11:51:41 -08:00
Vicky Min
152f2144f9 Fix ODK warning errors for WV DRM
PiperOrigin-RevId: 525266553
Merged from https://widevine-internal-review.googlesource.com/169640

Change-Id: Id92dac068a2b2f767287641170f7b522f54588e4
2024-01-29 11:51:41 -08:00
Fred Gylys-Colwell
ae0134b21d Make the server send ODK v18 messages by default
The core message had been throttled to only generate v17 messages because we wanted to stabilize the format before making the code live.

PiperOrigin-RevId: 524309559
Merged from https://widevine-internal-review.googlesource.com/170311

Change-Id: I2d09c9f6c73f844fd509531e86285ad71d22690f
2024-01-29 11:51:41 -08:00
Googler
89666aeb89 Fix issues identified by clang-tidy
- Replace assert with odk_static_assert for checks that can be handled
  at compile time.
- Use explicit bool conversion with memcmp.

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

PiperOrigin-RevId: 524277743
Change-Id: I8b32e886e780e80406afceea562be2033d75d340
2024-01-29 11:51:41 -08:00
Matt Feddersen
a2a27c44ef Correctly parse v18.0 provisioning requests
The previous code fixed a backwards compatibility error for v18 provisioning requests being parsed by a v17 or older server. This bumped the minor version number to v18.1. v17 servers are still expected to fail when trying to parse v18.0 provisioning requests, and v18.1 requests will pass.

However, it did not correctly account for existing v18.0 requests on v18.1+ servers. v18.0 messages were naively detected by a failure to parse, and the parse function was not run again. This left the resulting nonce and session_id values uninitialized.

This CL fixes that by explicitly handling the v18.0 and v18.1+ cases, ensuring that the parse function succeeds and all relevant information is copied over. Furthermore, the unit test that was meant to catch this edge case has been improved to validate the resulting parsed message.

All code changes affect the server. This does not affect the client code eg OEMCrypto

PiperOrigin-RevId: 523714529
Merged from https://widevine-internal-review.googlesource.com/170110

Change-Id: I21911c4bb4304de2d93f092f356402bbd4240874
2024-01-29 11:20:20 -08:00
Vicky Min
c6e7c70a6b Remove reference to OEMCrypto_LoadKeys() in ODK code
PiperOrigin-RevId: 522089097
Merged from https://widevine-internal-review.googlesource.com/168481

Change-Id: I59927c7f5aba52523aeba78c130f4b148d1c363f
2024-01-29 11:20:11 -08:00
Fred Gylys-Colwell
231ff3735c Backport http://go/ag/21276850
Changes to the Android build files.

PiperOrigin-RevId: 512200169
Merged from https://widevine-internal-review.googlesource.com/166925

Change-Id: If6247499693013099d705dd22a123c36a76e0404
2024-01-29 11:06:45 -08:00
Ling-Yu Lee
0919fb7ea6 Merge "Add GMScore into allow list to invoke signRSA API." into main 2024-01-26 00:18:19 +00:00
Ling-Yu Lee
3a87988181 Add GMScore into allow list to invoke signRSA API.
Purpose: Moving cast auth into GMScore.
Deisign doc: go/gtv-cast-auth

Bug: b/318467776
Test: Manual
Change-Id: Ic18188dfa61df0d64c1b19fddc99abe851f8b724
2024-01-26 00:17:03 +00:00
Treehugger Robot
665781cba3 Merge "widevine fuzzer: remove relative paths" into main 2024-01-25 00:28:07 +00:00
Steven Moreland
ec6cb73143 widevine fuzzer: remove relative paths
breaks fuzzing packaging

Bug: 300993391
Test: run fuzzer, check lsof
Change-Id: Ibfbfcff377ffb3a15197de4c80cdd3d4e27c8b0a
2023-12-28 01:07:58 +00:00
Kyle Alexander
163db3777f Remove unnecessary test dependency on libmedia_omx
Test: ./build_and_run_all_unit_tests.sh

Bug: 312063280
Change-Id: Id8c8c4d3d778599c4c418b667497ff7f50f8152e
2023-12-21 20:55:58 +00:00
Kyle Zhang
6b60fc3a76 Add property to check if user forces L3
[ Merge of go/wvgerrit/186611 ]

Android user can set the property using the developer option.

Bug: 301669353
Change-Id: I730b635f6cc28dfb0471c1d679627c94b9e16af1
2023-11-09 19:59:46 +00:00
Kyle Zhang
45d8b38b43 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-09 00:26:17 +00:00
Treehugger Robot
c1f65ff88a Merge "Add package name for build flag" into main 2023-10-26 21:36:55 +00:00
Kyle Zhang
8661efab13 Add package name for build flag
Bug: 303466154
Change-Id: Ia48e9ca2da6d0d17179998200e0ebdb238a4d217
2023-10-25 21:46:30 +00:00
Kyle Zhang
f74a5e6637 Drop Widevine apex prebuilt files wv_341113000
The following files have been updated as part of this change:

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy-wv_341113000.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-wv_341113000.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-wv_341113000.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-wv_341113000.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.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-wv_341113000.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-wv_341113000.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-wv_341113000.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-wv_341113000.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

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: I01e646c5524aaf254c8ed7353e74243d8fd4480c
2023-10-25 21:44:30 +00:00
Kyle Zhang
51bbffd87e Drop Widevine CDM v17 prebuilt files
The following files have been updated as part of this change:

libwvdrmengine/prebuilt/v17/android.hardware.drm-service.widevine

Built here: ab/10868711

The change is generated with prebuilt drop tool.

Bug: 300303634
Change-Id: I7477f3c4efaecc0b56fbcf27b37653f3462a605c
2023-10-02 18:01:31 +00:00
Treehugger Robot
d9b24af07f Merge "Correct stability issues for SPOIDs for provisioning 4.0" into udc-qpr-dev am: 05f045d802 am: 2b9c29d110
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24537206

Change-Id: I718342725a8025d4e1f6e6d2ec547a4b0e600cf6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 22:07:10 +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
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
302c09e555 Sign nonupdatable widevine apex with its dev key
Bug: 299149538
Change-Id: Ic99838e4e8410b92bcef2bb88da4d64841546819
2023-09-06 21:20:46 +00:00
Kyle Zhang
27d51ad769 Merge "Drop Widevine CDM v17 prebuilt files" into udc-qpr-dev am: 50b61a6d15 am: 20f11d31db
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24578415

Change-Id: Ia75918291346fa5f02bef264e1603647f26b7cd4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-31 01:03:01 +00:00
Kyle Zhang
50b61a6d15 Merge "Drop Widevine CDM v17 prebuilt files" into udc-qpr-dev 2023-08-30 23:08:25 +00:00
Robert Shih
d2ae81db2a Update Widevine apex min_sdk_version to 34 am: d81cdbae42 am: 0734bab945
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24326594

Change-Id: Ia18fc314eaa00fa7a4bdc8e58d624b667680e896
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 21:03:01 +00:00
Kyle Zhang
dfed5db616 Drop Widevine CDM v17 prebuilt files
The following files have been updated as part of this change:

libwvdrmengine/prebuilt/v17/android.hardware.drm-service.widevine

Built here: ab/P61807725

The change is generated with prebuilt drop tool.

Bug: 297297678
Test: com.google.android.wvts
Change-Id: I1d91131c16a044aa4f3aad0afc2857fb74182851
2023-08-30 04:36:15 +00:00
Robert Shih
d81cdbae42 Update Widevine apex min_sdk_version to 34
Bug: 287567070
Bug: 294568360
Test: v2/widevine-eng/drm_compliance_apex
Change-Id: Iad45bf7a66ff0217724376aa8648ecd613af32c1
2023-08-28 12:30:36 -07:00
Kyle Zhang
9a12053a16 Drop Widevine CDM v17 prebuilt files am: 9c6f96d87c am: 52dcea6955
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24486319

Change-Id: Ic8dfef971f1a21f29331e7b18c24cce04bf8071d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-22 01:12:11 +00:00
Kyle Zhang
9c6f96d87c Drop Widevine CDM v17 prebuilt files
The following files have been updated as part of this change:

libwvdrmengine/prebuilt/v17/android.hardware.drm-service.widevine

Built here: ab/P61073747

The change is generated with prebuilt drop tool.

Bug: 291139517
Test: com.google.android.wvts.MediaDrmParameterizedTests#testValidateMetrics[L1] and 3
Change-Id: I66e2c03ba226c6404ee0c92ab84e07f187a20b32
2023-08-18 23:03:33 +00:00
Treehugger Robot
f1ddbe71f5 Merge "Add dumping provision request functionality" into udc-qpr-dev am: be8b64a4e6 am: c81b7c2419
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24269065

Change-Id: I1ac0f04af57b7438c8289065595e0b04e38dda88
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-08 23:49:44 +00:00
Treehugger Robot
be8b64a4e6 Merge "Add dumping provision request functionality" into udc-qpr-dev 2023-08-08 22:55:15 +00:00
Alex Dale
729f81217c Merge "Close session during capacity check." into udc-qpr-dev am: 310c028965 am: 1c1066dd39
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24310872

Change-Id: Ieb868f5696966e934f8bf2796d468704ea1f3dd5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 23:41:30 +00:00
Alex Dale
310c028965 Merge "Close session during capacity check." into udc-qpr-dev 2023-08-07 22:32:28 +00:00
Alex Dale
75d3ade093 Close session during capacity check.
[ Merge of http://go/wvgerrit/181151 ]
[ Cherry-pick of http://ag/24103737 ]

For devices with a large number of usage entries, when restoring the
usage table a capacity check is performed.  This checks that a new
entry can be created.  This test was originally added as some devices
might enter a "stuck" state the table cannot be initialized.

To perform this test, a temporary crypto session is created and an
entry is created for that session.  After successfully creating that
entry, the entry is deleted.  However, because the session was left
open, the entry could not be deleted.

This change closes the capacity-check-session before deleting the
entry, as well as includes additional logs for helping future debugs.

Bug: 286176947
Bug: 291351287
Test: usage_table_header_unittest
Test: Android GTS R11 on oriole
Change-Id: I6923de00175f70b2392bfe581ca5f9ae60c4af25
(cherry picked from commit 8b4bbeeb6f440c48a3250b961f7a7dab2472d7e9)
(cherry picked from commit bb925c46e5)
2023-08-07 20:50:18 +00:00
Alex Dale
10a31ccf3c Add HDCP cap logging on HDCP-based failures. am: 3ea91f35dd am: 8e0db60e5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24314234

Change-Id: Ie69c63fd9e8c59807fef097a8e137e7ba07f296d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 19:09:58 +00:00
Alex Dale
3ea91f35dd Add HDCP cap logging on HDCP-based failures.
[ Merge of http://go/wvgerrit/181152 ]
[ Cherry-pick of http://ag/24137228 ]

Partners have requested that we log HDCP information during certain
operation:
1) Current and max HDCP capability when calls to decrypt or select
   key failure due to insufficient or mixed HDCP levels.
2) Current, desired and default HDCP level when video contraints
   are not met.

To avoid spamming the logs, decrypt failures are only logged on their
first occurrence, and unmet video constrains when one of the
requirements change.

Bug: 276686656
Bug: 292005982
Test: license_keys_unittest
Test: Android WVTS on oriole
Change-Id: I98b18e66d7ce1c474a018ae83af4f1c0b03308df
(cherry picked from commit c84b9afd38)
2023-08-05 09:21:50 +00:00