Commit Graph

768 Commits

Author SHA1 Message Date
Jeff Tinker
4bce2959ef Allow PSSH data to be unspecified on license renewal
Currently the CDM requires the caller to specify init data both on key
generation and renewal requests. With this change the CDM relaxes
this requirement for renewals.

Bug: 8732893

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

Change-Id: Idf4ad2bdb20023da4f30bc369ed87eb811c1c4d9
2013-04-30 17:32:20 -07:00
Jeff Tinker
b9bc49e796 am d291efc8: Update Integration Documentation
* commit 'd291efc823f93b67c3562ebeca9feb31779eed01':
  Update Integration Documentation
2013-04-25 22:01:35 -07:00
Jeff Tinker
18dd7dc6e2 am 665c9c15: Verify version number of Level 1 OEMCrypto before using it
* commit '665c9c1525cd0474e58902e03ce6f19f7377e42c':
  Verify version number of Level 1 OEMCrypto before using it
2013-04-25 21:26:45 -07:00
Jeff Tinker
d291efc823 Update Integration Documentation
This CL updates to the latetest Widevine Integration document.

bug: 8698129

Merge of https://widevine-internal-review.googlesource.com/#/c/5330/
from the Widevine CDM repo.

Change-Id: I3f0ce88915057285ce6de80582d75a0514b92f79
2013-04-25 17:25:12 -07:00
Jeff Tinker
f2184621fb am 63c597d3: Update path to Widevine MediaDrm engine credentials
* commit '63c597d330f6dddf9fc77ba8d7605a8071b151c7':
  Update path to Widevine MediaDrm engine credentials
2013-04-25 16:57:34 -07:00
Jeff Tinker
8dba5d9028 am e8575212: Merge "Add Widevine Security Integration Guide to tree" into jb-mr2-dev
* commit 'e8575212b676857018beaa7e3159aaacc614aece':
  Add Widevine Security Integration Guide to tree
2013-04-25 16:57:34 -07:00
Jeff Tinker
665c9c1525 Verify version number of Level 1 OEMCrypto before using it
There is an OEMCrypto wrapper that loads the OEM provided library.
For debugging and initial implementation, this only verified that some
of the API existed before continuing.
With this CL, the level 1 library is not used if any of the API
functions are missing, or if the version number is not correct.  There
is no plan to make this library backwards compatible.

bug: 8621521

Merge of https://widevine-internal-review.googlesource.com/#/c/5264/
from the Widevine CDM repo.

Change-Id: Ie82907925450b9fe93d0d857c1133f5382f55d21
2013-04-25 14:48:19 -07:00
Jeff Tinker
63c597d330 Update path to Widevine MediaDrm engine credentials
Use separate directories for unit test-generated
credentials vs actual credentials, so the unit test
credentials don't interfere with the real ones.

related-to-bug: 8620943

Merge of:

Update path to where CDM persistently stores data
https://widevine-internal-review.googlesource.com/#/c/5300/

Rename Keybox File
https://widevine-internal-review.googlesource.com/#/c/5240/

... from the widevine CDM repo.

Change-Id: Idefa484b3a2f71f723238f033460bf431ce4209b
2013-04-25 14:12:11 -07:00
Jeff Tinker
e8575212b6 Merge "Add Widevine Security Integration Guide to tree" into jb-mr2-dev 2013-04-25 20:59:52 +00:00
Jeff Tinker
d1e2925cf0 Add Widevine Security Integration Guide to tree
Having the integration docs in the tree helps with version
management and distribution to partners.

bug: 8698129
Change-Id: I4c1e4f5902457815eaf58e6bd5313951d2b773ca
2013-04-25 13:54:27 -07:00
Jeff Tinker
d77ac8ef55 am 187d3e94: Translate Some CDM Errors as Events
* commit '187d3e94e8346461deac96bb694dc34083fea1a5':
  Translate Some CDM Errors as Events
2013-04-25 06:25:33 -07:00
Jeff Tinker
187d3e94e8 Translate Some CDM Errors as Events
The CDM may use the eventing mechanism or the error return-value mechanism to
notify callers of errors that the Java APIs expect to be passed via the
eventing mechanism.  We need to detect when an error has been synchronously
returned via the error return value of a method and fire an appropriate event.

bug: 8620943

Merge of https://widevine-internal-review.googlesource.com/#/c/5261/
from the Widevine CDM repo.

Change-Id: I2055854dc960845dc775b1fceab9d0850b63fbb5
2013-04-25 06:14:37 -07:00
Jeff Tinker
b9332f746f am 15cf441d: Fix RefreshKey Test
* commit '15cf441d17e98f5d0b89f2510b8f852a7108d298':
  Fix RefreshKey Test
2013-04-25 06:13:04 -07:00
Jeff Tinker
15cf441d17 Fix RefreshKey Test
The test for refresh keys with a stale nonce was not performed
correctly.  It was supposed to test that RefreshKeys fails when the
nonce is stale.  However, the nonce in the test was not stale. The reference
implementation did fail, but it failed because the control bits were
in network byte order instead of host byte order.  Both of these
problems are fixed in this CL.
This CL changes test code only.  The change has already been
communicated with Qualcomm.

