Commit Graph

768 Commits

Author SHA1 Message Date
Jeff Tinker
f2c3db81d3 Unit test script and end-to-end license/decrypt test update
Does not affect any production code, only unit tests

Makes the end-to-end license/decrypt test compatible with the
fix for b/8604068 (merged).

related-to-bug: 8604068

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

Change-Id: Ic5739c9de0cd385a672311ec87b9a475e367121a
2013-04-18 17:20:57 -07:00
Jeff Tinker
cd304b1c46 Use Standard Errors in DrmPlugin
Now that MediaErrors.h has errors for some of the conditions we were using
custom error codes for previously, we should switch to using the standard
error codes in order to get better error reporting to the app.

Bug: 8621516

This is a merge of https://widevine-internal-review.googlesource.com/#/c/5040/
from widevine cdm repo to android repo.

Change-Id: I111a8825fa8fd8186a0d535cf19a7b08d9f35aee
2013-04-18 16:28:02 -07:00
Jeff Tinker
114e7c8645 am fa1f5faf: Merge "Add Detail Error Messages" into jb-mr2-dev
* commit 'fa1f5fafe13032333408ebf7d4af6037a881c7ca':
  Add Detail Error Messages
2013-04-18 16:14:26 -07:00
Jeff Tinker
38b3b76634 am 0ab787b9: Add Property to Access System ID
* commit '0ab787b95834b9103fb207c48dcca6fdc2ba9192':
  Add Property to Access System ID
2013-04-18 16:14:26 -07:00
Jeff Tinker
fa1f5fafe1 Merge "Add Detail Error Messages" into jb-mr2-dev 2013-04-18 23:11:25 +00:00
Jeff Tinker
0ab787b958 Add Property to Access System ID
Adds a new property to the CDM's QueryStatus called QUERY_KEY_SYSTEM_ID that
contains the System ID. (as read from OEMCrypto_GetKeyData)  Adds a new
property to the DrmPlugin (cleverly named "systemId") that allows the app to
query for this.  Also adds unit tests.

Also changes the Device ID getter in crypto_engine.cpp to return a failure
instead of an empty ID.

Bug: 8621632

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

Change-Id: I8f309af18487c499e8ce25e829059e45623ea4dc
2013-04-18 15:25:11 -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
b863573bb3 am 0fc9bf96: Merge "Add device ID to Widevine license request" into jb-mr2-dev
* commit '0fc9bf96994c2bba7291cb81af4dbfea27b7f8f9':
  Add device ID to Widevine license request
2013-04-18 14:10:34 -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
9cadd5157f am 38f5308c: Update libwvdrmengine to be consistent with MediaDrm API review update
* commit '38f5308c85edc5008289fab1242d165ea65637e4':
  Update libwvdrmengine to be consistent with MediaDrm API review update
2013-04-18 09:50:03 -07:00
Jeff Tinker
c4a8e12cd5 am ded29868: Improve Error Reporting
* commit 'ded298688c9a27537de138f03d99c4197c226850':
  Improve Error Reporting
2013-04-18 09:50:02 -07:00
Jeff Tinker
38f5308c85 Update libwvdrmengine to be consistent with MediaDrm API review update
bug: 8603279

Change-Id: I1d4dfdc52c1cdb74ead4ad373a3a03abc8886299
2013-04-17 19:45:19 -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
016182c719 am 40abceaa: Merge "Fix DASH movie playback decrypt error" into jb-mr2-dev
* commit '40abceaaed7a1fb4543482db918d5616f244833c':
  Fix DASH movie playback decrypt error
2013-04-14 17:02:55 -07:00
Jeff Tinker
40abceaaed Merge "Fix DASH movie playback decrypt error" into jb-mr2-dev 2013-04-14 23:56:40 +00: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
04f06d47fd am c0dde166: Merge "Widevine CENC drm engine update" into jb-mr2-dev
* commit 'c0dde166445b228d321258470661591dacc964fb':
  Widevine CENC drm engine update
