Commit Graph

740 Commits

Author SHA1 Message Date
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
Rahul Frias
67e5153805 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: I99f969470314c37359772de9471315dc5a6565cd
2013-03-29 09:51:12 -07:00
Edwin Wong
1d535c5a11 am fe06ceec: Separate unit and end-to-end tests from the top level makefie.
* commit 'fe06ceec142511fbffed04ed4a760ddf2a68d12c':
  Separate unit and end-to-end tests from the top level makefie.
2013-03-28 16:36:00 -07:00
Edwin Wong
fe06ceec14 Separate unit and end-to-end tests from the top level makefie.
The top level makefile will build license_protocol_protos.a, which is
needed by libcdm.a. Unit and end-to-end tests are now build separately
under cdm/test.

Also, the tests use Google C++ Testing Framework, so please build the
gtest library from external/gtest and run "mm" once before building
the tests.
Or just run "mmma vendor/widevine/libwvdrmengine" (or mma in
vendor/widevine/libwvdrmengine") once.

Change-Id: Iec5a7a974e2f23651191b7325230d9ae3d6b83f2
2013-03-27 11:54:46 -07:00
Jeff Tinker
954ee5eb07 am 1a8aa0dd: Initial import of Widevine Common Encryption DRM engine
* commit '1a8aa0dd05ee6edcdb0694602c64c59d77291a25':
  Initial import of Widevine Common Encryption DRM engine
2013-03-26 10:42:23 -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
Jeff Tinker
e2aa0025ed am 38334efb: Fix build break
* commit '38334efbe79dbca18497b757e378fb408be94ac1':
  Fix build break
2013-03-20 19:46:43 +00:00
Jeff Tinker
38334efbe7 Fix build break
Remove the clear key drm engine as it is no longer needed and
would need to be reworked to be compatible with the new MediaDrm APIs.

Change-Id: Ie33c00345876fcd75f7c9cb0c65bd12bb4152f20
2013-03-20 12:38:58 -07:00
Jean-Baptiste Queru
de914cef6b am ba14f26d: (-s ours) am 627d5384: am 52ab6791: am f2183676: am ac144954: (-s ours) am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit 'ba14f26d7beef38137031595024935449d4ff3b3':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 20:21:26 +00:00
Jean-Baptiste Queru
ba14f26d7b am 627d5384: am 52ab6791: am f2183676: am ac144954: (-s ours) am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '627d5384fa992809a7c218044fabec97116e68ac':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 13:13:15 -07:00
Jean-Baptiste Queru
627d5384fa am 52ab6791: am f2183676: am ac144954: (-s ours) am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '52ab6791986565a5e8102d54e491fac64d0f951c':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 13:00:47 -07:00
Jean-Baptiste Queru
52ab679198 am f2183676: am ac144954: (-s ours) am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit 'f2183676ce5691a310ad4d6d1476731336cf37af':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 12:56:11 -07:00
Jean-Baptiste Queru
f2183676ce am ac144954: (-s ours) am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit 'ac14495401e29b7d94dd6888b542167416304eb1':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 12:47:36 -07:00
Jean-Baptiste Queru
ac14495401 am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit 'bdf5e4739128603632f5ca4804eee7ba4ecf4da9':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 12:37:34 -07:00
Jean-Baptiste Queru
bdf5e47391 Reconcile with jb-mr1-release - do not merge 2013-03-11 12:28:39 -07:00
Jeff Tinker
526ff3f260 Merge "Add More Logging to Sample Player" 2013-02-09 00:00:52 +00:00
Fred Gylys-Colwell
0d5a8ccc7a Move OEMCrypto Mock files to Clear Key Library
In order to match the other implementations of CDM, we are going
to replace the android OEMCrypto mockup with the one in the cdm
repository.

This would be disruptive to the clear key library because it
relies on the current implementation of the mockup.  In order to
prevent that, I am moving the current mockup into the same directory
as the clear key library.  Then, we can put the new mockup under
the directory libwvdrmengine.

This mockup will then be deleted when the clear key library is deleted.

Change-Id: I89ee23f249dacd18241ae5ca499329e620bf5a2c
2013-01-31 09:22:22 -08:00
Fred Gylys-Colwell
b8ff509887 Add More Logging to Sample Player
Because the Widevine Sample Play is frequently used to report bugs, it is
helpful to have users' actions logged.  This change prints to the android log
whenever the user changes settings, clicks play, full screen, acquire rights,
etc.

This code does not change the build and is not delivered to customers.  It is
delivered to vendors.

Change-Id: I62c34c2f1683af881a3c326a48f039b463ca3e8e
2012-12-21 16:35:03 -08:00
Fred Gylys-Colwell
8ab3b10971 Fix UniquePtr Calls
This change corrects some problems with the unit tests and make files
for the libcleardrmengine.

Change-Id: Iafd8aae2ecae3885ad4bbfdf9257bce6f62f98dc
2012-12-21 12:42:39 -08:00
Fred Gylys-Colwell
fede3bffdd Add DecryptCTR to OEMCrypto Mock
This is a software only implementation of the OEMCrypto library for
testing the rest of the DRM code.  It currently implements the
OEMCrypto_DecrtyptCTR function using a clear key.

I've included the license request code so the rest of the group can
play with it, but I have only tested part of it.

This patch also has some makefiles and an integration testing.  You
should be able to generate the shared library libclearkeydrmengine.so with
cd vendor/widevine/libclearkeydrmengine; mm
You can create some unit test and integration test programs from the
directories:
vendor/widevine/libwvdrmengine/oemcrypto/test
vendor/widevine/libclearkeydrmengine/test
vendor/widevine/libclearkeydrmengine/inttest
vendor/widevine/libclearkeydrmengine/crypto/test

This change also addresses some comments about comments in OEMCryptoDASH.h
which were made in https://googleplex-android-review.googlesource.com/257323

Change-Id: Id6899b9f8d2f09e09be2ea493baa83a6b929073b
2012-12-21 12:41:42 -08:00
John "Juce" Bruce
04bfbb0198 Initial Clear Key DRM Engine
Adds the initial pieces of a sample DRM Engine that accepts keys in the clear
through the decrypt call instead of using the DrmClientPlugin and its key
ladder.  This is to help unblock teams writing code that consumes DRM Engines
while Widevine continues working their real DRM engine.  This is based on the
in-progress Widevine DRM Engine.

This change contains the DRM Engine glue pieces (.so entry point,
DrmPluginFactory, etc.) and a CryptoPlugin implementation.  However, said
CryptoPlugin will not work until an implementation of OEMCrypto is provided
in a future checkin and the CryptoPlugin is hooked up to it.

For ease of loading, this library also implements the old CryptoFactory
interface and entry point.

If asked to create a CryptoPlugin with no data, it will defer to the old
Widevine Crypto Plugin.

Change-Id: I0bfbec7e32439a50a2956488dd970284f0075e61
2012-12-21 12:40:06 -08:00
Fred Gylys-Colwell
d5aa1e41d3 Threading Contract and Error Messages
I added a few error codes for out-of-resource type conditions.

I added comments explain which functions may be called simultaneously.

Basically, info only functions, like getDeviceId, may be called anytime after
initialization.  Functions that have a session parameter may be called at the
same time as other functions for a different session, but not for the same session.
Functions that create or delete sessions may not be called as the same time as any
each other, or at the same time as any session functions.  The CDM is required to
honor these conventions.

If the OEM can only decrypt for one session at a time, it is the OEM's
responsibility to hold a lock.

Change-Id: If4b11afd70b5b2e67d78802ea0057fb25271ae90
2012-12-05 15:58:55 -08:00
Fred Gylys-Colwell
03d43a5d2d Merge "Separate OEMCrypto DASH from Legacy OEMCrypto" 2012-12-04 14:32:35 -08:00
Fred Gylys-Colwell
4529037bd8 Separate OEMCrypto DASH from Legacy OEMCrypto
The file OEMCrypto.h was renamed to OEMCryptoDASH.h and all
functions that are only needed for legacy support were removed.

Change-Id: I3a7a6f8cbb3ee415b4a313416a25ed78785ecdd7
2012-12-04 13:48:52 -08:00
Edwin Wong
eebba73ce1 Merge "Add ContentDecryptionModule API" 2012-12-04 12:31:39 -08:00
Fred Gylys-Colwell
d74290cc9f Update OEMCrypto.h
This change incorporates updates to the Eureka version of
OEMCrypto.h as documented here:
     https://widevine-internal-review.googlesource.com/2334

Change-Id: I52abde82cbea9b30b74e9c2292e401d5318df99d
2012-12-03 14:17:53 -08:00
Rahul Frias
9a7e424596 Add ContentDecryptionModule API
This header file documents the interface of the ContentDecryptionModule
and the CDM client.

b7615806

Change-Id: I9a036ec5539f7e5b66adb8a6a4326120624d1b30
2012-12-02 22:49:02 -08:00
Fred Gylys-Colwell
8199f94e35 Merge "Add Mock OEMCrypto Stub" 2012-11-30 14:18:02 -08:00
Fred Gylys-Colwell
684eb227d4 Add Mock OEMCrypto Stub
I added a Mock OEMCrypto implementation with stubs only.

I corrected the "extern C" location in OEMCrypto.h. (Thanks, Jerry!)

I added some Android.mk files that allows us to compile and
run a few simple unit tests.

Unit Test 1: The library compiles. (passes)
Unit Test 2: The test program links and runs. (passes)

Change-Id: Ib4c9554553de49645b5841b0bae889728cbfc8b1
2012-11-30 12:41:10 -08:00