Commit Graph

1786 Commits

Author SHA1 Message Date
Rahul Frias
915efa9894 Sync license_protocol.proto
[ Merge of http://go/wvgerrit/159982 ]

Add in TimerDelayBase, initial_renewal_delay_base, client version
and DTCPUsageRules.

Bug: 256038127
Test: WV unit/integration tests
Change-Id: I0ea7490ff2663a3df15d150836b06277f14eaa0f
2022-12-13 23:53:14 -08:00
Robert Shih
2384efde1e New CdmResponseType fields: oec_result & crypto_session_method
[ Merge of go/wvgerrit/163437 ]

Bug: 253271674
Test: cdm unit tests
Change-Id: I064e28af593e4a55c13d03115bb5181a879a1ed4
2022-12-12 19:06:59 -08: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
Alex Dale
ac9641ae13 Merge "Revert "Core CDM: Removed secure stop support."" 2022-12-05 22:05:07 +00:00
Alex Dale
16a4c2690a Revert "Core CDM: Removed secure stop support."
This reverts commit b039f31b27.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: I8cd6014b4e2de93b3c574d407d6c8885863fed4f
2022-12-03 00:46:22 +00:00
Alex Dale
cd51e53a98 Merge "Revert "Core CDM: Retrieving USAGE_INFO triggers clean-up."" 2022-12-03 00:32:27 +00:00
Alex Dale
d62d71189e Revert "Core CDM: Retrieving USAGE_INFO triggers clean-up."
This reverts commit da9ba6c3ba.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: Ia9ee53b4a897b4b52551c665e8551233abee6b6b
2022-12-02 22:48:05 +00:00
Alex Dale
f4ca978229 Merge "Revert "Core CDM: Remove secure stop from LRU algorithm."" 2022-12-02 22:41:06 +00:00
Alex Dale
0c353d6851 Revert "Core CDM: Remove secure stop from LRU algorithm."
This reverts commit 7a34c1748c.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: I63a730a6e5fa16d0d2425d216fd7f0fff8c09a4c
2022-12-01 23:50:05 +00:00
Alex Dale
8bfd31402b Merge "Revert "Core CDM: Removed ability to add secure stop entry."" 2022-12-01 23:47:43 +00:00
Alex Dale
40181d5ea7 Revert "Core CDM: Removed ability to add secure stop entry."
This reverts commit afcadcc793.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: Ibf018322d65af9a2a7808b81823907f3226f1950
2022-12-01 03:36:42 +00:00
Alex Dale
672f7aee80 Merge "Revert "Core CDM: Remove usage info API from DeviceFiles."" 2022-12-01 03:34:24 +00:00
Alex Dale
3012cd1ee6 Revert "Core CDM: Remove usage info API from DeviceFiles."
This reverts commit 244e6301bd.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: I00a6e223dfabd85a5f12a224dfea6456a24a1770
2022-11-30 23:58:52 +00:00
Alex Dale
5ffa2885c9 Merge "Revert "Core CDM: Do not store/retrieve USAGE_INFO entries."" 2022-11-30 23:51:37 +00:00
Alex Dale
5ebe8eddeb Revert "Core CDM: Do not store/retrieve USAGE_INFO entries."
This reverts commit 982ddb042d.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: I06fd9a79c2013a7dc523ffd06180c3ff36ab7d34
2022-11-30 01:47:13 +00:00
Alex Dale
ba42d5edf5 Merge "Revert "Core CDM: Remove usage info as a run-time type."" 2022-11-30 01:46:17 +00:00
Alex Dale
1ea92c34c8 Revert "Core CDM: Remove usage info as a run-time type."
This reverts commit 5dd2b07286.

Reason for revert: Feature rejected by Android

Bug: 242289743
Change-Id: I8dc95139d113ad1d44acd2e8dd6cbda604b6c073
2022-11-30 00:29:14 +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
John "Juce" Bruce
ff73463d0b Add String Formatting Util
(Merged from http://go/wvgerrit/160042.)

Since we don't have access to std::format yet, this patch adds a
function to wvutil to format text into a std::string.

Bug: 255466913
Test: x86-64
Test: raven
Change-Id: I28043da76af5b4772a29fa7e7241343caf9b54a1
2022-11-15 05:24:19 +00:00
Edwin Wong
a3e67a9104 Merge "Update CdmResponseTypeToString" 2022-11-13 01:21:12 +00:00
Edwin Wong
959c16a0fe Update CdmResponseTypeToString
Merged from http://go/wvgerrit/160797

Changed CdmResponseTypeToString param from int to CdmResponseType as per sigquit@ review comment in http://go/wvgerrit/160638.

Reorder the switch statements in CdmResponseTypeToString to follow the order in the enum declarations instead of sorting alphabetically. This should make future changes to the enum fields easier.

Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh

Bug: 258438956
Change-Id: I3f316cff5448e8e8078da7868e3c083e6766bfa1
2022-11-10 23:29:57 +00:00
Alex Dale
86aea4f49f Merge "Remove usage info clean up test tear down." 2022-11-10 19:25:44 +00:00
Alex Dale
789b9b675c Merge changes I939e4797,Iefbfe2dd,I002202b4,I09262da0
* changes:
  Core CDM: Remove usage info as a run-time type.
  Core CDM: Do not store/retrieve USAGE_INFO entries.
  Core CDM: Remove usage info API from DeviceFiles.
  Core CDM: Removed ability to add secure stop entry.
2022-11-10 03:03:27 +00:00
Alex Dale
b0bb45876d Remove usage info clean up test tear down.
[ Merge of http://go/wvgerrit/160857 ]

Reboot tests were attempting to clean up usage info records when the
tests were done.  However, usage info are no longer supported.
Unfortunately, the clean up code would trigger a test failure if the
usage info records could not be deleted.

Bug: 258469123
Test: OfflineLicenseTest.VariousTests
Change-Id: I17cebd82da1e45ef53853d35dbe314365a1909be
2022-11-09 14:42:31 -08:00
TreeHugger Robot
a84c7b8ac4 Merge "Address review comment in go/wvgerrit/160480" 2022-11-08 23:58:23 +00:00
Alex Dale
244e6301bd Core CDM: Remove usage info API from DeviceFiles.
[ Merge of http://go/wvgerrit/159219 ]

Most API functions of DeviceFiles related to usage info files have
been removed.  Storing and retrieving usage info files are no longer
required by the CDM.  The only function remaining are the ones that
enabled detecting and deleting the remaining usage info files on the
device.

Bug: 242289743
Test: run_x86_64_tests and device_files_unittest
Change-Id: I002202b47141121a0e5adac569e47d8b8bb69b1a
2022-11-08 12:16:15 -08:00
Alex Dale
982ddb042d Core CDM: Do not store/retrieve USAGE_INFO entries.
[ Merge of http://go/wvgerrit/159220 ]

Usage entry info elements of type USAGE_INFO are no longer stored by
DeviceFiles.  An earlier CL removed the ability to store USAGE_INFO
entries; but now tests have been updated to exclude USAGE_INFO from
their test data.

A new DeviceFiles tests verifies that USAGE_INFO entries are not
retrieved and that the |has_usage_info_entries| flag is set when
they are encountered when loading pre-usage-info-deprecation
usage table info.

Bug: 242289743
Test: run_x86_64_tests and device_files_unittest
Change-Id: Iefbfe2dd2b0304b4075bfc7c1aeffe3b6ba52624
2022-11-08 12:16:15 -08:00
Alex Dale
5dd2b07286 Core CDM: Remove usage info as a run-time type.
[ Merge of http://go/wvgerrit/159221 ]

This CL modifies how usage entry info is tracked internally by the
CDM at run time.  It removes the different "storage types" that
entries represent (license or usage info), and instead it contains
only the information associated with license types.  The presences
of a key-set-id allows the UsageTableHeader to determine if the
entry slot is currently being used, or if it can be treated as
unoccupied.

By removing this different type, it completely prevents the CDM and
its tests from using "usage-info" type entries.  This required
significant updates to the UsageTableHeader tests.

Additionally, several of the variable names within the usage table
have been simplified and shortened to reflect their new meanings.

Bug: 242289743
Test: run_x86_64_tests and usage_table_header_unittest
Change-Id: I939e479779425550a17a3c9e6c6d1bc6885e493e
2022-11-08 12:16:15 -08:00
Alex Dale
b039f31b27 Core CDM: Removed secure stop support.
[ Merge of http://go/wvgerrit/158721 ]

This CL removes support for secure stop / usage info sessions from the
CDM engine and CDM session.  APIs for related to secure stop
operations will return NOT_IMPLEMENTED_ERROR.

New secure stop licenses will be rejected by the CDM when added.

Bug: 242289743
Test: run_x86_64_tests request_license_test
Change-Id: I30cd47e580d63014e001c903382a28238746f6d4
2022-11-08 12:16:14 -08:00
Alex Dale
da9ba6c3ba Core CDM: Retrieving USAGE_INFO triggers clean-up.
[ Merge of http://go/wvgerrit/158722 ]

The CDM will delete all usage info / secure stop files on the device
when usage table entries labeled as USAGE_INFO are detected when
restoring the usage table.  DeviceFiles no longer transfers the
stored USAGE_INFO entry info into the run-time entry info vector for
the table.

This CL makes only minor changes to test data.  Significant updates
to both device file and usage table header unittests are required to
remove usage info / secure stop run-time resources.

Bug: 242289743
Test: run_x86_64_tests
Change-Id: I2d1fc0d6a4c994bc10bfce47818f101f95883979
2022-11-08 12:16:14 -08:00
Alex Dale
7a34c1748c Core CDM: Remove secure stop from LRU algorithm.
[ Merge of http://go/wvgerrit/158877 ]

The UsageTableHeader's LRU algorithm for determining which entry to
evict when full uses special considerations based on the type of
entry (offline or secure stop).

This CL removes all secure-stop-specific considerations, and instead
treats secure stop's the same as an unused entry.  Secure stop entries
will always be selected for removal before offline licenses (expired
or not).

Additionally, LRU table upgrading will ignore secure-stop entries.
This has no effect in practice as DeviceFiles will not load secure
stop usage entries when UsageTableHeader is initialized on a real
file system.

Bug: 242289743
Test: run_x86_64_tests and request_license_test
Change-Id: Ib3f71f191aed94aad62951667426911e4e202068
2022-11-08 12:16:14 -08:00
Alex Dale
afcadcc793 Core CDM: Removed ability to add secure stop entry.
[ Merge of http://go/wvgerrit/158872 ]

This CL updates the UsageTableHeader API such that it is no longer
possible to add a "usage info" entry.  All new entries that are added
are assumed to be offline licenses.

Bug: 242289743
Test: run_x86_64_tests and request_license_test
Change-Id: I09262da0e4301356156d1715b0301c616be2251b
2022-11-08 12:16:14 -08:00
Edwin Wong
98439a439a Address review comment in go/wvgerrit/160480
Merged in http://go/wvgerrit/160638

Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh

Bug: 239462891
Change-Id: Ib63abfaf70edec01e2ef5f81678d6bae1462fd65
2022-11-08 03:01:36 +00:00
Alex Dale
f5fbfa6176 Merge changes I9f51e07c,I3f65a6ec
* changes:
  CDM core: Removed support for v15 provisioning responses.
  CDM Core: Removed support for v15 licenses.
2022-11-05 02:11:55 +00:00
TreeHugger Robot
b2d0ab968b Merge "Output metrics in YAML format" 2022-11-04 22:01:14 +00:00
Alex Dale
6b9aa2c12d CDM core: Removed support for v15 provisioning responses.
[ Merge of http://go/wvgerrit/160277 ]

OEMCrypto v15 did not require core messages during DRM certificate
provisioning.  The CDM's certificate provisioning flow was allowing
for either case (with or without core messages) when provisioning.

Now, devices can safely assume that all provsisioning responses will
be v16 or newer; all requests/response must contain a core message.

Bug: 252670759
Test: run_x86_64_tests and request_license_test
Change-Id: I9f51e07caf642eaf646ef40bdd640b3ccfe2533c
2022-11-04 14:50:24 -07:00
Alex Dale
b26126d3aa CDM Core: Removed support for v15 licenses.
[ Merge of http://go/wvgerrit/160000 ]

OEMCrypto v15 licenses made use of several now-obsolete API functions
of OEMCrypto (mainly LoadKeys and RefreshKeys).  All license handled
by the CDM must be v16 or newer.  The CDM can now rely on all license
requests/responses containing a core message, using v16 policy timers,
and requires loading using LoadLicense() / LoadRenewal().

Bug: 252670759
Test: run_x86_64_tests and policy_engine_unittest
Change-Id: I3f65a6ec0326b4c89d1919b8911e065079cb90d2
2022-11-04 14:47:11 -07:00
Edwin Wong
c70e3deb8b Output metrics in YAML format
Merge from http://go/wvgerrit/158917

Use go/yamllint as reference and obfuscate portion of output to
run on an online yaml validator.

Sample output: http://go/cl/481370906

Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh

Bug: 239462891
Change-Id: I1abf1aa50aa25b97b1f6c10995c324d6de04d056
2022-11-03 19:50:27 +00:00
Alex Dale
8451afe58a Merge "Android CDM: Removed secure stop tests." 2022-10-19 21:04:25 +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
Kyle Zhang
af0168dbed Merge cdm changes to android repo
Bug: 251924225
Test: GtsMediaTestCases
Change-Id: I1b4e64c0abf701fe1f5017f14dc72b72c3ea6770
2022-10-11 00:40:42 +00:00
Jeffrey Kardatzke
8f9f25ca35 libwvdrmengine: Change ChromeOS ro.product props to ro.vendor
As of Android T, these need to start with the ro.vendor prefix. We are
doing it now so we can update ChromeOS to be in sync for either version.

Bug: 237492145, 248584954
Test: No properties errors in logcat during playback
Change-Id: Ic6fac64e621be65385d16808dbef52914a66967a
(cherry picked from commit 28a040d407b28d24dd4d5496dd08cfa2f6579d71)
(cherry picked from commit a932781fcc7d2d89d73c546bf244399daf02f5ac)
2022-09-30 18:30:01 +00:00
Jeffrey Kardatzke
ea5825643b Merge "libwvdrmengine: Limit custom property check to ChromeOS" 2022-09-23 21:26:24 +00:00
Alex Dale
84badb3109 Merge "Create custom gtest matcher for similar URLs." 2022-09-21 00:52:32 +00:00
Jeffrey Kardatzke
06c1343153 libwvdrmengine: Limit custom property check to ChromeOS
We added custom properties that are only used on ChromeOS and to avoid
having to bloat the sepolicy for all of Android we are adding a check
here so that we only query the properties on ChromeOS based on the
bertha hardware property.

Bug: b:237492145
Test: Access denied message is gone w/ ExoPlayer
Change-Id: I3a5781ad980dfae2e16501b655386287b5e245b7
(cherry picked from commit 890f71ef367aed683a89892000e40d0e0ca6fbdd)
(cherry picked from commit 4379b0545a2ae866ba9fc315551a5534fa163924)
2022-09-19 16:52:24 +00:00
Kyle Zhang
249404a8df Add widevine vendor apex
Bug: 243699259
Change-Id: Ie1ff0aa9c82f19e0c5412508ac6b67d9083c0cab
2022-09-14 05:31:29 +00:00
TreeHugger Robot
20388e323d Merge "Revert "Add widevine vendor apex"" 2022-09-13 19:35:10 +00:00
Kyle Zhang
eee0d4b88e Revert "Add widevine vendor apex"
Revert submission 19794159-wv-vapex

Reason for revert: Breaking build in branch ndk_translation_all
Reverted Changes:
I48004b8cb:Add widevine apex
Ifa5c1b621:Add widevine vendor apex

Change-Id: I056369265fb341d723b8ff31a0efd7ae3eeec0bb
2022-09-13 18:05:51 +00:00
Kyle Zhang
c68012cd2f Merge "Add widevine vendor apex" 2022-09-13 16:57:54 +00:00
Kyle Zhang
b9c4bfdaf7 Add widevine vendor apex
Bug: 243699259
Change-Id: Ifa5c1b621a9fc0b6d370124fad7de1334c537c65
2022-09-13 01:29:10 +00:00