2013-04-12 15:46:20 -07:00
Jeff Tinker
c0dde16644 Merge "Widevine CENC drm engine update" into jb-mr2-dev 2013-04-12 22:39:03 +00: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
072a07d8e8 am 1a93e68a: Merge "Fix for b/8594163 [SelectContentKey(): No key matches key id]" into jb-mr2-dev
* commit '1a93e68a4b40e3d5c1ece7058dc9dc59ff0b798f':
  Fix for b/8594163 [SelectContentKey(): No key matches key id]
2013-04-11 15:26:50 -07:00
Jeff Tinker
1a93e68a4b Merge "Fix for b/8594163 [SelectContentKey(): No key matches key id]" into jb-mr2-dev 2013-04-11 22:18:15 +00:00
Edwin Wong
ea0362c557 am cd7c58be: Removes intermediate proto generated files and cdm library files.
* commit 'cd7c58be4510a7e7ab6ed10125cb07df20867eac':
  Removes intermediate proto generated files and cdm library files.
2013-04-11 14:58:38 -07:00
Jeff Tinker
2f980d7d7e Fix for b/8594163 [SelectContentKey(): No key matches key id]
...when playing clear parts of encrypted content.

Change-Id: I5fb027d22212f07b43deced2da77c98cb3800e7f
2013-04-11 14:14:55 -07:00
Edwin Wong
cd7c58be45 Removes intermediate proto generated files and cdm library files.
Change-Id: I6e22025a3df60adc396209d69dc1332c37b8bc6b
2013-04-10 11:44:40 -07:00
Ying Wang
b8da70af04 am 3711ca87: Merge "Add liblog" into jb-mr2-dev
* commit '3711ca87aee5b721df09b6f40bfb0525b6e561c4':
  Add liblog
2013-04-09 22:21:15 -07:00
Ying Wang
3711ca87ae Merge "Add liblog" into jb-mr2-dev 2013-04-10 05:11:02 +00:00
Ying Wang
34a6f735dd Add liblog
Bug: 8580410
Change-Id: Idf0dba57f4bebc94b0ddd78316ef3450f0f9f21c
2013-04-09 21:35:57 -07:00
Jeff Tinker
3a1dc1588c am 352e7b08: Add end-to-end decryption test with vectors
* commit '352e7b0820f341d74b57c814bfbc3b4c3bd4e413':
  Add end-to-end decryption test with vectors
2013-04-09 14:26:02 -07:00
Jeff Tinker
f7931b252e am 82657631: Widevine CENC drm engine update: enable decryption
* commit '826576315c5f65b72728b5f0114652a8f3d23c35':
  Widevine CENC drm engine update: enable decryption
2013-04-09 14:26:01 -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
826576315c Widevine CENC drm engine update: enable decryption
This import syncs to the widevine git repostiory change
commit ab3e1e43642cf36900f55169597a33f222709fdb

Change-Id: I3a6f1e2969e5fe7ed1ca12f90b0eb0a3b7899835
2013-04-09 13:24:32 -07:00
Jeff Tinker
7954f725e4 am c0f1d675: Fix broken full_x86 and full_mips builds
* commit 'c0f1d6750e06dfd2eb4dfeecba920e34295aa679':
  Fix broken full_x86 and full_mips builds
2013-04-04 20:03:33 -07:00
Jeff Tinker
c0f1d6750e Fix broken full_x86 and full_mips builds
Also cleans up some redundant files.

Change-Id: Id9a18bcb917ae999865f7c5564a72dba27b0ce97
2013-04-04 19:44:27 -07:00
Jeff Tinker
2210aec746 am f3ec8c19: Import updates to the Widevine CENC DRM Plugin
* commit 'f3ec8c19d60627bbee65e115280b93be8b2e0281':
  Import updates to the Widevine CENC DRM Plugin
2013-04-03 20:16:24 -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
6a8ee6d8fa am 998d67fc: Merge "MediaDrm API update" into jb-mr2-dev
* commit '998d67fc8c13e55b895ebbae758cf481e69a9707':
  MediaDrm API update
