Commit Graph

1792 Commits

Author SHA1 Message Date
Cong Lin
9651c61e25 Fix session id in dynamic adapter and re-generate L3
Merge of https://widevine-internal-review.googlesource.com/c/cdm/+/173330

Skipping files that are not in android from the CL above.

Original commit message:

Pass the real oemcrypto session id from `pair.session` instead of
`session`, since `session` can be changed when L1 and L3 are running in parallel and `session` in that case may not be the correct oemcrypto session id any more.

Also adding a few missing v18 L3 functions pointers to the dynamic
adapter.

Need to re-generate L3 since the L3 sources changed.

Test: L3 unit tests
Test: GTS dash policy tests and Dexter tests
Bug: 271290471
Bug: 279967915
Change-Id: Idc44d57ca38eb1de24c0038917800e37c25b9afc
2023-05-01 19:25:27 +00:00
Rahul Frias
9d1c9ca76a Add error details when offline license is not found
[ Merge of http://go/wvgerrit/171310 ]

Offline license not found errors are identified by CdmResponseEnum
347 (KEYSET_ID_NOT_FOUND_4). No addition file system information
is shared.

Checks for file existance use the stat command. The stat call can
return error codes from errno.h when the command fails.
These are now converted into sub error codes and returned along with
the offline license file not found error.

This also includes a change to log stat errors other than
ENOENT (no such file or directory) as a warning rather than verbose.

Bug: 276225520
Test: file_store_unittest, file_utils_unittest, GtsMediaTestCases
Change-Id: Ic09d036549582cd65783b49fa96ffefc4bf562c7
2023-04-28 02:38:35 -07:00
Alex Dale
4b267e37f9 Allow metrics history to outlive the Android CDM.
[ Merge of http://go/wvgerrit/172910 ]

The lifecycle of the Android CDM is controlled by Android's strong/
weak pointer functionality.  Unfortunately, it does not provide an
easily predictable point in the code where the CDM is to be deleted
along with the saved metrics.  In order to allow the CDM to keep a
list of metrics that are persistent with the life of the service, a
global thread safe queue is provided which is created when the first
CDM is created, but will out live the CDM.

The metrics will still be deleted when the DRM service is terminated.

Bug: 270166158
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m
Change-Id: Id98676d8b5278798b4de332cc272cd5b85024244
2023-04-27 15:31:39 -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
Cong Lin
5ccb147bb8 Fix spurious wake up in dynamic adapter
The predicate version of wait_for() to avoid spurious wake up by
checking running_ status.

This is a fix to ag/21439870

Test: build widevine
Bug: 272424659
Bug: 271811708
Change-Id: I446fef8f4c8c58bcd47b885dba50643b3e5e1185
2023-04-20 19:16:19 +00:00
Rahul Frias
333fe249e4 Merge "Force a reprovisioning on device renewal" into udc-dev 2023-04-14 05:49:14 +00:00
Alex Dale
de779e7545 Moved OEMCryptoResult string converter.
[ Merge of http://go/wvgerrit/170073 ]

Removed the file "error_string_util.cpp" and its header, moving the
OEMCryptoResult to string converter to "wv_cdm_types.cpp".  This extra
file served little purpose, and created a dependency on the CDM utils
to the CDM itself.

This is part of the effort to fix the formatting of WV metrics; making
enum-to-string conversion uniform throughout the CDM.

Bug: 239462891
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m
Test: Manual testing with Google TV
Change-Id: I4bf95d26b623f5b8fa86bdb2578cbc4ee65125cb
2023-04-11 14:08:30 -07:00
Rahul Frias
d31a4dec56 Force a reprovisioning on device renewal
[ Merge of http://go/wvgerrit/169374 ]

Device renewals used to require that OEMs remove provisioning
certificates as part of the OTA update process. Instead, a change
in system ID is relied upon to indicate a change in root of trust.
If a change in System ID is detected, reprovisioning will be forced.

This is not enabled for ATSC devices or L3 devices. For the latter a
change in system ID may occurs without a change in RoT.

Bug: 258361396
Test: GtsMediaTestCases
Change-Id: I6e8b0b2149fc2ed5362a32bb6e869826f5fa8ef7
2023-04-05 08:30:47 -07:00
Cong Lin
1b5bf5a71a Fix invalid key session id
Merge of https://widevine-internal-review.googlesource.com/c/cdm/+/169871

The default invalid entitled key session id was 0, which in fact could
be a valid value depending on how the key session id is allocated by the
implementation. This can be a possible cause of L3 entitled key session
failure since L3 can recycle a regular oemcrypto session id 0 and
re-assign it to an entitled key session later.

Bug: 264688931
Test: Run GTS media tests

Change-Id: Iae79d08378d61be8a3402f606992765f24298508
2023-04-05 00:34:40 +00:00
Alex Dale
6bddc2e43e Merge "Add mutex to CdmEngine for use of usage_session_." into udc-dev 2023-04-03 06:25:56 +00:00
Alex Dale
e5834cb27d Merge "Added support for additional HDCP levels." into udc-dev 2023-04-01 00:56:04 +00:00
Rahul Frias
adf03c92f4 Address CDM compilation warnings for android
[ Merge of http://go/wvgerrit/169230 ]

Bug: 275675184
Test: Compile and GtsMediaTestCases
Change-Id: I3dc01f383a1fae07c126782e8d3561ab724316a8
2023-03-31 11:46:28 -07:00
Alex Dale
6cbd75bb6c Added support for additional HDCP levels.
[ Merge of http://go/wvgerrit/169450 ]

OEMCrypto v17 introduced several new HDCP levels that OEMCrypto may
report; however, the CDM never updated to support them.  The enum
values of the additional levels are no longer sequential with their
level of support (v1.1 is 7, and v2.1 is 3), this requires more
considerations when comparing the required HDCP levels (as specified
by the license) and current HDCP level supported by OEMCrypto.

The following rules were used:
1) HDCP_NONE is the absolute lowest level
2) HDCP_NO_DIGITAL_OUTPUT is the absolute highest level
3) HDCP_V1 is treated as equal to all V1.x levels
4) All other versions are based on their major-minor pairs

Bug: 269671291
Test: license_unittest
Test: policy_engine_constraints_unittest
Test: policy_engine_unittest
Test: GtsMediaTestCases
Change-Id: Ibecfcb981d7e019c68cb8e0c7286222253d18369
2023-03-30 23:33:25 -07:00
TreeHugger Robot
68e1eac8ec Merge changes I3002f705,If33f0616,Ifb971bf0,If8fc484f,I65a879fb, ... into udc-dev
* changes:
  Filter RSA 3072  tests
  Add MemorySanitizer support for opk_ta tests
  Filter CAS tests
  Refactor missed provisioning and renewal tests
  Use GTEST_SKIP to skip prov40 tests
  Update test updates and known issues to ChangeLog
  Update oemcrypto unit tests version number
  Update CHANGELOG for late-breaking OPK v17.1.1 changes
  Filter Cast Reciver tests
  Document RSA keypair issue on OP-TEE 64-bit
  Use GTEST_SKIP to skip prov 3.0 tests
  Remove V17 backwards-compatibility decrypt functions
  Small changes to refactored unit tests
  Add CHANGELOG entry for OPK v17.1.1
  Refactor usage table tests
  Refactor decrypt unit tests
  Update OPK v18 documentation
  Fix null passed to memcpy in generic verify fuzz
  Update documentation for Cast
  Document lacking signature of Prov 3.0 message
2023-03-31 02:13:24 +00:00
Alex Dale
d66177a257 Add mutex to CdmEngine for use of usage_session_.
[ Merge of http://go/wvgerrit/169430 ]

Bug: 263314813
Test: GtsMediaTestCases
Test: request_license_test
Change-Id: I0859865d26b14d492832001e55897f89853577f1
2023-03-30 13:50:34 -07:00
Alex Dale
9d82b224eb Merge "Android CDM: Restored secure stop tests." into udc-dev 2023-03-30 06:11:58 +00:00
Rahul Frias
98543b50cb Merge changes I44095261,I30829ad7 into udc-dev
* changes:
  Dump BCC on failed provisioning request
  Refresh corpus for oemcrypto fuzz tests with modified format
2023-03-29 23:34:40 +00: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
Kyle Zhang
b5ec1ae108 Merge "Integrate apex version info to Widevine CDM property" into udc-dev 2023-03-28 22:31:45 +00:00
Ian Benz
f2cc88c0f7 Add MemorySanitizer support for opk_ta tests
Merge from Widevine repo of http://go/wvgerrit/169087

- Add opk_ta_msan platform and CI script
- Fix uninitialized memory reads identified by MemorySanitizer

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

Bug: 260089091
Change-Id: If33f061631da92a41b9c507843772f104b76515f
2023-03-28 20:30:22 +00:00
Fred Gylys-Colwell
d7ee89bab0 Filter Cast Reciver tests
Merge from Widevine repo of http://go/wvgerrit/169070

This turns on the cast receiver tests for any device that
claims to support this feature. Previously, we had to
explicitly request these tests on the command line.

But since they do not pass for Prov 4.0, we fitler them out
in this case and reference a bug tracking that work.

We also switch to using GTEST_SKIP to skip the tests instead
of modifying the GTEST_FILTER.

Bug: 251240681
Bug: 269310676
Bug: 259455058
Bug: 259454969
Merged from https://widevine-internal-review.googlesource.com/166497

Change-Id: I1bcd749243a474b3f638547aa43c2805e86731af
2023-03-28 20:30:22 +00:00
Rahul Frias
b3a57e7375 Dump BCC on failed provisioning request
[ Merge of http://go/wvgerrit/168357  and http://go/wvgerrit/168177 ]

When we get an error from the provisioning server while
running a test, we should log extra provisioning
information.

Bug: 273990016
Test: GtsMediaTestCases
Change-Id: I44095261e07ae079c632873f254d8e6879bab8c3
2023-03-28 20:28:57 +00:00
Alex Dale
5ed89d16e2 Merge "Fixed test and log formatting for CdmResponseType." into udc-dev 2023-03-28 19:21:20 +00:00
Kyle Zhang
ce1fb4f089 Integrate apex version info to Widevine CDM property
Bug: 272587114
Test: dumpsys android.hardware.drm.IDrmFactory/widevine -p
Change-Id: Ica99867511391c252b67f40162665380bd2d8740
2023-03-28 18:14:02 +00: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
Alex Dale
52bd76e0e2 Fixed test and log formatting for CdmResponseType.
[ Merge of http://go/wvgerrit/168397 ]

When CdmResponseType (enum) was transformed to CdmResponseType
(struct), the test printers where not updated to print the result
of failed comparisons.  In addition, several logs statements were
updated haphazardly, leaving inconsistencies and potential
compiler-specific behavior.

This CL replaces CdmResponseType std::string operator with a ToString()
method.  This is to make it consistent with Google's C++ style guide
on conversion operators vs methods.  The string conversion function is
now defined in wv_cdm_types.cpp instead of inline in the header file.

The PrintTo function has been implemented along with the other CDM
test printers in test_printers.cpp.

Bug: 273989359
Test: run_x86_64_tests
Test: MediaDrmParameterizedTests on redfin
Test: Forrest drm_compliance
Change-Id: Ibfaa17029046b75b1c8c278f7bd7e04a24379848
2023-03-27 11:21:45 -07:00
Fred Gylys-Colwell
bfa8d39a63 Remove some names
Merge from Widevine repo of http://go/wvgerrit/168657

Some people who have left were still in OWNERS files and TODOs.

Bug: 274772704
Test: comments only
Change-Id: I583da815586e5ca52316b2e238d1c1bb3a5e919a
2023-03-27 02:45:01 +00:00
Alex Dale
ce25b9d44c Avoid null dereference with empty BCC strings.
[ Merge of http://go/wvgerrit/168482 ]

The function OEMCrypto_GetBootCertificateChain() does not always
provide an additional signature depending on the device.  However, the
CDM would still attempt to dereference the first character in the
additional signature buffer when empty.  This CL changes how the data
pointer to an output string is acquired.  Empty string will instead
pass in a null pointer.

Bug: 272643393
Test: run_prov40_tests
Test: atest GtsMediaTestCases
Change-Id: I10b0a3c7df4fc73272aa701bb01c60672645d4fc
(cherry picked from commit a878e7b98d)
2023-03-20 20:29:58 +00:00
Alex Dale
7c213563ca Merge "Add mutex to CdmEngine for use of cert_provisioning_." into udc-dev 2023-03-15 21:34:37 +00:00
Pete Bentley
965a7f308d Include hmac.h in test_base.cpp. am: 4247f72e79
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21985924

Change-Id: I83c97a129c52454782e9d1641ec3fec5c36fb568
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-13 18:31:19 +00:00
Pete Bentley
4247f72e79 Include hmac.h in test_base.cpp.
Cherry-pick note: Compile fix only, needed for latest AOSP BoringSSL in tm-qpr-dev-plus-aosp and downstream branches, e.g. udc-*-dev.

Original change description:
Include what you use - this is no longer pulled in
by the other headers used in this file.

Bug: 272749540
Test: m
Change-Id: I0d4b480e47f84f367d1a9547b89811c52073a2fc
Merged-In: I0d4b480e47f84f367d1a9547b89811c52073a2fc
(cherry picked from commit c785e91ec3)
2023-03-13 10:44:08 +00:00
Alex Dale
6e5ab021d8 Add mutex to CdmEngine for use of cert_provisioning_.
[ Merge of http://go/wvgerrit/167618 ]
[ PoC http://ag/21922303 ]

Bug: 258188673
Test: sts-tradefed run sts-dynamic-develop -m StsHostTestCases \
    -t android.security.sts.Bug_258188673
Test: GtsMediaTestCases
Change-Id: If71a0e7a81f376cf28688a590b6cb9dcea699545
2023-03-09 14:01:40 -08:00
Cong Lin
e8add8eed8 Sync oemcrypto files from cdm udc-dev to Android
Changes included in this CL:

166806: Update OEMCrypto_GetDeviceInformation() | https://widevine-internal-review.googlesource.com/c/cdm/+/166806
166808: Update Android L3 after OEMCrypto_GetDeviceInformation() signature changes | https://widevine-internal-review.googlesource.com/c/cdm/+/166808
166809: Decode device info and write it to CSR payload | https://widevine-internal-review.googlesource.com/c/cdm/+/166809
167158: Fix Android include path and copy_files | https://widevine-internal-review.googlesource.com/c/cdm/+/167158
167159: Fix common typos and use inclusive language suggested by Android linter | https://widevine-internal-review.googlesource.com/c/cdm/+/167159

165618: Explicitly state python3 where needed. | https://widevine-internal-review.googlesource.com/c/cdm/+/165618

166757: Update Android.bp for Android | https://widevine-internal-review.googlesource.com/c/cdm/+/166757
164993: Refactor basic oemcrypto unit tests | https://widevine-internal-review.googlesource.com/c/cdm/+/164993
164978: Update OEMCrypto Unit Test Docs | https://widevine-internal-review.googlesource.com/c/cdm/+/164978
166941: Update make files for OEMCrypto | https://widevine-internal-review.googlesource.com/c/cdm/+/166941

165279: Refactor license unit tests | https://widevine-internal-review.googlesource.com/c/cdm/+/165279
165318: Refactor provisioning unit tests | https://widevine-internal-review.googlesource.com/c/cdm/+/165318
164800: Add extra check for renew on license load unit test | https://widevine-internal-review.googlesource.com/c/cdm/+/164800
165860: Remove duplicate definition of MaybeHex() | https://widevine-internal-review.googlesource.com/c/cdm/+/165860

164889: Updated CoreCommonRequestFromMessage and fix test | https://widevine-internal-review.googlesource.com/c/cdm/+/164889
164967: Add OPK pre-hook and post-hook error codes | https://widevine-internal-review.googlesource.com/c/cdm/+/164967
165140: Add hidden device_id_length to v18 provisioning message | https://widevine-internal-review.googlesource.com/c/cdm/+/165140
165204: Fix memory leak in oemcrypto test | https://widevine-internal-review.googlesource.com/c/cdm/+/165204

165958: Fix oemcrypto_generic_verify_fuzz mutator signature offset | https://widevine-internal-review.googlesource.com/c/cdm/+/165958

166037: Support SHA-256 in OEMCrypto Session Util | https://widevine-internal-review.googlesource.com/c/cdm/+/166037

Test: Run GtsMediaTests on Pixel 7
Bug: 270612144

Change-Id: Iff0820a2de7d043a820470a130af65b0dcadb759
2023-02-28 11:21:05 -08:00
Rahul Frias
3f7ecbc43e Merge changes Ia54117ff,I4d469a73,I926d8309 into udc-dev
* changes:
  Remove comment.
  Request debug headers and log URL correctly
  Integration tests for renew on license load
2023-02-25 00:09:25 +00:00
John "Juce" Bruce
340810f77f Remove hash algorithm from renewal requests
(Merged from http://go/wvgerrit/165859.)

Since renewal requests are signed with the MAC keys and not an
asymmetric key, it does not make sense to query OEMCrypto for the
asymmetric key hash algorithm nor to include the result in the renewal
request.

Bug: 262427121
Test: opk_ta
Change-Id: Ib309b63b79e553f4754c013718df242247ab9488
2023-02-24 21:11:50 +00:00
Rahul Frias
c41b6cb713 Request debug headers and log URL correctly
Merged from https://widevine-internal-review.googlesource.com/165861

We want debug headers to help diagnose b/186031735. I also
saw that we were only logging the domain name for some
errors instead of the full URL.

Bug: 186031735
Test: GtsMediaTestCases
Change-Id: I4d469a73e54f86d4d3b5d50bd0030fdb2a36df50
2023-02-22 15:09:22 -08:00
Rahul Frias
ca79034a3d Integration tests for renew on license load
Merged from https://widevine-internal-review.googlesource.com/164468

We need to add integration tests in the form of duration license tests
in order to test that this feature works with licenses from a real
server.

Bug: 253513745
Test: WV unit/integration tests
Change-Id: I926d8309ed24183ae117e3f66fb92fec2d95c310
2023-02-22 13:59:22 -08:00
Rahul Frias
04d136df36 Merge "Logging for L1 devices falling back to L3" 2023-02-15 21:53:10 +00:00
Rahul Frias
ca583d9510 Logging for L1 devices falling back to L3
[ Merge of http://go/wvgerrit/161877 ]

This change introduces some logging to shed some light on
why some L1 devices fallback to L3.

* Additional logging has been added to indicate whether a lookup of
  the symbols for OEMCrypto_Initialize, OEMCrypto_APIVersion
  or OEMCrypto_Terminate failed.
* OEMCrypto_Initialize error code is saved and reported later.

Bug: 245887116
Test: GtsMediaTestCases
Change-Id: Ice4d966d2fee458de2fae28a1355f292f879c38b
2023-02-14 14:11:08 -08:00
Alex Dale
b11890a694 Provide BCC in WVDrmFactory dumpsys.
[ Merge of go/wvgerrit/c/cdm/+/165138 ]

Enabled the Widevine DRM service on Android to return the raw boot
certificate chain via the CDM status query capabilities.  This
property key is not available for app-level queries.

The BCC is dumped by the WVDrmFactory when requested to print all
CDM properties via dumpsys.

Bug: 234095402
Test: request_license_test
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -p
Change-Id: I34695b0655b4c609979577e9986974bc0fbda898
2023-02-13 13:27:50 -08:00
Alex Dale
2c05c65138 Delete secure stops by key set ID.
[ Merge of http://go/wvgerrit/165617 ]

Similar to the issue with updating secure stops by PST (see
http://go/wvgerrit/165597), when deleting different secure stops with
the same PST results in unintended behavior.  This CL changes how the
CDM identifies which secure stop to delete from storaged based on the
key set ID rather than the PST.

Bug: 263316107
Test: device_files_unittest
Test: GTS MediaDrmParameterizedTests and MediaDrmStressTest
Change-Id: Ic3843a1435f252f052c7189423c211c28ed74eaa
2023-02-07 22:32:24 -08: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
Alex Dale
5ae1d0fa6e Update secure stops by key set ID.
[ Merge of http://go/wvgerrit/165191 ]

Previously, when updating a secure stop / usage info record, the
existing record was identified by PST.  It was assumed that apps would
never use the same PST for different licenses; however, this was never
enforced.  Certain GTS tests use the same PST across multiple tests to
identify different licenses.  Depending on the order of operations,
the periodic updating of the usage entry might overwrite the wrong
entry.

Key set IDs are generated by the CDM, and are guaranteed to be unique
within the scope of the same file system.  Given that key set IDs are
not expected to be transfered to different licenses, using the key
set ID to identify secure stop / usage info records eliminates the
possibility of overwriting the wrong entry.

Bug: 263316107
Test: device_files_unittest
Test: GTS MediaDrmParameterizedTests and MediaDrmStressTest
Change-Id: I2e2d50d188e05c8ca6b8095549796b913ea72d7a
2023-02-01 15:33:13 -08:00
Kyle Zhang
a95cd36de5 Merge "Add liboemcrypto.so as required by WV APEX" 2023-01-11 05:37:46 +00:00
TreeHugger Robot
d933e34824 Merge "Renaming of Usage Table related variables and types." 2023-01-10 02:43:26 +00:00
Kyle Zhang
a5c7a48f8a Add liboemcrypto.so as required by WV APEX
[ Merge of go/wvgerrit/164757 ]

Modify Widevine apex configuration to add add liboemcrypto.so as
required by WV APEX.

Bug: 243699259
Test: atp v2/widevine-eng/drm_compliance
Change-Id: I136dde5d77aed4fb14737e4692153c8f3b2c701b
2023-01-09 06:32:39 +00:00
Rahul Frias
609349c314 Merge changes Ib18af309,Iebd58823,Ic3a503ef
* changes:
  Support renew on load
  Move functionality to policy_timer.
  Remove references to policy_timers_v15
2022-12-22 08:11:29 +00:00
Rahul Frias
ab91cf934e Support renew on load
[ Merge of http://go/wvgerrit/164477 ]

Renew on load is supported when OEMCrypto is >= v18.
A new class, policy_timer_v18 has been added to support this
functionality. In addtition,offsets of renewal from first decrypt
and license start are also included.

Bug: 256038127
Test: GtsMediaTestCases
Change-Id: Ib18af3096d1d8807af6a03fd2f84783123ab6b6d
2022-12-21 17:33:02 -08:00
Rahul Frias
78a4902214 Move functionality to policy_timer.
[ Merge of http://go/wvgerrit/164277 ]

No functional changes are made in this CL. policy_timer_v16 and
policy_timer_v15 derive from policy_timer. We have removed
support for OEMCrypto v15. policy_timer_v15 has also been removed.

This allows us to move functionality from policy_timer_v16
to policy_timer class. This will ease subsequent renew on
license load functionality.

Bug: 256038127
Test: Luci tests
Change-Id: Iebd588237edd02b30a820c4d9d57ce041c26964e
2022-12-21 16:10:01 -08:00