[ Merge of http://go/wvgerrit/138089 ]
Non-hidl code is no longer needed in the widevine android plugin. By
doing work this cleanup will save the team from having to keep
maintaining code that isn't needed anymore.
Clean up steps taken as follows:
1. Remove non-hidl code but keep commonly used code
2. Remove legacy test code
3. Remove legacy test build and test entry
Bug: 69573078
Bug: 172285246
Test: unit tests, GtsMediaTestCases, CtsMediaDrmTestCases
Change-Id: I75938d69413c631ef6be82da3d885ba173efc581
[ Merge of http://go/wvgerrit/108084 ]
The Widevine License Agreement has been renamed to use inclusive
language. This covers files in the android directory.
Bug: 168562298
Test: verified compilation (comment only change)
Change-Id: I0f9e6445e0168ebe85425baeb81371e182e5a39c
(This is a merge of http://go/wvgerrit/93829,
http://go/wvgerrit/93830, http://go/wvgerrit/93832,
http://go/wvgerrit/93833, and http://go/wvgerrit/93834 from the
Widevine repo.)
This implements the CDM code changes necessary to take advantage of
Combined Decrypt Calls on OEMCrypto v16. The result of this is that
WVCryptoPlugin is much lighter now because it can pass the full sample
down to the core in one call, but CryptoSession is heavier, as it now
has to handle more complex fallback logic when devices can't handle
multiple subsamples at once.
This patch also removes support for the 'cens' and 'cbc1' schema, which
are being dropped in OEMCrypto v16. This fixes an overflow in the code
for handling those schemas by removing it entirely.
This patch also fixes the "in chunks" legacy decrypt path to use larger
chunk sizes on devices with higher resource rating tiers.
Bug: 135285640
Bug: 123435824
Bug: 138584971
Bug: 139257871
Bug: 78289910
Bug: 149361893
Test: no new CE CDM Unit Test failures
Test: Google Play plays
Test: Netflix plays
Test: no new GTS failures
Change-Id: Ic4952c9fa3bc7fd5ed08698e88254380a7a18514
(This is a merge of modmaker@'s change from the Widevine repo,
http://go/wvgerrit/48880)
When using pattern encryption, WVCryptoPlugin needs to increment the
IV after each subsample. It should increment it based on the number
of actually encrypted samples (i.e. ignore clear data caused by
subsamples or pattern encryption).
In the common encryption spec, section 9.6.1 states:
If the last Block pattern in a Subsample is incomplete, the partial
pattern SHALL be followed until truncated by the BytesOfProtectedData
size and any partial crypt_byte_block SHALL remain unencrypted.
This fixes the counting of encrypted blocks to account for partial
patterns. This also makes it more efficient by removing the loop.
Bug: 111001481
Test: build_and_run_all_unit_tests
Test: Widevine GTS Tests
Change-Id: Ibd2bf10f64461b9bce10ef07453096fe4a4f6376
Merge from Widevine repo of http://go/wvgerrit/47860
This CL updates the copyright notice to indicate that files
shared with partners are shared under the Widevine Master
License Agreement.
bug: 77926774
test: comment change only
Change-Id: I0423668111578b80fb39a932d763df2827e2dfc3
(This is a merge of go/wvgerrit/22898)
This change moves some code - that was nearly identical between the
clear subsample and encrypted subsample paths - into a common helper
method.
Bug: 31381719
Test: libwvdrmmediacrypto_test
Change-Id: I64d3e03b3953cddd1cc0d370ba66fc634dfb1dd8
(This is a merge of go/wvgerrit/22441)
The IV incrementation code in Widevine DRM Plugin includes complexity
for handling partial crypto blocks in "cens" mode, a situation that
cannot actually happen. This commit changes the code to no longer handle
this case specially.
Bug: 28696811
Test: No tests for this code path due to bug 28295739
Change-Id: I77f8434a9785bf028509387c06db217a5de2b91b
(This is a merge of go/wvgerrit/20500)
This patch removes the logic that calculates the "pattern offset" from
the Android glue layer. There is no such thing as a pattern offset, and
setting this value to anything other than zero may break cens mode on
some devices.
To reduce the risk of setting this value to anything other than zero,
the offset_blocks parameter has been removed from the pattern descriptor
in the CDM Core. It will have to remain part of OEMCrypto v11,
unfortunately, but the code to set it to zero is now centralized in
CryptoSession.
Bug: 28726863
Change-Id: I9c5bfe470fe251c7a57901dc2e998f4dab7fe7d7
[This is a merge of http://go/wvgerrit/16522 ]
This commit adds support for CBC and Pattern Mode to the MediaCrypto
implementation. These are the only changes needed to support HLS. (No
change is needed for MediaDrm, as it already passes HLS initialization
data along to the core without closely inspecting it, as it should.)
Following this change, the glue layer also supports the CENC, CBC1,
CENS, and CBCS modes from the forthcoming update to the ISO-CENC spec.
Note that, in order to differentiate CBC1 and CBCS, we have to cue on
the presence or absence of a pattern, which may not continue to be
sufficient in the future if a third CBC mode using patterns is ever
added.
Note that the unit tests for this code remain disabled for now. New
unit tests are forthcoming in a separate commit.
Bug: 25666017
Change-Id: I5942a8b70393e63b4de9d7dab985c4c2a98a20b3
(This is a merge of http://go/wvgerrit/14531)
As an optimization, the Media Server now unloads our library when not
in use. This has exposed a bug by which we were never deleting the CDM
singleton. Fix is to make WvContentDecryptionModule an Android smart
pointer ref base and then make sure all the plugins store a strong
pointer to it. The singleton is a weak pointer, so when the last
plugin is cleaned up, the CDM will be as well. And on the off chance
that the library isn't immediately unloaded, the singleton code will
generate a new CDM next time one is needed.
Bug: 21153732
Change-Id: Ifaf02fa9afe0a70a8b53e8b92ee0a3d1359ca001
Implements the optional setMediaDrmSession() method. To enble this,
support was added to the core to report if a session ID is valid.
As a consequence of this, in the tests for the CryptoPlugin,
construction of the plugin must be deferred until all gMock
expectations are set, as construction now calls into the CDM core.
This is a merge of two changes from the Widevine CDM repo:
http://go/wvgerrit/14083
Allow Setting of Session ID
http://go/wvgerrit/14085
Check If Session ID Is Valid When Changing CryptoPlugin IDs
Bug: 19570317
Change-Id: I7dbd777ce6efebd71fdb5e602663a0e35a48a9c4
(This is a port of http://go/wvgerrit/11556 from the Widevine CDM
repo.)
This wires up the new method on the crypto interface with the core
code that handles the max-res decode.
Bug: 16034599
Change-Id: Id2ea5635bf732eabf1fd33712ff8bab6cf1a1745
WVCryptoPlugin was not properly implementing part of its responsibilities to
AES-CTR in ISO-CENC. Specifically, it was not incrementing the IV after each
block.
Also, I have greatly expanded the unit tests for decrypt() to catch more edge
cases.
This change fixes the two failing test vectors in the Java integration tests.
Copied from https://widevine-internal-review.googlesource.com/#/c/5123/2
Bug: 8656421
Change-Id: If935edbf01068f5b0d5254b4e657057ef57d8fcf
Adds more meaningful error reporting where possible to the DrmEngine. Adds
translation of CDM and OEMCrypto errors to Android errors.
Bug: 8621516
Change-Id: Ibab8a8711c3929ed72870ec7e138cd42358d9fb3
bug: 8601053
This import syncs to the widevine git repository change
commit 6a99ad1b59ad39495f62954b3065ddc22b78da49
It includes the following changes from the widevine git
repository, which complete the jb-mr2 features
Fix Unit Test Makefile
Adds support for device certificate provisioning.
Support application parameters
Certificate based licensing
Proto for client files
Implement Property Query API
Add Device Query For Unique ID
Implement Generic Crypto in DrmEngine
Do not validate Key IDs on clear playback
Allow OEMCrypto_DecryptCTR with clear content and no key
Add a case to the MediaDrm API test to repro b/8594163
Implement requiresSecureDecoderComponent
Implement Eventing API
Add end-to-end decryption test with vectors
Refactoring of properties class
Refactor OEMCrypto unittest.
Fix for b/8567853: License renewal doesn't renew license.
Add KEY_ERROR callback to WvContentDecryptionModule() ctor.
Merged certificate_provisioning.proto and
client_identification.proto to license_protocol.proto.
Fix nonce check failure after a malformed key in OEC Mock.
asynchronize decryption
Allow querying of control information
make debugging AddKey & Decrypt statuses easier
Revert "Revert "Send KEY_ERROR event to app on license
expiration or failure""
Revert "Send KEY_ERROR event to app on license expiration
or failure"
Send KEY_ERROR event to app on license expiration or failure
remove extra session id copy
use KeyError constants directly
replace variable-length arrays with std::vector and fixed-sized array
pass session ids as const references
refactor key extraction and update keys on renewal
Updates to enable renewals and signaling license expiration.
fix error constant in OEMCrypto_DecryptCTR
Change-Id: I5f7236c7bdff1d5ece6115fd2893f8a1e1e07c50
Builds libwvmdrmengine.so, which is loaded by the new
MediaDrm APIs to support playback of Widevine/CENC
protected content.
Change-Id: I6f57dd37083dfd96c402cb9dd137c7d74edc8f1c