2013-04-02 16:45:11 -07:00
Jeff Tinker
998d67fc8c Merge "MediaDrm API update" into jb-mr2-dev 2013-04-02 22:49:22 +00:00
Rahul Frias
bfe1e89d46 am 1f9a9a68: (-s ours) am f092fe48: (-s ours) am 296ca2be: am 8f27e0d0: am 26606363: (-s ours) am 67e51538: (-s ours) Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
* commit '1f9a9a6845d2c3e6a394628e04701dbb1080cc01':
  Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
2013-04-01 09:24:21 -07:00
Rahul Frias
1f9a9a6845 am f092fe48: (-s ours) am 296ca2be: am 8f27e0d0: am 26606363: (-s ours) am 67e51538: (-s ours) Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
* commit 'f092fe48e3bfe5b04dd74f972c3198542789fe23':
  Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
2013-04-01 09:22:07 -07:00
Rahul Frias
55ca41135a am 37b5b410: (-s ours) am ab0c859d: (-s ours) am 8b99bc11: am f1cb05e6: Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
* commit '37b5b410a32ef81a4287da31266a4c095a95b250':
  Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
2013-04-01 09:21:04 -07:00
Rahul Frias
f092fe48e3 am 296ca2be: am 8f27e0d0: am 26606363: (-s ours) am 67e51538: (-s ours) Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
* commit '296ca2be0ac30725498fee129e6474a6ec43c274':
  Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
2013-04-01 09:19:23 -07:00
Rahul Frias
296ca2be0a am 8f27e0d0: am 26606363: (-s ours) am 67e51538: (-s ours) Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
* commit '8f27e0d0e10d348e676bd239f01f30428a930f1c':
  Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
2013-04-01 09:17:42 -07:00
Rahul Frias
37b5b410a3 am ab0c859d: (-s ours) am 8b99bc11: am f1cb05e6: Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
* commit 'ab0c859dee43a77f89d15b13b336fe787d9d5b03':
  Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
2013-04-01 09:17:33 -07:00
Rahul Frias
ab0c859dee am 8b99bc11: am f1cb05e6: Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
* commit '8b99bc11f359a86df7849152c0b24700107b9ea0':
  Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
2013-04-01 09:16:07 -07:00
Rahul Frias
8f27e0d0e1 am 26606363: (-s ours) am 67e51538: (-s ours) Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
* commit '26606363cf6ce18c35c2682978913558cedf9b19':
  Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
2013-04-01 09:15:55 -07:00
Rahul Frias
26606363cf am 67e51538: (-s ours) Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
* commit '67e515380539f48063ab977792a0b25dcc37a26d':
  Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
2013-04-01 09:14:30 -07:00
Rahul Frias
8b99bc11f3 am f1cb05e6: Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
* commit 'f1cb05e6b7dfe552ccd62160b74256c6aba2194d':
  Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
2013-04-01 09:14:27 -07:00
Jeff Tinker
9a16115975 MediaDrm API update
Clarify offline usage of sessions and keys and implement
implement CryptoSession to support additional crypto use
cases.

Change-Id: I3788e7b187cd20c4224bf07f3fc6bef48ee38bd6
2013-03-30 16:30:21 -07:00
Rahul Frias
f1cb05e6b7 Add Widevine jb-mr1 libraries for x86 (DO NOT MERGE)
The widevine library version is 4.5.0.10095. This includes,

Correct tool version for x86 jb-mr1 builds
https://widevine-internal-review.googlesource.com/3154

Update Build Script for Android
https://widevine-internal-review.googlesource.com/3340

Fixes to Jenkins build script for Android JBMR1 builds.
https://widevine-internal-review.googlesource.com/3551

Add Android property os.build.fingerprint to license request
https://widevine-internal-review.googlesource.com/3390

b/7594544 - Support x86 build on jb-mr1

Change-Id: Ibb8c172cccf392be217952406fd25666deeaea57
2013-03-29 10:04:43 -07:00