The app package name was not being reported to the media stats. This
change adds the package name as part of the report to media stats.
This is one of two parts to this change. The other part is in
frameworks/av.
Bug: 64584568
Test: Unit tests, GTS tests, tried with Google Play Movies.
Change-Id: I1ca09db3a59d9a0950f424d977f8774dffd09c2b
The test verifies that a downloaded license receives an expiry event
in a session if it is released from another session. With
the introduction of the big usage table feature loading a
license/usage entry into multiple sessions is not permitted and
so this test is no longer needed.
Some OEMCrypto implementations might require OEMCrypto_UpdateUsageEntry
to be called between calls to OEMCrypto_LoadKeys and
OEMCrypto_ReportUsage. This CL adds the call to
OEMCrypto_UpdateUsageEntry.
Test: WV unit/integration test
Test: Playback using play movies and netflix
Test: GTS tests
Bug: 64988654
Change-Id: Ic737c3200ea1858736a168be835507378eaf7b3e
Merge from Widevine repo of http://go/wvgerrit/32067
PerOriginProvisioningSupportsOldPaths is changed to allow for there to
be several other device files.
bug:64952779
Test: unit tests on bullhead.
Change-Id: I0593d95a877c236c9a87c5893bbec22abe25fde9
(This is a merge of http://go/wvgerrit/32280)
At the same time as the last version number canary change went in, the
version number for O-MR1 was updated to its final value. Thus, the test
never stopped failing on the dashboard. This patch silences the canary
again. No Widevine version number update is needed, since we already
updated it for O-MR1 in the previous patch.
Bug: 64951985
Test: request_license_test
Change-Id: Idf3c4b96e3f200d08a089bd08afdee8b0fd9dd76
(This is a merge from http://go/wvgerrit/31360)
This also updates the version number change canary.
Bug: 64209738
Test: request_license_test
Change-Id: Ibdf27256822a32988a848ef5bf79bf2e2633fd59
[ Merge of http://go/wvgerrit/29004 ]
Enable support for provisioning with OEM certificates as root of
trust.
b/62972441
Test: WV unit/intgration test, cdm_feature_test and GTSMediaTestCases
Change-Id: I30576fc0bb68a873eeaaca03f6b9c89fa6a14327
The methods on WvContentDecryptionModule related to UsageInfo (Secure
Stops) do not work if kDefaultCdmIdentifier has not been provisioned.
This can occur if an app provisions and uses an origin without any app
on that device ever provisioning the default origin. More concerningly,
this will happen 100% of the time on SPOID-using devices, as there is no
way to provision the default identifier on these devices.
The fix is to pass the current identifier to these methods so that they
do not have to use kDefaultCdmIdentifier.
Test: build_and_run_all_unit_tests.sh
Test: WV GTS Tests
Bug: 62431478
Change-Id: I92a8b4acb69c964abe8129bccf2ff48a66c4a9e0
[ Merge of http://go/wvgerrit/28460 ]
Validate that offline licenses that do not contain a provider session
token are not handled by the TEE.
b/38490468
Test: WV Unit/integration tests, GtsMediaTestCases,
WvCdmRequestLicenseTest.ReleaseRetryL3OfflineKeySessionUsageDisabledTest
Change-Id: Idaf62f2a882ae933c1a3e108d791943034780a46
[ Merge of http://go/wvgerrit/26421 ]
* Corrects usage_table_header lifetime management. Earlier the
UsageTableHeader class was a singleton tied to the CdmEngine lifetime.
With SPOIDs there might be multiple concurrent CdmEngine objects.
The UsageTableHeader class is now associated with OEMCrypto
lifetime. There are two UsageTableHeader objects one for each L1 and L3.
These get allocated/deallocated on OEMCrypto Initialization/Termination
respectively.
* UsageTableHeader requires OEMCrypto, file read/writes and
metric gathering to perform its required functionality. Because of the
lifetime changes, CryptoSession, DeviceFiles and MetricsGroup objects
need to passed to the methods rather than at Creation time.
* Miscellaneous fixes, when moving or deleteing entries.
* Adds usage_table_header_unittests.
* Addresses failures with request_license_test with secure stop in L3.
b/36858906
b/36855557
b/36048120
b/38341136
b/37100505
b/35946047
Test: Verified by unit and integration tests. Added new
usage_table_header_unittests
Change-Id: I20e396ab2c0afbd14372dd93b969e5b0f1ccd291
[ Merge of https://go/wvgerrit/27860 ]
The android version was updated from "O" to "8.0.0"
b/62201928
Test: Ran wv unit and integration tests.
Change-Id: I57525af2ab3bdfa0e77ad8f0efbff26cf8ff5c32
[ Merge of http://go/wvgerrit/25987 ]
Test: Added Cdm/WvCdmSessionSharingNoKeyTest to request_license_test.
Verified by wv unit and integration tests.
b/28182987
Change-Id: I9039bc1fca83e2c1044c3af2f47f31dc4fb5c910
[ Merge of http://go/wvgerrit/25643 ]
The MediaDrm#provideKeyResponse API states that an empty byte array is
returned when the license type is streaming or release but a non-empty
value was being returned in some cases.
The KeySetId is now returned when the license type is offline or when
the license is streaming and has a secure stop associated with it.
Test: Verified by request_license_test integration tests. Tests have been
modified to validate the returned Key Set Id values.
b/36093612
Change-Id: I82dba537c77ddd1d1876cbce58729f3db901ee51
[ Merge of http://go/wvgerrit/23742 ]
In OEMCrypto V13, usage table header and usage entries are stored in
persistent non-secure storage and loaded and unloaded from the TEE.
Information needs to be maintained to assist finding the associated license
or usage information. This information has been revised for usage information
to use key set id and usage info file name rather than provider session
token and app id.
The app id is stored in a hashed form (usage info file name) and was not
extractable during the upgrade process to OEMCrypto V13. Due to this
DeviceFiles UsageInfo routines have switched to use usage info file name
rather than app id as a key.
b/34327459
Test: Verified by unit/integration tests on angler
Change-Id: I95aa0435d0955c61fc45b951f5b5d44de2ba5cfc
(This is a merge of go/wvgerrit/23182)
This patch adds the framework for Stable Per-Origin Identifiers to the
CDM. Calculating SPOIDs will be done on the client-side, and they are
sent as part of the provisioning request. SPOIDs are also available to
the app as the Device Unique ID, replacing the previous method of
returning the actual Device Unique ID from the keybox / OEM certificate.
Different SPOIDs must use separate storage, just as different origins
already do. Support for this has been added to the Android adapter to the
CDM Core. However, the code in the Android glue layer that would drive
this behavior will be checked in in a separate change. As such, all
Android devices will continue using the legacy behavior even after this
patch goes in, until the glue layer code can be updated.
Bug: 27101531
Test: CE CDM Unit Tests
Test: Linux Jenkins Unit Tests
Test: Android Unit Tests (with and without SPOIDs forced on)
Test: Android GTS Tests
Change-Id: Ia0caf890381cbcb97504d08b19aeab8b29bd07ae
* CDM license protocol updates
[ Merge of http://go/wvgerrit/22789 ]
No functional changes (yet) - all tests in widevine_ce_cdm_unittest
run successfully.
* Address android test build failures
[ Merge of http://go/wvgerrit/22983 ]
Updates to the license_protocol.proto in go/wvgerrit/22789
did not include the integration tests for android.
b/34202048
Test: Reran unittests. All tests other than some oemcrypto,
request_license_test passed. Those tests failed with or without this CL.
Change-Id: Ib9041d397187859b8fcbc1b1f7d275f8c4ef6aba
(This is a merge of go/wvgerrit/23080)
Updates the Widevine version number and canary for the Android O
release. Widevine is now at v5.0.0 on Android.
Bug: 34114979
Test: request-license-test
Change-Id: I19558d6b297263f816522176a5649be70b471073
[ Merge of http://go/wvgerrit/20205/ ]
This is separate from the server certificate used for license
requests.
b/34211823
Test: Reran unittests. All tests other than some oemcrypto,
request_license_test passed. Those tests failed with or without this CL.
Change-Id: I23abdf276f8d3db9222f014175d0bb5094010a04
(This is a merge of go/wvgerrit/22897)
Bumps the Widevine version to 4.2.0 for NYC-MR2 and also updates the
test to expect the NYC-MR2 OS version number.
Bug: 32955300
Test: request_license_test
Change-Id: I2f186928f20e0848cbeef5fef2182045ad27140a
[ Merge of http://go/wvgerrit/21960 ]
When an offline release message is generated, a session is created
internally to generate the release and handle the release response.
If the response is never provided (network, server errors),
or there is an error when the response is being processed, the
session may not be closed. This change introduces a time to live for
release sessions of 60 seconds and will be reclaimed after this period.
Test: verified by unittests on angler
b/32223945
Change-Id: I3bd4637733ddf6c343956ed9f97c68d84dc7d4e4
[ Merge of http://go/wvgerrit/21960 ]
When an offline release message is generated, a session is created
internally to generate the release and handle the release response.
If the response is never provided (network, server errors),
or there is an error when the response is being processed, the
session may not be closed. This change introduces a time to live for
release sessions of 60 seconds and will be reclaimed after this period.
b/32223945
Change-Id: I3bd4637733ddf6c343956ed9f97c68d84dc7d4e4
(This is a merge of go/wvgerrit/21580)
The version number for N-MR1 has been increased to 7.1.1, which
triggered our version number canary. Since this is still N-MR1, no
Widevine version number update is necessary as we already updated it for
N-MR1, but the canary needs to be updated.
Bug: 32018966
Change-Id: Ia1d673f837d9c6a5935f26beec7372b25ea3a6b9
This CL merges several CLs from the widevine repo:
http://go/wvgerrit/18012 Add support for querying allowed usage for key.
http://go/wvgerrit/17971 Add per-origin storage.
http://go/wvgerrit/18152 Add OEMCrypto's generic crypto operations to CDM.
http://go/wvgerrit/17911 QueryKeyControlInfo => QueryOemCryptoSessionId
Note: numbering in wv_cdm_types.h was added in this CL and will be
back ported to wvgerrit in a future CL.
Change-Id: Idb9e9a67e94f62f25dc16c5307f75a08b3430b64
(This is a merge of go/wvgerrit/20402)
This updates the version number to v4.1.0 for the NYC-MR1 release. It
also updates the canary to pass on the nyc-mr1-dev branch.
Bug: 30813903
Change-Id: I05de038ff52e9f7633efff7011052b48b59d90fa
[ Merge of http://go/wvgerrit/19960 ]
Protections schemes are specified using a 4CC code {"cbc1", "cbcs",
"cenc", "cens"}. A host to network conversion was performed when the
PSSH was created and inserted into the license request. A reverse
conversion was performed when the code was extracted from the
license response.
These conversions are problematic if the PSSH is created externally and
passed into mediaDrm. To address this, the conversions have been removed
and allow protobuf to handle byte ordering. For backward compatibility
we allow codes in either ordering.
b/30713238
Change-Id: I25f01ecc621549fd3c13b443e4c8b89168463249
[ Merge of http://go/wvgerrit/17501 ]
Widevine request_license_tests were written with the expectation that
devices would by default be enabled for security level 1 and fallback
to level 3 if needed. Some devices such as seed are L3 only and results
in failures in the QueryStatusL3 test. This CL corrects the test's
expectation.
b/26902214
Change-Id: Ie84554337cd3716d120f67e592888af0cde719c7
[ merge of http://go/wvgerrit/17454 ]
When processing a license or renewal, calls to Set/UpdateLicense
update the policy information. A side effect was introduced whereby
updating the policy may cause (expiration, session key state)
notifications to be sent to the listener. Due to the ordering,
the notifications would be sent before the keys were loaded/refreshed,
which caused issues when the notifications were immediately acted upon.
This has now been corrected.
b/27842970
Change-Id: Id81a71ff48edfa9ca0baafc43267995d5a3e80a6
[ Merge of http://go/wvgerrit/17204 ]
Sleep was being employed, to introduce a delay so that one license expired
but the other was still active. The duration was long enough that
occasionally the second license would also expire, causing the test to fail.
Reduce the sleep duration to correct this behaviour.
b/27673513
Change-Id: Ieef9100c98783c16fc5ab8fe345fa1dd26604f18
[ Merge of https://go/wvgerrit/16940 ]
An alternate scenario to renewing keys is to load the same keys in
a separate session and make use of them by using the session sharing
feature.
Session sharing involves iterating through a map of sessions and
returning the first session that contains the Key ID. In certain cases
(license about to expire) we might prefer an alternate session
be chosen.
Licenses may expire in two ways. Policy engine, driven by a 1 second
timer may detect expiry and send an asynchronous event. OEMCrypto may
also detect expiry based on information in the key control block
and return an error during decryption. It is possible that these
may differ by upto a second. This can lead to issues where decryption
fails but EVENT_KEY_EXPIRED is not generated till later.
It is possible to address this by using information from both timers
to notify the app about expiry. To implement this correctly will
add complexity and require synchronization between threads. To avoid
this an alternate solution is, if session sharing is used, to pick
the session that has a license with the longest remaining validity.
b/27041140
Change-Id: I398cc4c10ee3a2f192d4a0befe7c8a469dd5bf86
[ Merge of http://go/wvgerrit/16625 and http://go/wvgerrit/16633 ]
Reduce the number of parameters needed by GenerateKeyRequest.
Combining all output values into a single struct.
BUG: 26162546
Change-Id: Ibeb3f4df4a8e877511f8ab2e6c543001a921f285
This silences the canary test to match the Android version string
change from NYC to N. properties_android.cpp has already previously
been updated for N, so no need to bump the Widevine Android version
number at this time (see: go/ag/800077)
Matching Widevine cl: go/wvgerrit/16664
Bug: 26901110
Change-Id: Ib8f47f77bbb4dd2c7c302102fe43007059af2d50
(This is a merge of http://go/wvgerrit/15992)
This also updates the canary so that it will be silent on master.
Bug: 25153516
Change-Id: I11163c98230c5a521609b5556b139f4508996858