Commit Graph

169 Commits

Author SHA1 Message Date
Jeff Tinker
f4560f109f Squashed commit of the following CDM changes:
* Add additional parameters to CDM decryption API
  https://widevine-internal-review.googlesource.com/#/c/6500/

* Pass Length and Flags Parameters to Decrypt()
  https://widevine-internal-review.googlesource.com/#/c/6740/

* Remove core files from oemcrypto/mock
  https://widevine-internal-review.googlesource.com/#/c/6853/

Change-Id: I1c73f5454da20da99130b161543fb990e16e7130
2013-07-29 17:41:22 -07:00
Jeff Tinker
1b295f4c81 Support Offline Licenses
Bug: 8621588

Merge of the following CLs from the Widevine CDM repository:

https://widevine-internal-review.googlesource.com/#/c/5602/
https://widevine-internal-review.googlesource.com/#/c/5431/
https://widevine-internal-review.googlesource.com/#/c/5660/

Change-Id: If37940e2535e1a1eca95e4394d8cf9bf689e9c3a
2013-05-15 21:18:20 -07:00
Jeff Tinker
1aff209f91 Field provisioning for L3 OEMCrypto
bug: 8621460

Merge of https://widevine-internal-review.googlesource.com/#/c/4955/
from Widevine CDM repository.

Change-Id: I30cf4314283db51c8e706c026501784259c87c13
2013-04-23 15:37:58 -07:00
Jeff Tinker
3a28eeeb68 Part of Qualcomm L1 OEMCrypto integration on mako
bug: 8621521

This fixes a problem where insecure audio buffers were being
passed incorrectly as secure buffers to the trusted
environment's OEMCrypto_DecryptCTR.

This is a merge of the following changes from the widevine
git repository to android git repository:

https://widevine-internal-review.googlesource.com/#/c/5163/2
Allow selection of secure/non-secure buffers

https://widevine-internal-review.googlesource.com/#/c/5164/
Pass Secure Buffer Request to CDM

Change-Id: Iec1192a216305c6cf92c359b15b148eccc6ce6ce
2013-04-22 17:50:38 -07:00
Jeff Tinker
e4181922af Merge "Increment IV in WVCryptoPlugin" into jb-mr2-dev 2013-04-22 23:34:06 +00:00
Fred Gylys-Colwell
39ea1df671 Part of Qualcomm L1 OEMCrypto integration
Upgrade to version 2.1 of license protocol in OEMCrypto.

related-to-bug: 8621521

Merge of https://widevine-internal-review.googlesource.com/#/c/4952/
from Widevine CDM repository to android repository.

Change-Id: I0d85dae1981b7525ab17aec5f21cf668d078bf47
2013-04-22 16:15:03 -07:00
John "Juce" Bruce
088288cb76 Increment IV in WVCryptoPlugin
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
2013-04-22 14:25:06 -07:00
Jeff Tinker
bb0c62768a Merge "Don't add offsets to ion handles" into jb-mr2-dev 2013-04-20 00:16:02 +00:00
Jeff Tinker
d29372909d Don't add offsets to ion handles
Fixes a secure buffer addressing offset error in the Widevine
CENC drm engine.

bug: 8667527

Merges the following from Widevine CDM repository:

Allow specification of offset into secure buffer
https://widevine-internal-review.googlesource.com/#/c/5100/

Update WVCryptoPlugin to Pass Output Offset as a Separate Parameter
https://widevine-internal-review.googlesource.com/#/c/5120/

Add offset to secure data buffer in OEMCrypto DecryptCTR
https://widevine-internal-review.googlesource.com/#/c/5110/

Change-Id: Ic3e4b35304c8fbae4aebe4c495285eb787e8c205
2013-04-19 16:45:51 -07:00
Jeff Tinker
36aeacde48 Optimize Status Queries in WVCryptoPlugin By Deleting Them
Removes the status query from WVCryptoPlugin's decrypt method.  It was not
providing any additional security since it was not cryptographically secure,
and querying status is an expensive operation on some devices.  It should not
be done on a frequent basis, such as in every decrypt call.

Bug: 8667365

Merge of https://widevine-internal-review.googlesource.com/#/c/5121/
from widevine CDM repository to android repository.