bug: 8621521

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

Change-Id: I0821eff914d1680481006b9b68d49e8f2c5b9cd8
2013-04-25 06:00:23 -07:00
Jeff Tinker
3c6d27bda7 am f702e509: Update java MediaDrm API test to cover more of the API
* commit 'f702e5091979714d93ffc3f79f8d40af13442a6a':
  Update java MediaDrm API test to cover more of the API
2013-04-25 05:45:11 -07:00
Jeff Tinker
8f2ae174a0 am b5a782bd: Changes JSON format for provisioning request and response to match server change.
* commit 'b5a782bdb22cb5698302665640f72cdc0b753f84':
  Changes JSON format for provisioning request and response to match server change.
2013-04-25 05:45:11 -07:00
Jeff Tinker
ec4826fa21 am f2406daa: Use /data/mediadrm for MediaDrm plugin-related storage
* commit 'f2406daae137f66132244a61cf9cc1738259d252':
  Use /data/mediadrm for MediaDrm plugin-related storage
2013-04-25 05:45:10 -07:00
Jeff Tinker
5f0735d18a am b7debfe2: Enable certificate based licensing
* commit 'b7debfe2a13a9f83c11823582cb710961d826085':
  Enable certificate based licensing
2013-04-25 05:41:54 -07:00
Jeff Tinker
f702e50919 Update java MediaDrm API test to cover more of the API
bug: 8620943
Change-Id: I72b690cfcd838064a470042e0943a711cc536207
2013-04-25 05:34:39 -07:00
Jeff Tinker
b5a782bdb2 Changes JSON format for provisioning request and response to match server change.
This new format uses the SignedProvisioningMessage proto buffer definition so
the client does not have to parse the message and signature from the JSON
response separately. This change makes it more flexible to extend the fields
in the SignedProvisioningMessage.
Adds Apiary API key to the default provisioning server url.
Fixes a bug in GetCertRequestResponse() where a LOGD() can generate a
fault if there is no response data.

Bug: 8620943

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

Change-Id: I4945ee2d16f88666e41edf990dd07102a9271105
2013-04-25 03:34:31 -07:00
Jeff Tinker
f2406daae1 Use /data/mediadrm for MediaDrm plugin-related storage
related-to-bug: 8702754

Merge of:

Rename Keybox File
https://widevine-internal-review.googlesource.com/#/c/5240/

Store persistent data in /data/mediadrm
https://widevine-internal-review.googlesource.com/#/c/5234/

...from Widevine CDM repository

Change-Id: I4030257942e572e6f42cc8f32872a6409d9e3892
2013-04-24 22:10:44 -07:00
Jeff Tinker
b7debfe2a1 Enable certificate based licensing
Includes fixes for provisioning and license renewal signature generation.

bug: 8620943

Merge of:
  https://widevine-internal-review.googlesource.com/#/c/5231/
  https://widevine-internal-review.googlesource.com/#/c/5200/

from the Widevine CDM repository.

Change-Id: I2928c9d59ad5337ca34b4ef7ed58272d34755d2d
2013-04-24 22:08:02 -07:00
Jeff Tinker
cb17413d7e am 4b0963de: Update MediaDrmAPI test to use boxless-pssh
* commit '4b0963de960e68d62a7b633ba8c56529efad717c':
  Update MediaDrmAPI test to use boxless-pssh
2013-04-24 14:46:53 -07:00
Jeff Tinker
4b0963de96 Update MediaDrmAPI test to use boxless-pssh
bug: 8584241

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

Change-Id: I3596e41a67df44e25c9b31c4c16d4c3d9b7ad92a
2013-04-24 14:29:27 -07:00
Jeff Tinker
28fad98dc1 am 8f7ed34c: Wrap Init Data in PSSH Box
* commit '8f7ed34c3adff12755f9f4d5c4905353c7301308':
  Wrap Init Data in PSSH Box
2013-04-23 18:24:42 -07:00
Jeff Tinker
8f7ed34c3a Wrap Init Data in PSSH Box
The Java APIs only easily expose getting the PSSH data blob, not the full PSSH
box.  So that apps do not have to do extra work, wrapping the PSSH data blob in a
PSSH box again, we do it for them in the DrmPlugin.

Includes requisite changes to the Unit tests

Bug: 8584241

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

Change-Id: Ifb5910dd52380e1b591ecdf1e4273c8d9f3294cc
2013-04-23 16:38:17 -07:00
Jeff Tinker
d68682f951 am 1aff209f: Field provisioning for L3 OEMCrypto
* commit '1aff209f91cc11a31397f6d30e491028b30d1254':
  Field provisioning for L3 OEMCrypto
2013-04-23 15:58:33 -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
3eec26422f am 958bbe6d: Certificate provisioning verification
* commit '958bbe6d051fb787e620b456a3d190cf68285ac6':
  Certificate provisioning verification
