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
[ 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)
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)
(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
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
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
[ 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
[ 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
[ 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
[ 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
[ 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
[ 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
[ 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
[ Merge of http://go/wvgerrit/164077 ]
This CL makes major changes to the names of variables and types that
are related to the usage table, header, entries, entry indexes, and
other related data.
The renaming followed these rules:
1) "Usage table header" will exclusively refer to the header blob
that is OEMCrypto specific. The CDM class "UsageTableHeader"
is the CDM-layer's abstraction around the "usage table" concept.
The name has been updated to reflect that.
2) The "Cdm" prefix is only used for the CDM-specific data types for
the usage table and entry info. It has been removed from
OEMCrypto-specific types.
- UsageTableHeader -> CdmUsageTable
- CdmUsageTableHeader -> UsageTableHeader
- CdmUsageEntry -> UsageEntry
3) The "usage_" prefix has been removed from variables when the usage
table or usage entries are the subject of the function or class.
4) UsageEntryIndex is the type for entry indexes, instead of directly
using uint32_t. This matches how we wrap other types in
"wv_cdm_types.h"
5) Changed entry "number" to entry "index".
6) Vectors of elements have been renamed to be either pluralized or
have a suffix "_list".
7) "Usage info" was occasionally being used to refer to the usage
table or entries generally, rather than specifically secure-stop.
- CryptoSession::HasUsageInfoSupport() -> HasUsageTableSupport()
The most major change is that the files "usage_table_header*" have
been renamed to be "cdm_usage_table*".
Bug: 242914226
Test: run_x86_64_tests and request_license_test
Change-Id: Iee98446b71f4f2934d3c9e0fb949eb05b84d1f8c
[ 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
[ Merge of http://go/wvgerrit/164257 ]
Support for OEMCrypto v15 is being removed from the CDM. The
policy_timers_v15 will no longer be invoked and can be removed.
Bug: 256038127
Test: WV unit/integration tests
Change-Id: Ic3a503ef2a17223dd0bc13696960dcd6822cc343
No-Typo-Check: From a third party header file
Bug: 260918793
Test: unit tests
Test: atp v2/widevine-eng/drm_compliance
Change-Id: I36effd6a10a99bdb2399ab1f4a0fad026d607c70
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
(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