Change-Id: Id9a877c5655cb8dbee7e97f983d43ec2ab6acc6e
2013-04-19 16:38:42 -07:00
Jeff Tinker
c1474b9912 Add Detail Error Messages
Reworks the error message reporting that was just added to WVCryptoPlugin so
that it reports detailed error messages to the app (because the error codes
cannot be relied upon to reach the app intact) and so that it always reports
custom errors so that the detailed error message is passed to the app.

Bug: 8621516

Merge of https://widevine-internal-review.googlesource.com/#/c/5031/ from
widevine git to android git.

Change-Id: Id7a517fb6e4e772ffea4c779a8ee52b357345a08
2013-04-18 14:21:37 -07:00
Jeff Tinker
0fc9bf9699 Merge "Add device ID to Widevine license request" into jb-mr2-dev 2013-04-18 21:02:01 +00:00
Rahul Frias
7e390361f6 Add device ID to Widevine license request
Also added other Client identification fields specified in license exchange
protocol, Appendix C

https://docs.google.com/a/google.com/document/d/1cng6cDnchbDQDymLEd5MxMc_laS3EDv6IsoW3IzpgwQ/edit#heading=h.pmkiti873xeg

They are company, model, architecture, device and product name.

bug: 8292249
Change-Id: I4d5fa93a0c85c7abb025c66d48e4aafbfe90efd8
2013-04-18 10:02:27 -07:00
Jeff Tinker
ded298688c Improve Error Reporting
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
2013-04-17 19:02:54 -07:00
Jeff Tinker
4f47afda9f Fix DASH movie playback decrypt error
Decryption works now with Exoplayer

bug:8604068
Change-Id: Ib24fcd4bb1fce54db9111f3c51e6ab1ff6f475a3
2013-04-13 11:30:17 -07:00
Jeff Tinker
e6b1fedc4c Widevine CENC drm engine update
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
2013-04-12 14:21:37 -07:00
Jeff Tinker
352e7b0820 Add end-to-end decryption test with vectors
Added a test_mode flag to the libwvdrmengine plugin
to support verifying decryption results.

Change-Id: I9edbd6279d54fc495b5bbad8273c179106cad474
2013-04-09 13:32:46 -07:00
Jeff Tinker
f3ec8c19d6 Import updates to the Widevine CENC DRM Plugin
This change incorporates the following CLs from the Widevine
cdm repository:

    Update the java request/response test app to match Drm API changes
    Don't build the mock liboemcrypto.so by default
    Do not build CDM tests by default
    Fix Build Break in DrmEngine Unit Tests
    Fix Build Break in WVDrmPlugin
    Initial version of roadmap for CDM projects.
    Implement License Query
    Implement Generic DRM in OEMCrypto Reference Implementation
    Add key_data_length field when calling OEMCrypto_LoadKeys
    Policy engine unittests
    Generalized DRM API for OEMCrypto
    Fixes proto buf libraries build.
    Add Version Number to OEMCrypto API
    Test key control block duration field in OEMCrypto
    Add fix for missing crypto offset.
    Fixed android/media*/test builds and added proto files for Cert. provisioning
    Refactor and clean up callback code in CDM.
    Add "device_id" name-value pair to LicenseRequest::ClientIdentification
    Separate unit and end-to-end tests from the top level makefie.
    Includes changes for 'fall back to l3 oemcrypto lib' in top level makefile.
    Fall Back to Level 3 if Level 1 Fails
    Fix compilation error in wvcdm_unittest.
    Fix Android build break due to Decrypt() signature change in cdm_engine.h.
    Wire up callbacks and errors in the Steel proxy.
    Fix lock assert if there is no keybox on the device.
    RSA Certificate Unit Test
    Change Generic_Verify signature to constant.

Change-Id: I2e42db9d0b4f8d4e833675ae81d0714509bbfd2c
2013-04-03 19:53:12 -07:00
Jeff Tinker
1a8aa0dd05 Initial import of Widevine Common Encryption DRM engine
Builds libwvmdrmengine.so, which is loaded by the new
MediaDrm APIs to support playback of Widevine/CENC
protected content.

Change-Id: I6f57dd37083dfd96c402cb9dd137c7d74edc8f1c
2013-03-22 11:14:17 -07:00