2013-04-23 11:16:39 -07:00
Jeff Tinker
60e01fe8b0 am 3a28eeeb: Part of Qualcomm L1 OEMCrypto integration on mako
* commit '3a28eeeb684c5eee84f2627d10325a58df5c9ae8':
  Part of Qualcomm L1 OEMCrypto integration on mako
2013-04-23 11:16:39 -07:00
Jeff Tinker
c6c953656c am e4181922: Merge "Increment IV in WVCryptoPlugin" into jb-mr2-dev
* commit 'e4181922af3ea0f254009aacd1a98fce9c65281c':
  Increment IV in WVCryptoPlugin
2013-04-23 11:16:38 -07:00
Jeff Tinker
505b698032 am 039822d4: Merge "Part of Qualcomm L1 OEMCrypto integration" into jb-mr2-dev
* commit '039822d4cba197e3ed0bb1a62b21b5f80678174b':
  Part of Qualcomm L1 OEMCrypto integration
2013-04-23 11:16:38 -07:00
Rahul Frias
d9269d6099 am a2eeb8ab: Native fault in MediaDrm property call
* commit 'a2eeb8abf7ce9ee633ec72e4086ff103a57848d6':
  Native fault in MediaDrm property call
2013-04-23 11:16:38 -07:00
Jeff Tinker
e3624caed4 am bb0c6276: Merge "Don\'t add offsets to ion handles" into jb-mr2-dev
* commit 'bb0c62768a6072385aaae7b370c9842eadccca9d':
  Don't add offsets to ion handles
2013-04-23 11:16:37 -07:00
Jeff Tinker
9c18305f81 am 36aeacde: Optimize Status Queries in WVCryptoPlugin By Deleting Them
* commit '36aeacde48f1f3eb68d17c3247e011e97058c2ff':
  Optimize Status Queries in WVCryptoPlugin By Deleting Them
2013-04-23 11:16:37 -07:00
Jeff Tinker
958bbe6d05 Certificate provisioning verification
bug: 8620943

This is a merge of changes made to the Widevine CDM
repository during certificate provisioning verification.

The following changes are included:

Fixes for certificate based licensing
https://widevine-internal-review.googlesource.com/#/c/5162/

Base64 encode and decode now handles non-multiple of 24-bits input
https://widevine-internal-review.googlesource.com/#/c/4981/

Fixed issues with device provisioning response handling
https://widevine-internal-review.googlesource.com/#/c/5153/

Persistent storage to support device certificates
https://widevine-internal-review.googlesource.com/#/c/5161/

Enable loading of certificates
https://widevine-internal-review.googlesource.com/#/c/5172/

Provide license server url
https://widevine-internal-review.googlesource.com/#/c/5173/

Change-Id: I0c032c1ae0055dcc1a7a77ad4b0ea0898030dc7d
2013-04-22 20:12:03 -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
Jeff Tinker
039822d4cb Merge "Part of Qualcomm L1 OEMCrypto integration" into jb-mr2-dev 2013-04-22 23:20:14 +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
Rahul Frias
a2eeb8abf7 Native fault in MediaDrm property call
OEMCrypto was being initialized on session creation. Calls to
get property information may occur before any sessions are
created. This resulted in calls to OEMCrypto before a call to
OEMCrypto_Initialize which caused a segfault.

OEMCrypto initialization is now verified before any other calls are made.
Unit tests have been modified to verify that this indeed works.

bug: 8660973

Change-Id: I1b14fa8ad2e88750776b28715a48d8a1d1c57089
2013-04-20 23:52:50 -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
5f53c08d53 am 87c3f565: Merge "Unit test script and end-to-end license/decrypt test update" into jb-mr2-dev
* commit '87c3f5652fdd9d50262da79bd6c7d4e0d70cb5cc':
  Unit test script and end-to-end license/decrypt test update
2013-04-18 19:26:03 -07:00
Jeff Tinker
87c3f5652f Merge "Unit test script and end-to-end license/decrypt test update" into jb-mr2-dev 2013-04-19 02:19:55 +00:00
Jeff Tinker
8913bdd5ae am d601914d: Don\'t set BufferType to clear for non-encrypted buffers
* commit 'd601914d57d6f3759c7ef8d561c56f3e13738e02':
  Don't set BufferType to clear for non-encrypted buffers
2013-04-18 18:51:15 -07:00
Jeff Tinker
d601914d57 Don't set BufferType to clear for non-encrypted buffers
When non-encrypted buffers are sent to OEMCrypto_DecryptCTR,
the cdm is overriding the buffer type to be non-secure.  This
is incorrect, the encrypted state is not the same as the buffer
protection level.

This change removes the special case override that should not
be there.

bug: 8621521
Change-Id: I705b1dc82b393305b9e6bdcb524d6b8126f58d3d
2013-04-18 18:23:21 -07:00
Jeff Tinker
3c58b56b6e am cd304b1c: Use Standard Errors in DrmPlugin
* commit 'cd304b1c4687d7bdebadfd994383ff99c812d58c':
  Use Standard Errors in DrmPlugin
2013-04-18 17:57:34 -07:00