Commit Graph

8220 Commits

Author SHA1 Message Date
Android Build Coastguard Worker
154f5da380 Make change and version bump to AV1A.250714.001
Snap for 13778804 from 919bc45396 to vic-widevine-partner-release

Change-Id: I9a7f2dc82d18ccf5daf118850b8c9f0117bf0967
2025-07-14 16:22:40 -07:00
Treehugger Robot
919bc45396 Merge "Add workaround for VERSION_2_2 back compat" into vic-widevine-dev 2025-07-14 14:15:48 -07:00
Matt Feddersen
17d28c35fa Add workaround for VERSION_2_2 back compat
Uses the same workaround as whitebox for compatibility with v16.4 and older servers.

Test: Locally built in Trusty repo, installed on prod device with DPM, ran custom Exoplayer demo with license server URL replaced with 1642 endpoint.
PiperOrigin-RevId: 639882556
Merged from https://widevine-internal-review.googlesource.com/199870

Change-Id: I1669acc3ddae1bb3726bacd0de2f72aca75c9e97
(cherry picked from commit 5f7cd33f9869825bb17992840483807cae83ad24)
2025-07-14 10:55:07 -07:00
Matt Feddersen
28b6c5f5a2 Update ODK to 19.2
PiperOrigin-RevId: 625402563
Merged from https://widevine-internal-review.googlesource.com/196834

