[ Merge of http://go/wvgerrit/22900 ]
Add GetClientToken(), GetProvisioningToken(), GetPreProvisionTokenType()
to CryptoSession. They return the correct token bytes and token type
for preparing the ClientIdentification message for provisioning and
license server transactions.
Also refactor service certificate handling.
OEM certs are introduced in Provisioning 3.0
b/30811184
* Address build breaks
[ Merge of http://go/wvgerrit/23162 ]
This addresses issues introduced by http://go/wvgerrit/22900
b/30811184
* When http://go/wvgerrit/18012 was merged (ag/1446934) some changes
were not merged for mapErrors-inl.h. These changes are included in this CL.
* When ag/1678104 was reverse merged to http//go/wvgerrit/21981/ a variable
was renamed and some comments were added to add clarity in cdm_engine.cpp.
These changes are included in this CL.
Test: All unittests other than some oemcrypto, request_license_test
passed. Those tests failed with or without this CL.
Change-Id: Ie0215509f2f985f2a610f5a4c865db47edec8662
[ Merge of http://go/wvgerrit/22565 ]
When using the grace period, the CDM will need to override the values
given to use by the TEE (through OEMCrypto). Normally the first (and
last) decrypt times are stored securely by the TEE. To avoid extra
complexity in OEMCrypto, we will simply ignore the values given to us
by the TEE when using this feature.
However, the TEE will still enforce the (hard) license duration. So
only the rental/playback durations will be affected by malicious
editing of files.
b/34211676
Test: Reran unittests including newly added tests. All tests other than
some oemcrypto, request_license_test passed. Those tests failed with
or without this CL.
Change-Id: I6d7b5bfb669fd8603b474b68c2f7175b0c30901d
* 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
[ Merge of http://go/wvgerrit/18290 ]
Now uses the "individualization-request" message type to provision
the device, instead of using global provisioning. This also allows
per-origin provisioning and storage in CE.
b/27170580
Test: All unittests other than some oemcrypto, request_license_test
passed. Those tests failed with or without this CL.
Change-Id: I6fc39d7ccc3952e7269426d6d95767f53b787d54
This is a merge of go/wvgerrit/22806
This change removed the oemcrypto profiler to allow
the new metrics system free-reign over how to collect
and store measurements.
Bug: 33745339
Bug: 26027857
Change-Id: I6b9051faa6835f13860258c94f8bcfd3a59f1be6
(This is a merge of go/wvgerrit/22949)
Starting with OEMCrypto v12, we are guaranteeing to integration partners
that the buffers passed to OEMCrypto_DecryptCENC and
OEMCrypto_CopyBuffer will not be more than 100KiB (102400 bytes) in
size. For requests larger than this, we will first try to send the
buffer to OEMCrypto anyway. (in case the integration supports buffers
larger than the minimum) In the event that the buffer is rejected, we
will break it up into 100KiB chunks and send them down individually for
decryption.
Breaking a subsample into smaller subsamples necessitates knowledge of
how to update other decryption parameters (like the offsets and the IV)
that previously the CDM Core has not needed to know about. Until now,
this knowledge lived in the glue layer on the Android CDM and nowhere
on the CE CDM. Now, the CryptoSession has a subset of this knowledge, in
order to break up buffers successfully.
For testing purposes, the Mock OEMCrypto has been modified to only
support the smallest buffer size. In order to make sure the chunking
code was being exercised by them, the CE CDM tests had to have the
amount of data they decrypt increased by several orders of magnitude. To
contain this growth, I have moved the test data to its own file.
Bug: 31381719
Test: Ran the updated CE CDM integration tests
Test: Modified the OEMCrypto dynamic adapter to pretend both L3 and L1
only support 100KiB buffers on a Marlin and a Ryu. Confirmed that the
GTS H.264 tests (which have subsamples over 100KiB) passed still. A
similar test was attempted on Fugu but Fugu cannot pass these tests even
without this change present.
Change-Id: Iabe7db3d87554cd1352f10a7524cd55352818397
(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/22564 ]
b/34211676
Test: All unittests other than some oemcrypto, request_license_test
passed. Those tests failed with or without this CL.
Change-Id: I20474339aa1777da2db3677c10f186726505ecc8
[ 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
[ Merge of http://go/wvgerrit/17958 ]
This CL might help diagnose the build bot problem.
b/34261498
Test: All unittests other than some oemcrypto, request_license_test
passed. Those tests failed with or without this CL.
Change-Id: I71e48284b52a1177c6e3b4c9a8bdd12b77cc9f2d
[ Merge of http://go/wvgerrit/22517 ]
b/34211676
Test: All unittests other than some oemcrypto, request_license_test
passed. Those tests failed with or without this CL.
Change-Id: I86a2ff041aae57ac46e9f9f7bac38ec4599a0fa7
[ Merge of http://go/wvgerrit/22516 ]
b/34211676
Test: All unittests other than some oemcrypto, request_license_test
passed. Those tests failed with or without this CL.
Change-Id: Ie973f468f9efd05bdafcf90164dae185a6ce11dc
[ Merge of http://go/wvgerrit/22237 ]
This only changes the existing fields of the policy.
License::Policy::license_duration_seconds represents the end time
(relative to the license start time) that the license can be used.
This overriding other times if this is earlier.
License::Policy::rental_duration_seconds represents the end time
(relative to the license start time) that the license can be used
before playback starts. Once playback starts, this no longer applies.
License::Policy::playback_duration_seconds represents the end time
(relative to the playback start time) that the license can be used after
playback has started.
b/34211676
Test: Ran new unittests and reran old tests. All tests other than some
oemcrypto, request_license_test passed. Those tests failed with or
without this CL.
Change-Id: I34e7e39a7ab864300806c557b480f093aec8e545
[ Merge of http://go/wvgerrit/22744 ]
Pass resolution information into policy engine for constraint
checking.
b/33380824
Test: Reran unittests. All tests other than some oemcrypto,
request_license_test passed. Those tests failed with or without this CL.
Change-Id: I405099b1f66a47fa0c2579e2ae248dd78fa4e98a
[ Merge of http://go/wvgerrit/18560 ]
This adds support for offline playback. If the content contains
mutiple playlists which contain differing EXT-X-KEY attribute lists,
each of those keys will need to be saved and restored into separate
sessions.
b/30041089
Test: Added unit tests to cover new functionality. Some oem_crypto,
request_license_test failures but the same as without this CL.
Change-Id: Ia1b877e12a67e8a720d29897ac7e2da236090123
vendor/widevine implementation.
This prevents a hang on contention for the lock if the datasource
read blocks during sniffing.
bug:28888414
Change-Id: I3568a36b9de10b7e977b19f2f6c66106ff784d01
[ Merge from go/wvgerrit/22920 ]
Automated tests reveal a race condition between closing
a session and the periodic policy timer event. If a close
session was in progress (WVDrmPlugin::closeSession) and
CdmEngine::CloseSession caused the CdmEngine::session_list_lock_
to be held, a call into CdmEngine::OnTimerEvent would pend on the
release of the lock.
The close session would continue to deallocate the session
and disable (stop) the policy timer leaving the CdmEngine::OnTimerEvent
call in an undefined state. This would result in an ANR.
This subtle race-condition was introduced when changes were made
to add in per-origin storage [ http://go/wvgerrit/17971 ]. This seems
to happen at a low frequency (~ < 0.5%).
To address a lock has been introduced to protect the map
WvContentDecryptionModule::cdms_.
Test: Unit tests + 200 aupt test iterations
b/33343891
Change-Id: I9788db8a7d1df84f0df82cdbadb9d0f0fbe21e4e
(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
This CL modifies the haystack code to throw out the keybox if the
system id is wrong. This should help prevent b/33344450 from
persisting.
Part of this code change was to backport some updates to the haystack
tools on master.
arm/libwvlevel3.a Level3 Library 4445 Dec 6 2016 16:58:47
x86/libwvlevel3.a Level3 Library 4464 Dec 6 2016 17:06:21
mips/libwvlevel3.a Level3 Library 4465 Dec 7 2016 13:36:32
b/33556871
Change-Id: I8dadf4bc7981af6afb970533df61d34b80d133a7
This is a merge of go/wvgerrit/22627
The call table was meant to be a long-term way to track
the performance of all OEMCrypto function calls.
This feature does not get used. Apps that call into the
profiler can generate this from the history.
This change was designed to go into Android O
(go/wvgerrit/22503) but since the Call Table is causing problems
on specific chip sets its being removed in NYC MR2.
Bug: 33550032
Bug: 33459261
Change-Id: I2af417a32452e7d0d0a1ada8794efd849c497dc8