Commit Graph

344 Commits

Author SHA1 Message Date
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
Alex Dale
f1da7b637d removeOfflineLicense() respects plugin security level.
[ Merge of http://go/wvgerrit/208470 ]

The MediaDrm plugin API removeOfflineLicense() would check both
L1 and L3 for the offline license.  While this is generally acceptable,
apps might force set L3 via the setStringProperty(), which should
cause the DRM plugin to behave as if it is L3 only.

This change will cause the WVDrmPlugin only remove L3 key set IDs while
in L3 mode.  L1 key set IDs in this case will be treated as non-existing.

Bug: 357863269
Bug: 372105842
Test: DRM Compliance ATP via ABTD
Test: libwvdrmdrmplugin_hal_test on Oriole
Change-Id: I81dddbacaee28da6c0a94527b0e390e86f55f81f
(cherry picked from commit 0aa6aad1af)
2024-10-12 00:02:46 +00:00
Alex Dale
71fce8f352 getOfflineLicenseKeySetIds() respects plugin security level.
[ Merge of http://go/wvgerrit/208430 ]

The MediaDrm plugin API getOfflineLicenseKeySetIds() was listing
both L1 and L3 offline licenses.  While this is generally acceptable,
apps might force set L3 via the setStringProperty(), which should
cause the DRM plugin to behave as if it is L3 only.

This change will cause the WVDrmPlugin list L3 only if the app had
set the security level to L3.

Bug: 357863269
Bug: 372105842
Test: DRM Compliance ATP via ABTD
Test: libwvdrmdrmplugin_hal_test on Oriole
Change-Id: I1a6e10b7eb880eef4ba36ed31b12ebfe8617f002
(cherry picked from commit 26b888b094)
2024-10-12 00:02:06 +00:00
Cong Lin
d92d3a884d Add "bootCertificateChainSignature" to Drm plugin getPropertyByteArray()
This allows Widevine RKP HAL to query BCC signature via DRM interface
during BCC extraction for remote provisioning phase 3. The query returns
the "additional_signature" field from
OEMCrypto_GetBootCertificateChain().

Test: Manual BCC extraction on Pixel 9
Bug: 355160637
Change-Id: I1a310a80c0cfef82ee3697f06c1293d5c1c3896a
2024-10-02 00:43:54 +00:00
Fred Gylys-Colwell
b0bf7187f0 Clang format long line
Error not found in go/wvgerrit/199931

Change-Id: I58806276ab0a710444f6632d4c824607b8ebd17c
2024-08-23 23:26:37 -07:00
Robert Shih
0880898d99 Allow system user csr access
Bug: 296971609
Test: Oppo rkp_factory_extraction_tool
Change-Id: I0e51bc52cc269e69fb3d3f056dfa7fbaa414e6a5
2024-05-31 10:22:22 -07:00
Rahul Frias
d926fb31ec Address missing dependencies or executables
[ Merge of http://go/wvgerrit/195850 ]

Since Widevine device builds now include APEX prebuilts,
shared library dependencies for the prebuilts are in
are in /apex/com.google.android.widevine/lib[64] rather
than /system/lib[64] or /vendor/lib[64]. When tests are
run not all the dependencies are present.

These changes include
* Statically linking missing dependencies
* Adding /apex/com.google.android.widevine/lib[64] to
  the shared library path
* Searching for some of the test executables in
  /data/nativetest[64]/vendor/

Bug: 329888778
Bug: 329891889
Bug: 329891175
Bug: 329891049

Test: ./build_and_run_all_unit_tests.sh
Change-Id: I067685cedc7701c4e6502bdac98b53e22b61ad1e
2024-05-10 18:17:10 -07:00
Alex Dale
67393a2cb6 Update support for HDCP levels on Android and CE CDM.
[ Merge of http://go/wvgerrit/194050 ]

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-13 23:02:26 -07:00
Rahul Frias
54162b07c5 Add feature flag to change the CDM version to 18.0.2
[ Merge of http://go/wvgerrit/191139 ]

Adding an initial flag that include identifiable differences when
the feature is enabled or disabled.

This is the same commit as ag/25837302. It was reverted due to
memory size issues. A follow on CL will address that issue to
ease review.

Bug: 311951236
Test: WVTS tests
Change-Id: I995fb8f4158b3529c2d19a2ee5fd8beec0019f7c
2024-02-15 10:11:44 -08:00
Ronish Kalia
d0f454d91c [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I204c137da43a021bcebe316759d1aadaec99fe2a
2024-02-14 14:19:08 +00:00
Rahul Frias
e92b739407 Revert "Add feature flag to change the CDM version to 18.0.2"
This reverts commit 10f6252e4d.

Reason for revert: Increase in memory size for android.hardware.drm-service.widevine

Bug: 324438957
Change-Id: I39c9ca1ebc1da6b9997f63082530fc258974c5ec
2024-02-12 08:39:23 +00:00
Rahul Frias
10f6252e4d Add feature flag to change the CDM version to 18.0.2
[ Merge of http://go/wvgerrit/191139 ]

Adding an initial flag that include identifiable differences when
the feature is enabled or disabled.

Bug: 311951236
Test: WVTS tests
Change-Id: I57a8e05d3b7c0cb6b43cbef022b436330985fe11
2024-02-07 21:33:22 -08:00
Alex Dale
57d231db1b Check if license exists before calling remove.
[ Partial cherry-pick of http://go/wvgerrit/186230 ]

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 bluejay
Merged from https://widevine-internal-review.googlesource.com/187611

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

Change-Id: I3d3975f945d2e97cfa9d866baf6ca5cf901f8af5
2024-02-01 13:40:53 -08:00
Alex Dale
1183ae813f Filter out key set IDs based on ATSC mode.
[ Partial cherry-pick of http://go/wvgerrit/185854 ]

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
Merged from https://widevine-internal-review.googlesource.com/187610

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

Change-Id: Id1508571ebb5c466f43bca99a2d79dc402a2134f
2024-02-01 13:40:53 -08:00
Cong Lin
6327211db6 WVDrmPlugin changes to query device CSR payload for prov 4
Plugin to provide getPropertyByteArray("deviceSignedCsrPayload")
which returns the signed CSR payload for device registration. It
queries both BCC and device info to be set in plugin before calling this
getPropertyByteArray("deviceSignedCsrPayload") method. The returned csr
payload will be used by assemble the device CSR by the caller for device
registration.

Bug: 286556950
Test: build WV DRM plugin
Merged from https://widevine-internal-review.googlesource.com/178891

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

Change-Id: I65d89ed998dd292fc656af2f91f4472c1b5ec33c
2024-02-01 13:40:52 -08: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
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
Robert Shih
d655ffbfe7 WVDrmPlugin: expose processorWidth
[ Merge of go/wvgerrit/c/cdm/+/177750 ]

Bug: 287093494
Test: MediaDrmParameterizedTests#testDrmPropertyStrings
Change-Id: I6d616deb69e6313c031bb3294ec3fcf62cabbacb
2023-06-29 08:22:26 +00:00
Alex Dale
628d1ac38c DRM Pluging uses CDM core's generic crypto API.
[ Merge of http://go/wvgerrit/173170 ]

This CL updates the Widevine's Android DRM plugin to use the generic
crypto operations provided by CDM core rather than its own
implementation.

Bug: 274984456
Test: atest WvtsDeviceTestCases
Change-Id: I94e1c92c7da577aad5ec43bd3bf0bb380b607b80
2023-05-02 16:51:23 -07:00
Alex Dale
c42627a23e Added metrics history for WV CDM for Android.
[ Merge of http://go/wvgerrit/171271 ]

There is a need to maintain a short history of metrics from CDMs which
have been deleted.  This CL adds this ability to the Android version
of the WV CDM.  The history cannot yet be maintained for long, as the
WV CDM instance is destroyed if unused.

Further changes are required to the plugin to maintain the history
beyond the life-cycle of the CDM instance, and to properly format
its output.

Bug: 239462891
Bug: 270166158
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m
Test: atest GtsMediaTestCases
Change-Id: I81c0996602722a9795fc3951030d20bb39b5816b
2023-04-27 14:54:17 -07:00
Robert Shih
d258acb879 Return apex name for PROPERTY_VENDOR
[ Merge of go/wvgerrit/c/cdm/+/170370 ]

Bug: 277620071
Test: WidevineHalTest
Change-Id: I05385358875723e20b13d3abb21a0deee9f35c29
2023-04-12 15:36:38 -07:00
Alex Dale
e928670c85 Android CDM: Restored secure stop tests.
[ Semi-revert of http://ag/20183443 ]
[ Merge of http://go/wvgerrit/168898 ]

These tests were removed from Android last quarter; however, they
now need to be restored.  These tests will be removed in Android V.

To help with ambiguity around where the CDM is operating on a single
or set of usage info messages, the variables have been renamed to
propery indicate plurality.

Bug: 263319220
Test: cdm_extended_duration_test
Test: request_license_test
Test: libwvdrmdrmplugin_hal_test
Change-Id: I38b16dd5811069fafaeab5ffc19d0f8a8095f0cf
2023-03-28 21:26:06 -07:00
Jooyung Han
a4de7eb9b5 Set min_sdk_version for the Widevine APEX
also remove `use_vndk_as_stable: true` to remove dependency to VNDK
libs.

Bug: 251299786
Test: build WV APEX with V and install it on U device
Change-Id: Ie7f7f9b699119478d4b33f95ab9e6ba7f459346c
2023-03-28 06:57:46 +00:00
Bob Badour
080bfc7414 Merge "Cleanup vendor projects are proprietary." into tm-qpr-dev-plus-aosp am: cbb6177df2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21276850

Change-Id: I7ba871f7714ba4eb5dcb5b0571b6024533a25217
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-05 03:54:39 +00:00
Bob Badour
6f047790e0 Cleanup vendor projects are proprietary.
Test: m droid dist
Change-Id: I0bdec38c4d12710fa97b91665d211ba6c0d4b24d
2023-02-03 14:37:11 -08:00
Edwin Wong
94f86b717c Fixed race condition in closeSession
Merged from http://go/wvgerrit/164799

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

Test: poc
Test: atest MediaDrmParameterizedTests
Test: atest GtsMediaTestCases

Bug: 258189255
Change-Id: I298d3e0770ace9cd590dfaacaa4c52a0732c2fe3
2023-01-18 20:04:44 +00:00
Rahul Frias
1e15b36b1a Support ATSC license installation
[ Merge of http://go/wvgerrit/163900/ ]

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

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

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

Bug: 176871821
Test: WV Unit/integration/Luci tests
Test: libwvdrmdrmplugin_hal_test
Test: GtsMediaTestCases
Change-Id: Iec2a8b7f87b1122395d06856202278b92316fdfe
2022-12-21 11:56:18 -08:00
Kyle Zhang
11255b7426 Pick widevine oemcrypto-v18 change
No-Typo-Check: From a third party header file
Bug: 260918793
Test: unit tests
Test: atp v2/widevine-eng/drm_compliance
Change-Id: I36effd6a10a99bdb2399ab1f4a0fad026d607c70
2022-12-21 00:03:50 +00:00
Robert Shih
1fdbd3cd2c aidl plugin: add error details to return status
Merged from http://go/wvgerrit/163639

Bug: 253271674
Test: Google TV
Test: atest MediaDrmParameterizedTests
Test: atest DrmSessionManagerTest
Change-Id: I9f0e83774d405466a389d2fd90d693830682dde4
2022-12-15 14:50:56 +00:00
TreeHugger Robot
adf20ed758 Merge "Dump error_detail in dumpsys" 2022-12-13 01:32:30 +00:00
Robert Shih
096b0eda5a Squashed merge 3 CLs.
1. "Change CdmResponseType from enum into a struct"
Merged from http://go/wvgerrit/163199
Bug: 253271674

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

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

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

Bug: 253271674
Change-Id: I70c950acce070609ee0343920ec68e66b058bc23
2022-12-08 21:08:14 +00:00
Edwin Wong
927053d6e8 Dump error_detail in dumpsys
Merged from http://go/wvgerrit/162420

Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine

Bug: 260241061
Change-Id: I28b06b201c3408d85f6ca944534ad9602bc60a85
2022-11-27 18:17:50 +00:00
Edwin Wong
6d3457b9d9 Remove hidl support.
Merged from http://go/wvgerrit/161857

Test: streaming(Netflix, Play Movies & TV)
Test: ./build_and_run_all_unit_tests.sh
Test: adb shell ps | grep drm
Test: metrics_dump
Test: hardware/interfaces/drm/aidl/vts$ atest VtsAidlHalDrmTargetTest

Bug: 259299992
Change-Id: I76bcc82bbfb3fc60987b66265a580946a16c341d
2022-11-22 19:03:30 +00:00
Alex Dale
d027236719 Android CDM: Removed secure stop tests.
[ Merge of http://go/wvgerrit/158720 ]

Support for secure stop licenses have been dropped.  The MediaDRM
APIs have already documented their deprecation.  Before support can
be removed from the plugin and CDM core implementation, the tests
associated with them must be removed.

This CL removes secure stop tests from the Android CDM integration
test `request_license_test` and from the MediaDRM plugin test
`libwvdrmdrmplugin_hal_test` and `libwvdrmdrmplugin_hidl_test`.

Bug: 242289743
Test: libwvdrmdrmplugin_hal_test request_license_test
Change-Id: Idb7ee53ab8115ce9b9a173eaf0a00f54325863a2
2022-10-14 12:57:49 -07:00
Edwin Wong
e176b20509 Rename aidl_ include and src directories.
Test: unit tests
Test: Google TV and Netflix
Test: atest GtsMediaTestCases

Bug: 216527109
Change-Id: I3fd02c2c60da588dba3db27cea3593de25a7180f
2022-09-05 21:08:25 +00:00
Edwin Wong
6797b8eb8a Call AIBinder_setRequestingSid from createBinder override function
AIBinder_setRequestingSid must be called first upon creation of a
binder object before AIBinder_getCallingSid is called. Call
AIBinder_setRequestingSid in the createBinder override function
for WVDrmFactory, WVDrmPlugin and WVCryptoPlugin classes.

Test: Play TV streaming
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -a

Bug: 237613676
Change-Id: I9dde4715ba2003deb463bd75b23e1ebc2f22a764
2022-08-11 21:49:50 +00:00
Edwin Wong
a285b363d9 Fuzz Widevine AIDL drmFactory binder interface.
[Merged from http://go/wvgerrit/152150 ]

Test: build and run test

Bug: 226948319
Change-Id: I717d119cbf455fe76e4bb1f818d00141f4e7fa7c
2022-06-26 05:49:03 +00:00
Edwin Wong
83a72425bf Add missing properties in query test.
[Merged from: http://go/wvgerrit/153549]

Test: adb shell LD_LIBRARY_PATH=/vendor/lib64 /data/nativetest/libwvdrmdrmplugin_hal_test
Bug: 235885663
Change-Id: Ie2885d4f2a54d0bb7c58ed4657a3d7b7c779b0da
2022-06-15 23:59:33 +00:00
Edwin Wong
8651e9a47c Declare class for drmFactory, crypto/drmPlugins
[ Merged from http://go/wvgerrit/152493 ]

Replace struct with class for WVDrmFactory, WVCryptoPlugin
and WVDrmPlugin.

Also fix build_all_unit_tests.sh, hidl_metrics_adapter_unittest
has been renamed to hal_metrics_adapter_unittest.

Test: unit tests
Test: Google TV and Netflix
Test: atest GtsMediaTestCases

Bug: 216717460
Change-Id: I92b15510267e8f37058845be760a6ec6241bc5d7
2022-05-30 15:30:23 +00:00
Rahul Frias
cd593979e9 Allow provisioning model to be queried
[ Merge of http://go/wvgerrit/152674 ]

This allows an app to query the provisioning model. Possible
values are { "DrmCertificate", "Keybox", "OEMCertificate",
"BootCertificateChain" }

An app can use these to disntinguish between provisioning models.
Provisioning 4.0 (boot certificate chain) requires a double provisioning
step.

Bug: 234057551
Test: WV unit/integration tests, libwvdrmdrmplugin_hal_test
Change-Id: I1611488ec632a0e5a9e1d106b7475e8f5a2a5a13
2022-05-26 16:22:16 -07:00
Edwin Wong
cf3771e54a Add hal_metrics_adapter_unittest for AIDL service.
[ Merged from http://go/wvgerrit/151750 ]

Test: m hal_metrics_adapter_unittest -j128
Test: m hal_metrics_adapter_unittest  WV_UNITTESTS_BUILD_TARGET=hidl -j128
Test: adb push $(OUT)/data/nativetest/hal_metrics_adapter_unittest  /data/nativetest/.
Test: adb shell  LD_LIBRARY_PATH=/vendor/lib64 /data/nativetest/hal_metrics_adapter_unittest

Bug: 217247987
Change-Id: I0c890d2fab754bf993632659293a0272c863b11f
2022-05-11 22:01:35 +00:00
Edwin
5202862e9a Add libwvdrmdrmplugin_hal_test for AIDL service
[ Merged from http://go/wvgerrit/150769 ]

- remove OpenSessions_1_1, only applies to hidl
- move plugin and mCdm creation in SetUp() test fixture
- reset plugin and mCdm smart pointers in TearDown
- reduce code duplication
- remove MockDrmPluginListener, send*Event has gone private

Test: m libwvdrmdrmplugin_hal_test -j128
Test: m libwvdrmdrmplugin_hal_test WV_UNITTESTS_BUILD_TARGET=hidl -j128
Test: adb push $(OUT)/data/nativetest/libwvdrmdrmplugin_hal_test /data/nativetest/.
Test: adb shell LD_LIBRARY_PATH=/vendor/lib64 /data/nativetest/libwvdrmdrmplugin_hal_test

Bug: 217247987
Change-Id: I8bc0a390a88facbc890cf26872fd089afe87850a
2022-05-11 05:36:40 +00:00
Alex Dale
cd5afa88a6 Added CDM support for production readiness reporting.
[ Merge of http://go/wvgerrit/151518 ]

Extended the CDM layer to report OEMCrypto's production readiness
via string property query.

If OEMCrypto implementents OEMCrypto_ProductionReady(), then the
reported readiness by the CDM will report "True" or "False".

If OEMCrypto does not implement OEMCrypto_ProductionReady() then no
level of readiness is assumed, and the CDM will report "Unknown".

Bug: 231655151
Test: run_prov30_tests and request_license_test
Change-Id: I6afe481ef00ac129d02b004eca89a65810bfbff8
2022-05-10 13:35:43 -07:00
Edwin Wong
af5f57a46c Only use libbinder_ndk for aidl service.
[ Merged from http://go/wvgerrit/151169 ]

Test: Netflix and Google TV streaming and downloaded playback
Test: unit tests
Test: atest VtsAidlHalDrmTargetTest
Test: adb shell readelf -d /vendor/bin/hw/android.hardware.drm-service.widevine
Test: adb shell readelf -d /vendor/lib64/libwvaidl.so

Bug: 230791937
Change-Id: Ia60d9fc838bf228b40d99b076a837ae789fa2d03
2022-05-05 15:12:55 +00:00
Alex Dale
cc35c64757 Specify DRM certificate duration in tests.
[ Merge of http://go/wvgerrit/150350 ]

Certain integration tests were depending on the provisioning server
only sending short duration (~2 minute) certificates when testing
the CDM's ability to enforce expiration periods.  This behavior of
the server was not reliable, resulting in device test failures from
server behavior changes.

The DRM certificate provisioning server allows the requester to
optionally provide a desired certificate duration in the request
URL.  The tests which test the CDM's ability to enforce certificate
durations will now explicitly specify the certificate duration
required by the test.

Bug: 228547158
Test: request_license_test
Change-Id: Ib9ebfdba1451104be0e59baca0b2f23a94cd51e6
2022-04-15 20:14:51 -07:00
Alex Dale
97f3544866 Added CDM support for Watermarking reporting.
[ Merge of http://go/wvgerrit/148552 ]

Extended the CDM layer to report OEMCrypto's watermarking support.
The reporting of watermarking comes in three (3) mechanisms:
1) ClientCapabilities in license requests
2) CryptoSession metrics when queried to OEMCrypto
3) String property query by apps

If OEMCrypto implementents OEMCrypto_GetWatermarkingSupport(), then
the reported watermarking support by the CDM will match that of
OEMCrypto.

If OEMCrypto does not implement OEMCrypto_GetWatermarkingSupport()
or an error occurs, it is assumed that OEMCrypto does not support
watermarking, and the CDM will report "Not Supported".

Bug: 226443788
Test: run_x86_64_tests request_license_test and license_unittest
Change-Id: Id929a356c395e6bcf45d371ee6887eec40d35329
2022-04-01 14:24:44 -07:00
Edwin Wong
0f3c297250 Replace _hidl_ with _hal_ in test names
[ Merged from http://go/wvgerrit/148451 ]

This step is a prelude in adding Widevine unit tests that
use AIDL interface.

Test: ./build_and_run_all_unit_tests.sh
Bug: 217247987
Change-Id: I449050819e6c9b0261066997dd45a6103b3a9a7a
2022-03-23 07:16:27 -07:00
Robert Shih
7b3a37fa2f Merge "Update cipher mode enumeration in AIDL WvDrmPlugin" into tm-dev 2022-02-22 20:22:11 +00:00
Robert Shih
0684df3b6c Update cipher mode enumeration in AIDL WvDrmPlugin
To match the v17 change.

[ Merge of go/wvgerrit/146231 ]

Bug: 216585596
Test: atset WidevineGenericOpsTests
Change-Id: I7eb25a5db30a82cf8015e3c19af419c02a1d5002
Merged-In: I7eb25a5db30a82cf8015e3c19af419c02a1d5002
2022-02-20 16:04:11 +00:00
Robert Shih
ea1d5d6891 wv aidl: no set security level opening default session
Bug: 219538389
Test: atest WidevineDashPolicyTests#testL3ValidateKeyOutputProtection
Change-Id: I5912a93fd0b7a144694ec3b251a129d839b8b149
2022-02-20 16:02:24 +00:00