Change-Id: Ia5ebe3f9acd1fc8f0d43c0b5491f9d3c2f20a7a5
(cherry picked from commit a0a319c895af02cb82f67ed9a1ffc31a8e8a052a)
2025-07-14 10:47:22 -07:00
Alex Dale
d7eab65c8c Fixed dangling pointer issue in CdmInfo.
[ Cherry-pick of http://ag/34331848 ]
[ Merge of http://go/wvgerrit/224951 ]

There was a potential dangling pointer issue that was enabled
by how CdmInfo is initilized.  The file system that was passed
into the CdmEngine instance was pointing to a location in memory
that was not stable between move operations in the CdmInfo.
See b/429054262 for memory diagram of issue.

The CdmInfo is a private class within the Android CDM class, which
restricts the potential operations on it.  The easiest solution
is wrap the file system in a unique pointer; ensuring the pointer
remains stable even if a particular data segment of CdmInfo is
moved.

The default constructor for CdmInfo is deleted; this will force the
compiler to fail if |cdms_| is used in ways that would result in
uninitialized pointers.

Bug: 429054262
Test: WvTs on Komodo
Change-Id: I76a49fc5181ebd1613e238aa49986083a9f397ec
(cherry picked from commit 4c105faa4923bd9bd6352f757dedf3eaf9ed88fd)
2025-07-08 15:53:39 -07:00
Android Build Coastguard Worker
873a93e72a Make change and version bump to AV1A.250627.002
Snap for 13709679 from e2fba86327 to vic-widevine-partner-release

Change-Id: I34799c1591178456bcab06db4032b4cbca3edf9a
2025-06-27 22:49:39 -07:00
Treehugger Robot
e2fba86327 Merge "Drop Widevine apex prebuilt files for release 13708754" into vic-widevine-dev 2025-06-27 17:46:34 -07:00
Kyle Zhang
3e32f7a6f6 Add new release apex set 13708754
Bug: 324294223
Change-Id: If8b96edbc5cedf2ef7286d7207db8e23d4a2a1c6
2025-06-27 23:35:28 +00:00
Kyle Zhang
8ca1ee8c7e Drop Widevine apex prebuilt files for release 13708754
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=190250627
versionName=
platformBuildVersionName=15
compileSdkVersion=35
compileSdkVersionCodename=15
sdkVersion:34
targetSdkVersion:35

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The change is generated with prebuilt drop tool.

Change-Id: Ic3090f769a86d2806a421bd1f2715a40d4f5976d
2025-06-27 23:30:20 +00:00
Android Build Coastguard Worker
cf725e2474 Make change and version bump to AV1A.250627.001
Snap for 13708108 from 573fa0b628 to vic-widevine-partner-release

Change-Id: I8e358d2d4b431b11004ef54a64f28f772617319e
2025-06-27 14:25:59 -07:00
Kyle Zhang
573fa0b628 Check if service is ready before query status
Bug: 425974655
Change-Id: I8707b844d65865d409780e1861385d840525390b
2025-06-27 09:39:24 -07:00
Android Build Coastguard Worker
eae8d07a1c Make change and version bump to AV1A.250618.002
Snap for 13668075 from da542e6219 to vic-widevine-partner-release

Change-Id: Ic4fdf4610159ba08840114f4bdb182c6c5701fa6
2025-06-18 22:31:09 -07:00
Kyle Zhang
da542e6219 Use libcdm_utils instead of libwv_cdm_utils
Bug: 425987980
Change-Id: I2fc6f504d0033efdaa606a30fad07d788ebadd8c
2025-06-18 16:37:40 -07:00
Android Build Coastguard Worker
4aabf98f15 Make change and version bump to AV1A.250618.001
Snap for 13660566 from f6330825a3 to vic-widevine-partner-release

Change-Id: I38fe9942a26aec77442c0e6502bc279a2c1d56d5
2025-06-18 10:18:46 -07:00
conglin
f6330825a3 Move json util code to common
So that it can be shared by CE CDM extraction tool later.

Test: m wv_factory_extraction_tool
Bug: 414642286
Change-Id: I6dba70227ce2789dd3686ebbf6ed3a0dbf68dc00
2025-06-17 06:23:19 +00:00
conglin
7496c1c84c Move ASOP factory extraction tool to its own directory
Moved some source to common folder.
Added uploading script which is also shared by CE CDM partners.
Added README.

Test: m wv_factory_extraction_tool
Bug: 414642286
Change-Id: I565027b75528ab28f9f1eb8d9086c0213de992d0
2025-06-17 06:23:03 +00:00
conglin
1f77085571 Re-purpose internal factory upload tool for AOSP
This tool was supposed to be used for internal debugging purpose on
Android devices. It already supports RKP uploading CSR format.

Extend this tool to support  Widevine uploading format: JSON csr
and make this format as default output for AOSP (non-GMS) partners.

A later change will move it to its own aosp/ directory.

Test: run "wv_factory_extraction_tool json_csr" on Pixel 9
Bug: 414642286
Change-Id: I9cf4e9696d32201cc1ad70b6bee7932f7126a4ba
2025-06-17 06:22:40 +00:00
Android Build Coastguard Worker
b4a22ae7d7 Make change and version bump to AV1A.250514.001
Snap for 13493030 from cbcb2124d0 to vic-widevine-partner-release

Change-Id: I07b14ca775dda4b85d38b74ea1a8ab485d4dbd46
2025-05-14 12:14:41 -07:00
Treehugger Robot
cbcb2124d0 Merge "Add new release apex set 13484815" into vic-widevine-dev 2025-05-14 08:52:48 -07:00
Kyle Zhang
30060dc7e1 Add new release apex set 13484815
Bug: 324294223
Change-Id: Iaafbbc25f32f18fccf489ffabde98820947f383b
2025-05-13 18:34:38 +00:00
Kyle Zhang
e0a0c372f6 Drop Widevine apex prebuilt files for release 13484815
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=190250512
versionName=
platformBuildVersionName=15
compileSdkVersion=35
compileSdkVersionCodename=15
sdkVersion:34
targetSdkVersion:35

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The change is generated with prebuilt drop tool.

Change-Id: I495a0606590b88e56f9c65e7099ad6c885b786bf
2025-05-13 18:28:35 +00:00
Android Build Coastguard Worker
b6b7ec1b45 Make change and version bump to AV1A.250512.001
Snap for 13481725 from aa656ab3c0 to vic-widevine-partner-release

Change-Id: Id5e57a7d11fdfdb1de7b2673e99f66ecc827a019
2025-05-12 22:52:44 -07:00
Treehugger Robot
aa656ab3c0 Merge "Enable multi-threaded binder for specific devices" into vic-widevine-dev 2025-05-12 11:31:45 -07:00
Kyle Zhang
edb83f2669 Enable multi-threaded binder for specific devices
Bug: 369494012
Change-Id: I221121a5df53ae9758ac7d723f8a5e235121f997
2025-04-30 16:51:29 -07:00
Alex Dale
0c8c8913af Merge changes I7d760136,Id45d40d9,Ib2f6ef61,I51a118ce into vic-widevine-dev
* changes:
  Use std::move for key strings.
  Changed Prov4.0 handler to accept only recent requests.
  Separate OEM unprovisioning from DRM unprovisioing.
  Added state to CertificateProvisioning.
2025-04-25 15:03:28 -07:00
Alex Dale
207edd9b79 Use std::move for key strings.
[ Cherry-pick of v19 http://go/wvgerrit/219351 ]
[ Merge of http://go/wvgerrit/219455 ]

Coverity discovered an oppertunity to use the C++'s move semantics
for the prov 4.0 keys.  A similar possibility was available for the
matching wrapped key.  The CryptoWrappedKey class was updated to
enable moving of the wrapped key as well.

Bug: 406539167
Bug: 391469176
Change-Id: I7d76013638c220fc81d6d9c42add2516abd7374a
2025-04-21 17:09:25 -07:00
Alex Dale
a2cdce4296 Changed Prov4.0 handler to accept only recent requests.
[ Cherry-pick of v19 http://go/wvgerrit/219291 ]
[ Merge of http://go/wvgerrit/219432 ]

If the same app/origin generates multiple provisioning 4.0
requests it is possible that a mismatch between the OEM/DRM
certificate and the wrapped OEM/DRM private key occurs.  The CDM
would use the OEM/DRM certificate of the first response one
received, and the wrapped private key of the last request generated.

To avoid this issue, the public key from the most recent request
is cached and checked against the responses received.  If the
keys match, that response is accepted; if the keys don't match
than the response is assumed "stale" and the response is dropped.

In an attempt to maintain existing behavior of the CDM, "stale"
responses will return NO_ERROR to the app.

Note: This was tested using both RSA and ECC cert key types.

VIC-specific: Needed to add implementation of StringContains() and
StringEndsWith().

Bug: 391469176
Test: run_prov40_tests
Change-Id: Id45d40d9af355c46a61c3cc2c19c252cf17c7489
2025-04-21 17:09:13 -07:00
Alex Dale
daf291955f Separate OEM unprovisioning from DRM unprovisioing.
[ Cherry-pick of v19 http://go/wvgerrit/219330 ]
[ Merge of http://go/wvgerrit/219454 ]

For two-staged provisioning devices, the behavior of
CdmEngine::Unprovision() varied by platform and context.
For production Android, unprovisioning would remove both;
for production and testing CE CDM it would only remove
DRM provisioning; for testing Android may remove both or
remove everything (both certs and licenses).

This behavior was not documented, making use of the
CdmEngine::Unprovision() API rather unpredictable.

This change attempts to document the unpredictable behavior
and add a way to explicitly remove the OEM certificate
in the core code.

The new CdmEngine::UnprovisionOemCert() will remove only
the OEM certificate.

Bug: 391469176
Test: run_x86_64_tests
Test: WvTs on oriole
Change-Id: Ib2f6ef61f45b5320c71d7e8e8460f7fe8e0e2248
2025-04-21 17:08:49 -07:00
Alex Dale
b0fa978058 Added state to CertificateProvisioning.
[ Cherry-pick of v19 http://go/wvgerrit/219310 ]
[ Merge of http://go/wvgerrit/219453 ]

To enable the CDM to determine between OEM vs DRM responses,
a state variable was needed in CertificateProvisioning.
Previously, the presence/absence of the OEM certificate in the
file system was used; however, if two apps (or single app with
multiple origins) attempts provisioning simultaneously, the
later response would trigger unexpected failures.

The main functional changes this provides is that a more informative
error will be returned to the app if they provide a provisioning
response without ever creating a provisioning request; and that
if multiple clients attempted first-stage provisioning simultaneously,
fewer errors will occur.

Bug: 391469176
Test: run_prov40_tests
Change-Id: I51a118ce73aa809bad6ecee640139a92d8518575
2025-04-21 17:08:24 -07:00
Alex Dale
2a6154617f Change build info short-length to be based on real length.
[ 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
2025-04-21 15:58:05 -07:00
Kyle Zhang
961faf0729 Modify build script
* Run bundletool prebuilt directly instead of build

DISABLE_TOPIC_PROTECTOR
Bug: 406584715
Change-Id: Ibd5661ac65517e0df707c574d9348d4018e4e0e3
(cherry picked from commit ea2ec9498b)
2025-04-18 19:21:52 -07:00
Alex Dale
774c4667fc Allow ProvisioningHolder to return load status.
[ Merge of http://go/wvgerrit/219452 ]

Allow ProvisioningHolder to load the a provisioning response
without triggering test failure if the CDM rejects the response.
This is to allow testing cases where we expect the CDM to
reject the response.

VIC-specific: No specialized provisioning dump call.

Bug: 391469176
Change-Id: Ief1791f23035fe9b554f8e82e049343aa7e97362
2025-04-18 12:44:07 -07:00
Alex Dale
ca7be366df Refactored ProvisioningHolder to separate operations.
[ Merge of http://go/wvgerrit/219451 ]

An upcoming provisioning test requires the ability to perform
generate, fetch and load operations separately (similar to the
current behavior of LicenseHolder).

This CL separates the 3 operations into different methods and
documents the pre/post conditions of each.  The original API
is maintained for backwards compatibility.

VIC-specific: Excludes Golden-data refactoring and merges main
change (216510) and typo fix (216570).

Bug: 391469176
Test: run_x86_64_tests
Change-Id: Iec83dfce9d235eedf04ed32d98f7700de4bade12
2025-04-18 12:43:28 -07:00
Alex Dale
3d5bdaeb77 Retry provisioning and license requests on 502 errors
[ Merge of http://go/wvgerrit/219370 ]

Work around the server problem.

Bug: 345333545
Change-Id: Ie1b0021f545c77d61bb2363494239f4fe000f3d5
2025-04-18 12:39:24 -07:00
Alex Dale
25380c8832 Updated OEMCrypto JSON build information validation test.
[ 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
2025-04-18 12:38:18 -07:00
Alex Dale
53b1b0ebc0 Added OEMCrypto build information validation test.
[ 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
2025-04-18 12:37:53 -07:00
Android Build Coastguard Worker
2f670f2360 Make change and version bump to AV1A.250207.001
Snap for 13017644 from 21b6b18cd4 to vic-widevine-partner-release

Change-Id: I88ade84a011d577e5be433c5e76958b734a61c71
2025-02-07 11:02:00 -08:00
Alex Dale
21b6b18cd4 Merge "Ignore certain errors on RemoveOfflineLicense()." into vic-widevine-dev 2025-02-05 13:12:15 -08:00
Rahul Frias
1344dbb254 Merge "Workaround for single IPC connection" into vic-widevine-dev 2025-01-27 15:22:34 -08:00
Cong Lin
d8b51a0405 Allow key_session to be equal to oec_session when removing entitled key session
In some rare cases when |oec_session| was already closed, |key_session|
with the same session id will not exist any longer. This is a fix to
allow such case to not return an error.

Test: run opk tests
Bug: 343093320
Change-Id: I3218145ee8c1047a5cc756560e448b178c2c7a93
2025-01-24 19:27:50 +00:00
Rahul Frias
ead47285c6 Workaround for single IPC connection
The widevine service is restarted before tests are run as
unit tests are unable to connect to trusty. It then falls back
and runs the tests in L3 mode. Fix will be addressed in b/380710738

Bug: 339917270
Test: wv unit/integration tests
Change-Id: Idd4de73a9667cd360101f50a474a26ba8e73973b
2025-01-24 01:21:40 -08:00
Alex Dale
d5dae99c48 Merge "Trim trailing zeros from build information." into vic-widevine-dev 2025-01-14 14:25:49 -08:00
Jooyung Han
419171a8a6 Remove file_contexts workaround
Bug: 268439003
Merged-In: I9f621f9f6b9f2c67acb556829b7e0894cfadd1c3
Change-Id: I9f621f9f6b9f2c67acb556829b7e0894cfadd1c3
Test: m
(cherry picked from commit c0979a4c872148ccb04142d1741e160600ee1b6b)
2025-01-10 16:36:20 -08:00
Alex Dale
04a70543ea Trim trailing zeros from build information.
[ Cherry-pick of http://go/wvgerrit/212250 ]

Certain OEMCrypto implementations are returning build info with
trailing C-string null bytes; others are returning all null bytes.

This change attempts to trim any trailing zeros.  For build info
with a single trailing zero, this should fix the format; for those
containing all zeros, this will indicate a failure on OEMCrypto's part
for returning all zeros.  The CDM will not prevent request generation,
but will omit the result in the ClientIdentification.  The server
will decide whether to provide a response or not.

Bug: 348497732
Bug: 348498112
Bug: 366819137
Change-Id: I281ab14e0e46116825321a7965d971b9d68c49fc
(cherry picked from commit 7c81f7bed4fec8199f7fbdb5e95452eacdf3b3c7)
2025-01-08 11:19:42 -08:00
Alex Dale
5194959c8c Ignore certain errors on RemoveOfflineLicense().
[ Merge of http://go/wvgerrit/210652 ]

The CDM API RemoveOfflineLicense() is used to remove an offline
license by key set ID.  From the app's perspective, removing the
offline license should not depend on an app to be provisioned, or
the license being loadable.  However, internally, the CDM attempts
to restore the license to lock out its usage entry.

An issue arises when the license is not able to be restored, which
will cause errors related to the restoration to be returned to the
app.  The license is still deleted in case of errors, but certain
partners have experienced GTS failures when using the MediaDRM API
removeOfflineLicense().

This change attempts to catch some of the common errors, but not all.
If certain errors are encountered during the restoration process, the
are not returned to the app.

Additional error cases may be added later, depending on vendor
feedback.

Bug: 319055420
Bug: 357863269
Bug: 370195605
Bug: 288118860
Bug: 302049654
Bug: 346845333
Bug: 312595506
Bug: 345232142
Bug: 303261245
Bug: 287735498
Bug: 372105842
Test: WVTS on Oriole
Change-Id: I020bbea30e5f6e0ae2777d8a1d4858c4f2af107b
2024-11-21 14:41:46 -08:00
Alex Dale
39c12039cb Patch Android FileSystem::List for non-existing directory.
[ Merge of http://go/wvgerrit/210651 ]

The Android FileSystem implementation for List() would return an error
if the directory does not exist.  This creates an issue for the case
where the CDM attempts to list offline licenses after clearing all
data.  This typically won't effect a regular user, it causes
integration tests which re-provision to fail.

Bug: 372105842
Test: file_store_unittest on Oriole
Change-Id: I121b52ab95e36249ae5b196e987bc950a278131f
2024-11-21 14:41:20 -08:00
Android Build Coastguard Worker
8aba94587c Make change and version bump to AV1A.241121.001
Snap for 12682005 from ae80e87d0e to vic-widevine-partner-release

Change-Id: I019144c82fea32056698f4c38445bc5d3c802373
2024-11-21 09:15:59 +00:00
Kyle Zhang
ae80e87d0e Add missing OEMCrypto metrics to WVDRM metrics adapter.
1. oemcrypto_prep_and_sign_provisioning_request_time_us
2. oemcrypto_prep_and_sign_license_request_time_us
3. oemcrypto_prep_and_sign_renewal_request_time_us
4. oemcrypto_load_license_time_us

Bug: 379352348
Change-Id: Ieb299b82f5dfa4b9b84e9261c05decd073736528
2024-11-19 22:41:41 +00:00
Treehugger Robot
e63b07e850 Merge "Fix key type used in InstallOemPrivateKeyCanBeUsed test" into vic-widevine-dev 2024-11-19 19:05:06 +00:00
Android Build Coastguard Worker
49184d157e Make change and version bump to AV1A.241114.001
Snap for 12646154 from b03dfadfc4 to vic-widevine-partner-release

Change-Id: I15a61e52492c490f3f3dfac8dd914819b4c4ec16
2024-11-14 09:20:42 +00:00