[ Merge of http://go/wvgerrit/93505 ]
During the merge process there were a few CL comments (ag/10122083)
that were not able to be addressed. Most changes in the CL are
spelling / grammar corrections.
Bug: 148907684
Bug: 141247171
Test: CDM unit tests
Change-Id: I9a8648525bbe5ed319521ebf01741a958ab69ae2
Merge from Widevine repo of http://go/wvgerrit/92103
The document "docs/Upgrading_Widevine_Drm_to_Pi.pdf" has been updated
to version 1.1, which includes comments about updating level 3 data
when a device is updated from N to P, skipping O.
Bug: 137045379
Test: docs only.
Change-Id: I448efa34d1d3a40aec0b1aa14cf40ddd58846e63
Merge from Widevine repo of http://go/wvgerrit/93404
This is the unit tests, reference code, and documentation for
OEMCrypto v16.2. Backwards compatibility should work for a v15
OEMCrypto.
Some review comments will be addressed in future CLs.
Bug: 141247171
Test: Unit tests
Test: Media GTS tests on bonito
Change-Id: I9d427c07580e180c0a4cfdc4a68f538d351c0ddd
Merge of http://go/wvgerrit/93404
This CL updates the Widevine CDM to support OEMCrypto v16.1
Test: Tested in 16.2 CL
Bug: 141247171
Change-Id: I69bd993500f6fb63bf6010c8b0250dc7acc3d71b
[ Merge of http://go/wvgerrit/92546 ]
The integration test for L1 and L3 HDCP levels was missing an
acceptable value of QUERY_VALUE_HDCP_V2_3.
Bug: 147396294
Test: Android integration test
Change-Id: I66f7164b7b6a6d63f81fdcfffff0d2d891fd5699
This patch merges some features that were added to TestBase in
http://go/wvgerrit/92349 in the Widevine Repo. Certain parameters to
TestBase that could have been const but weren't now are. The caller to
Initialize() can now specify additional, platform-specific help text to
be displayed after the generic help text. And some missing headers were
added to test_base.h.
The Android code does not yet take advantage of any of this, but it
could in the future.
Bug: 145013234
Test: Android Unit Tests
Change-Id: I3c54532a39641622d454256b25979ad89727d43f
These tests set `LOCAL_MODULE_TARGET_ARCH := arm x86` unless
TARGET_ENABLE_MEDIADRM_64 is true, so for 64-bit-only configurations
that don't set this, these tests are disabled.
Test: lunch armv8-eng; m nothing -> see fewer warnings
Change-Id: I7ca0e8c382eb9930b8b1477ee8c9f1ea40c6888f
[ Merge of http://go/wvgerrit/92783 ]
The integration test suite cdm_extended_duration_test are failing to run
successfully. This is an interim step which corrects a few failures
including the the PSSH used by some of the tests. Follow on CLs will
address other test failures.
Bug: 148090831
Test: cdm_extended_duration_test (VerifyLicenseRequestTest,
VerifyLicenseRenewalTest, MaxUsageEntryOfflineRecoveryTest)
Change-Id: I918353bfcd6ad2442c40bf0ddb8e3b07232af03d
(This is a merge of http://go/wvgerrit/92191)
This reverts commit 8fe569cc1265021e275a9bccbc362ebd2ba3be5f.
The ISO-CENC spec is ambiguous about how to handle the early truncation
of the pattern in the 'cens' and 'cbcs' schema. We originally
interpreted it to mean "follow the pattern until you run out of full
crypto blocks" and shipped the Android and OEMCrypto code accordingly.
Later, however, other engineers at Google asserted that it should mean
"follow the pattern until you run out of enough crypto blocks to follow
the encrypted part of the pattern", which is subtly different when the
number of encrypted blocks in the pattern is greater than 1. We made
changes to start accommodating this. However, after further discussion,
everyone is in agreement that the original behavior was correct. So I am
reverting the "fixes" that had already been made.
This has no practical effect, since it only affects 'cens' content with
a pattern that has more than one encrypted block, and as far as we know,
no one has ever generated content like that. Shaka Packager is not
capable of generating content like that.
Bug: 111001481
Test: No new Android Unit Tests failures
Change-Id: I8f0292b1222d6af9a0ae33d6cb91707fd40101f4
[ Merge of http://go/wvgerrit/88016 ]
In the event of an LRU replacement event on AddKey, we gather some
metrics on what the state of the usage table is and some info on the
the entry that was removed.
Metrics collected:
- How many usage info (streaming license) in the table
- How many offline licenses in the table
- What type of entry was evicted from the table
- How stale (time since last use) was the evicted entry
This also enables unit tests for marshalling the metrics into proto
message on Android unit test.
Bug: 135046978
Test: Android and Linux unit tests
Change-Id: If8e562ae6f98270a0e6c5aa4251127ce9b79a8b0
[ Merge of http://go/wvgerrit/89906 ]
The change allows the GetDecryptHashSupport method to return
an error.
Bug: 144851430
Test: WV android unit/integration tests
Change-Id: Ib3b95788adb21b5ed0daee51ad338f9674b04c3c
[ Merge of http://go/wvgerrit/89888 ]
A macro validates parameters in CryptoSession and return a
specified error code. Some error codes have been retired and replaced with
the error code PARAMETER_NULL.
Bug: 136123217
Test: Android unit/integration tests
Change-Id: I6ecbad53e87cce04dfd9ea27861400e83044cf5e
[ Merge of http://go/wvgerrit/90244 ]
Tests now link with the dynamic rather than static version of libcrypto.
Bug: 145007632
Test: Unit/integration test
Change-Id: I62e34cac8fdbb8fcf7da5dc8bea142bf2aa76a2f
[ Merge of http://go/wvgerrit/59022 ]
Android metrics are output by the adb shell command
|dumpsys media.metrics|. They appear in bugreports
and can also be requested interactively. Both the
widevine and framework mediadrm metrics are base64
encoded protobufs detailing each of the metrics
items. This tool prints them in a readable format.
Test: wv android unit/integration tests
Change-Id: Id1bc05b34693a3ca44dd3872a28a2337b3ce4d79
[ Merge of http://go/wvgerrit/89766 ]
Certain C++11 (and newer) standard library functions and classes which
utilize random number generators require that the random number
generators meet the specifications of C++11's UniformRandomBitGenerator
name requirements. This is especially important as C++17 will remove
support non-compliant alternatives.
This change updates CdmRandomGenerator to meet these requirements.
Bug: 143494945
Test: Linux and Android unit tests
Change-Id: Ib6df44da4969ad7596b16d447c3f8bd9864698f6
HALs need to getCallingSid to verify clients.
[ Merge of http://go/wvgerrit/89123 ]
Bug: 134787536
Test: log calling sid
Change-Id: I9cfbddfc274457a6802d9c8f37470d656771acc6
Cherry pick of http://go/ag/9326830
This is a merge of the full decrypt path testing CLs from the Widevine
repo: http://go/wvgerrit/q/topic:FDPT-subsamples
This is the Full Decrypt Path Testing application that can be used by
device makers to verify that OEMCrypto is correctly decrypting content
to secure buffers.
Testing: Ran App.
Bug: 113594822
Change-Id: Icbb1e2f2e762bac3cc1b7b20749922c14ea24449
Cuttlefish includes GMS core, Widevine is required.
Add Widevine security level 3 drm service to cuttlefish.
Since we do not want to include vendor Widevine as open code
in cuttlefish's manifest, we will use LOGCAL_VINTF_FRAGMENTS
to refer to Widevine hal in Android.mk here.
Test: tests from gts WidevineDashPolicyTests classs
ANDROID_BUILD_TOP= ./android-gts/tools/gts-tradefed run gts-dev \
-m GtsMediaTestCases \
--test com.google.android.media.gts.WidevineDashPolicyTests \
#testL3LongLicenseShortPlayback
bug: 141621537
Change-Id: Ibaf5b77ba337c778a45560b20ca752a19724cc9d
[ Merge of http://go/wvgerrit/87283 ]
SPOIDs (Stable Per-Origin IDentifiers) were not correctly being
set during CdmEngine construction. This resulted in SPOID values not
being sent in provisioning requests. This caused the serial number in
the drm certificate to not be stable after a reprovision.
This behaviour appears to be true going back to O.
CdmEngine no longer takes a SPOID in the constructor since not all
callers use SPOIDs. A setter has been added in its place. Previously
spoid had a default argument to the constructor.
Bug: 142368328
Test: android unit/integration tests
Change-Id: I711346df609636ecf1475dc37873454a7ef000c0
[ Merge of http://go/wvgerrit/88006 ]
Certain test files have yet to be formatted since we introduced
clang-formatting.
Test: android unit/integration tests
Bug: 134365840
Change-Id: I2d30ad367d76a9dfbf389614e1b31ed39fa17c72
[ Merge of http://go/wvgerrit/87964 ]
A preliminary test has been added, more to follow.
Bug: 142747616
Test: android unit tests
Change-Id: Ida8eb853c14f73f60f7bc354f14a02224c2ce66c
[ Merge of http://go/wvgerrit/87905 ]
Protobuf parsing of the provisioning message has been centralized in
certificate_provisioning.cpp since it will be invoked from
multiple locations. This will also ease maintainability of the code.
Bug: 142731300
Test: android unit/integration tests
Change-Id: Idebf6b0145b317698559cac1cf18a3a0b98315ad