Commit Graph

963 Commits

Author SHA1 Message Date
Rahul Frias
e894774942 Correct CancelKeyRequest behavior
[ Merge of https://widevine-internal-review.googlesource.com/#/c/10659/
  from the widevine cdm repo. ]

CdmEngine::CancelKeyRequest would earlier release keys by closing and
reopening a crypto session. Behavior has been changed to just close
the session.

b/15984869

Change-Id: I92a1f82fd4a97b5510596d4bc69bf07406cee606
2014-07-21 14:36:50 -07:00
Fred Gylys-Colwell
a19a965fb7 Close session after provisioning
Merge of CDM change:
https://widevine-internal-review.googlesource.com/#/c/10691/

This prevents the provisioning session from being created unless the
device needs provisioning.  And then, after provisioning, it closes
the session it had previously opened.

b/15782159 CertificateProvisioning object keeps unused CryptoSession

Change-Id: Ic52ed864fa47c7ba50b7ca4d9fea1e74930228e9
2014-07-18 13:54:42 -07:00
Lajos Molnar
174a218b30 Support nonblocking reads for secure source (video)
Bug: 15699665
Change-Id: If67c3196b42b24333ace1373711dc3f4eb30f0da
2014-07-17 20:32:28 -07:00
Fred Gylys-Colwell
b8003f12b4 Streamline cast certificate loading
This CL adds special code to create a session and sign a
message with an RSA key without initializing the full session.

This is to fix:
b/16130551 Molly does not show up in CAST device list

Change-Id: I4a14b312ef67e666c7c9504fe8135c6924be4c0d
2014-07-14 20:11:16 -07:00
Rahul Frias
7a933ee48e Merge of usage reporting and license changes from WV CDM repo
* CdmSession unittest and license request time changes
  b/15914199
  Merge of https://widevine-internal-review.googlesource.com/#/c/10597/

* Specify OEMCrypto API version in client capabilities
  b/15388863
  Merge of https://widevine-internal-review.googlesource.com/#/c/10616/

* Report start and last play time in license request
  b/15995227
  Merge of https://widevine-internal-review.googlesource.com/#/c/10617/

* Respect can_play flag
  b/15330338
  Merge of https://widevine-internal-review.googlesource.com/#/c/10619/

* Restore offline session information
  b/16009274
  Merge of https://widevine-internal-review.googlesource.com/#/c/10641/

Change-Id: I17fdc309efbc1d44385a86a368df11b1349b29c2
2014-07-02 17:17:38 -07:00
Fred Gylys-Colwell
9b4da994ec Merge "Build Level 3 Haystack for Android MIPS" 2014-07-02 19:00:44 +00:00
Rahul Frias
b18b2784bc Downgrade Property Set Errors to Warnings
(This is a merge of
https://widevine-internal-review.googlesource.com/#/c/10630/
from the Widevine CDM Repo.)

We get a fair bit of noise from bug-filers who are concerned about
several non-critical errors that show up when using our CDM without
property sets. This CL removes these logs since it falls within the range
of expected behavior.

Bug: 15136575
Change-Id: Iad4eb638b03db0104b202b59b367d344c05ead5a
2014-07-02 16:22:13 -07:00
Fred Gylys-Colwell
d5f06554b3 Build Level 3 Haystack for Android MIPS
Merge of Widevine CDM change:
https://widevine-internal-review.googlesource.com/#/c/10644/

android/level3/mips/libwvlevel3.a  NONOB Level3 Library Jul  2 2014 11:40:23
android/level3/x86/libwvlevel3.a  Level3 Library May 16 2014 23:14:03
android/level3/arm/libwvlevel3.a  Level3 Library Jul  2 2014 12:34:56

bug: 15186272
Change-Id: I9d89476f20a69a66849a20f7b9b6be0d6175578b
2014-07-02 14:22:30 -07:00
Fred Gylys-Colwell
12edc84be8 Merge changes If26ecc5d,I8ae472f1
* changes:
  Correct ExoPlayer version
  Match GenerateRSASignature unit test code with actual code
2014-07-02 18:50:12 +00:00
Fred Gylys-Colwell
302b38e6a2 Correct ExoPlayer version
The previous merge copied the wrong version of Exoplayer.

Change-Id: If26ecc5dc6c3374b6482bd619eafa7432f92f185
2014-07-02 14:14:01 -07:00
John "Juce" Bruce
4b8dd050bf Downgrade Non-Critical Errors to Warnings
We are getting a lot of noise from Android bug-filers who are
concerned about several non-critical errors that show up when using
Widevine CDM on some devices or in some use cases. To mitigate this,
we are downgrading these errors to warnings.

Some of these errors pertained to our legacy support. To make sure
an error IS logged if problems with legacy support become critical,
a new error has been added to that code path.

Bug: 15136575
Change-Id: Id28bcf507f277a5d2f35a14da71bba2b118a54fe
2014-07-01 16:24:39 -07:00
Fred Gylys-Colwell
86f945e8e2 Match GenerateRSASignature unit test code with actual code
Merge of Widevine CDM change:
https://widevine-internal-review.googlesource.com/#/c/10620/

bug: 15829029
Change-Id: I8ae472f1f72f9a260de3e9443b104bea27ab6eb3
2014-07-01 15:42:30 -07:00
Rahul Frias
2ec3049bda CDM workarounds for OEMCrypto issues
Merge of https://widevine-internal-review.googlesource.com/#/c/10614/
from the widevine cdm repo.

* b/15467844 - GenerateRSASignature returns OEMCrypto_ERROR_INVALID_CONTEXT
  when called with a non-NULL signature pointer and signature length of
  0 (rather than OEMCrypto_ERROR_SHORT_BUFFER)
* b/15989260 - OEMCrypto_DecryptCTR does not return OEMCrypto_ERROR_KEY_EXPIRED
  after keys have expired

Also addresses
* integration test updated to reflect that loading certificate errors are
  returned on OpenSession rather than GenerateKeyRequest
* compiler warning on type casting

b/15989261

Change-Id: Ib68b972651479e99b9d05de4493aac55a96c4f39
2014-07-01 13:30:23 -07:00
Fred Gylys-Colwell
2c0b1d6142 Merge "Merge Changes from CDM repository" 2014-07-01 19:22:38 +00:00
Fred Gylys-Colwell
b5e8b87fed Merge Changes from CDM repository
This CL merges the following changes from the Widevine repository:

Avoid CdmSession reinitialization
https://widevine-internal-review.googlesource.com/#/c/10530/

Fix timer-related unit tests.
https://widevine-internal-review.googlesource.com/#/c/10510/

Correct return statement
bug: 15590802
https://widevine-internal-review.googlesource.com/#/c/10553/

Usage reporting fixes
bug/15388863
https://widevine-internal-review.googlesource.com/#/c/10460/

Make public methods virtual
https://widevine-internal-review.googlesource.com/#/c/10500/

Fix the SetTimer contract in the CDM.
https://widevine-internal-review.googlesource.com/#/c/10493/

Move inline CDM methods, add OVERRIDE.
https://widevine-internal-review.googlesource.com/#/c/10475/

Simplify storage APIs related cleanup.
https://widevine-internal-review.googlesource.com/#/c/10473/

Duration values are not correctly reported when queried
b/15592374
https://widevine-internal-review.googlesource.com/#/c/10437/

Propagate IsKeyValid() through ContentDecryptionModule.
https://widevine-internal-review.googlesource.com/#/c/10483/

Minor clean up in config_test_env.
https://widevine-internal-review.googlesource.com/#/c/10440/

General clean up.
https://widevine-internal-review.googlesource.com/#/c/10441/

Refactor HttpSocket and simplify UrlRequest interface.
https://widevine-internal-review.googlesource.com/#/c/10410/

Install good keybox at end of unit tests
b/15385981
https://widevine-internal-review.googlesource.com/#/c/10374/

Privacy crypto fixes
b/15475012
https://widevine-internal-review.googlesource.com/#/c/10383/

Incorporate header files to resolve build issued based on customers feedback.
https://widevine-internal-review.googlesource.com/#/c/10420/

Support unprovisioning
b/12247651
https://widevine-internal-review.googlesource.com/#/c/10356/

Correct usage of Host::Allocate and Cdm::Decrypt.
https://widevine-internal-review.googlesource.com/#/c/10378/

Fix logging bug, arguments in wrong order.
https://widevine-internal-review.googlesource.com/#/c/10380/

Rename types that look like constants.
https://widevine-internal-review.googlesource.com/#/c/10379/

Fix offline test failures
b/13909635
https://widevine-internal-review.googlesource.com/#/c/10348/

Add -DUNIT_TEST to the unit test makefile for Android
https://widevine-internal-review.googlesource.com/#/c/10375/

Refactor privacy-crypto and add dummy version.
https://widevine-internal-review.googlesource.com/#/c/10353/

Remove References to Apiary
https://widevine-internal-review.googlesource.com/#/c/9924/

Delete oldest entry in usage table when full
bug: 15184824
https://widevine-internal-review.googlesource.com/#/c/10295/

Port DeviceFiles to iOS.
https://widevine-internal-review.googlesource.com/#/c/10355/

Make testing functions in DeviceFiles private.
https://widevine-internal-review.googlesource.com/#/c/10354/

Add RSA encryption to haystack
https://widevine-internal-review.googlesource.com/#/c/10280/

Add string and vector includes to CDM header.
https://widevine-internal-review.googlesource.com/#/c/10352/

First version of oemcrypto logging
https://widevine-internal-review.googlesource.com/#/c/10252/

Update Names of Secure Stop Methods
bug: 11987015
https://widevine-internal-review.googlesource.com/#/c/10152/

Adjust timing on the Usage Table unit test
https://widevine-internal-review.googlesource.com/#/c/10307/

Fix all compiler warnings in CDM source release.
https://widevine-internal-review.googlesource.com/#/c/10293/

Fix memset bug: args in wrong order
https://widevine-internal-review.googlesource.com/#/c/10292/

Partial revert of 'Remove refs to test prov server, Level3 support...'
https://widevine-internal-review.googlesource.com/#/c/10281/

Pack structure OEMCrypto_PST_Report
https://widevine-internal-review.googlesource.com/#/c/10243/

Remove refs to test prov server, Level3 support; remove dead code
https://widevine-internal-review.googlesource.com/#/c/10220/

Partial revert of 'Document data strings; clean up license server parameters.'
https://widevine-internal-review.googlesource.com/#/c/10188/

Document data strings; clean up license server parameters.
https://widevine-internal-review.googlesource.com/#/c/10120/

Fix broken build after partner branch merge.
https://widevine-internal-review.googlesource.com/#/c/10181/

TODO Cleanup - core/src, core/include
https://widevine-internal-review.googlesource.com/#/c/9965/

TODO Cleanup - cdm, chromium, core/test.
https://widevine-internal-review.googlesource.com/#/c/9419/

Remove unneeded properties.
https://widevine-internal-review.googlesource.com/#/c/10162/

Change-Id: If2bb9d743a562a3875bebb91933c0aaadea286b2
2014-06-27 18:59:56 +00:00
Jeff Tinker
b3a031ded1 Handle ResourceBusyException from MediaDrm.openSession
Change-Id: I21dc9b194ba1195fd28071cdd213cae489b67387
related-to-bug: 13792521
2014-06-26 08:59:02 -07:00
Jeff Tinker
8a8feb747c am ccc0ebc4: am ec3cf9d1: am 54155e3d: am 9a9da0e0: Update license and content server URLs due to server migration.
* commit 'ccc0ebc470f2178339ff7c18a38ff2f763011edc':
  Update license and content server URLs due to server migration.
2014-06-19 00:40:40 +00:00
Jeff Tinker
ccc0ebc470 am ec3cf9d1: am 54155e3d: am 9a9da0e0: Update license and content server URLs due to server migration.
* commit 'ec3cf9d12b77f118229f1994a0f84a6a346063ce':
  Update license and content server URLs due to server migration.
2014-06-19 00:31:05 +00:00
Jeff Tinker
ec3cf9d12b am 54155e3d: am 9a9da0e0: Update license and content server URLs due to server migration.
* commit '54155e3d6892280a84043effa67116851e9f86df':
  Update license and content server URLs due to server migration.
2014-06-19 00:27:19 +00:00
Jeff Tinker
54155e3d68 am 9a9da0e0: Update license and content server URLs due to server migration.
* commit '9a9da0e040ee73fb38375e0a27be4e021d8887d5':
  Update license and content server URLs due to server migration.
2014-06-19 00:23:09 +00:00
Jeff Tinker
9a9da0e040 Update license and content server URLs due to server migration.
Only affects OEM integration tests, not production code.

bug: 15600077
Change-Id: Id534cec663366f639d934baf8d366615a2d97b64
(cherry picked from commit a53677d27c)
2014-06-17 11:46:37 -07:00
Jeff Tinker
2a5754f338 Revert "Update license and content server URLs due to server migration."
This reverts commit a53677d27c.

Change-Id: I9afbc9aa95cc0cf518ef1fd378dccdc5874afaa4
2014-06-17 17:59:40 +00:00
Jeff Tinker
a53677d27c Update license and content server URLs due to server migration.
Only affects OEM integration tests, not production code.

bug: 15600077
Change-Id: Id534cec663366f639d934baf8d366615a2d97b64
2014-06-13 14:09:31 -07:00
Edwin Wong
0b6b0372c0 am f6dd49f0: am 9ba13504: am cf4cd549: am 1c68225d: am 50bfcfdb: am e8fbb466: am 8daed73e: am 4f962df0: am c1dee5d8: am 35ebeec7: am f6ffee47: Fixed intermittent failure in GTS test.
* commit 'f6dd49f04a81cde7d4e241c15f8b2b2328bf9d9e':
  Fixed intermittent failure in GTS test.
2014-06-11 22:51:28 +00:00
Edwin Wong
f6dd49f04a am 9ba13504: am cf4cd549: am 1c68225d: am 50bfcfdb: am e8fbb466: am 8daed73e: am 4f962df0: am c1dee5d8: am 35ebeec7: am f6ffee47: Fixed intermittent failure in GTS test.
* commit '9ba13504396cc6a98e610894df8efb1f4fdc208f':
  Fixed intermittent failure in GTS test.
2014-06-11 22:45:09 +00:00
Edwin Wong
9ba1350439 am cf4cd549: am 1c68225d: am 50bfcfdb: am e8fbb466: am 8daed73e: am 4f962df0: am c1dee5d8: am 35ebeec7: am f6ffee47: Fixed intermittent failure in GTS test.
* commit 'cf4cd54924ee8b157b97f24696613d9edbe26570':
  Fixed intermittent failure in GTS test.
2014-06-11 22:40:34 +00:00
Edwin Wong
cf4cd54924 am 1c68225d: am 50bfcfdb: am e8fbb466: am 8daed73e: am 4f962df0: am c1dee5d8: am 35ebeec7: am f6ffee47: Fixed intermittent failure in GTS test.
* commit '1c68225dac88b0fe75b11a651613dc776f471ea8':
  Fixed intermittent failure in GTS test.
2014-06-11 22:35:46 +00:00
Edwin Wong
1c68225dac am 50bfcfdb: am e8fbb466: am 8daed73e: am 4f962df0: am c1dee5d8: am 35ebeec7: am f6ffee47: Fixed intermittent failure in GTS test.
* commit '50bfcfdbf8218fe878d5c135a27879d8977c5092':
  Fixed intermittent failure in GTS test.
2014-06-11 22:25:08 +00:00
Edwin Wong
50bfcfdbf8 am e8fbb466: am 8daed73e: am 4f962df0: am c1dee5d8: am 35ebeec7: am f6ffee47: Fixed intermittent failure in GTS test.
* commit 'e8fbb466028620f216f6ae698835a0af848f888a':
  Fixed intermittent failure in GTS test.
2014-06-11 22:21:20 +00:00
Edwin Wong
e8fbb46602 am 8daed73e: am 4f962df0: am c1dee5d8: am 35ebeec7: am f6ffee47: Fixed intermittent failure in GTS test.
* commit '8daed73ef7305c95abd28cd27c5bd13b3ae8b936':
  Fixed intermittent failure in GTS test.
2014-06-11 22:19:12 +00:00
Edwin Wong
8daed73ef7 am 4f962df0: am c1dee5d8: am 35ebeec7: am f6ffee47: Fixed intermittent failure in GTS test.
* commit '4f962df0b93564d3dbf62855279e2ea2ac4f1191':
  Fixed intermittent failure in GTS test.
2014-06-11 22:15:56 +00:00
Edwin Wong
4f962df0b9 am c1dee5d8: am 35ebeec7: am f6ffee47: Fixed intermittent failure in GTS test.
* commit 'c1dee5d84735b41dfd92f956418b833e1842a2be':
  Fixed intermittent failure in GTS test.
2014-06-11 22:12:24 +00:00
Edwin Wong
c1dee5d847 am 35ebeec7: am f6ffee47: Fixed intermittent failure in GTS test.
* commit '35ebeec71f3f0d0b763f1ef8cf3b98bae2aeee2e':
  Fixed intermittent failure in GTS test.
2014-06-11 22:08:36 +00:00
Edwin Wong
35ebeec71f am f6ffee47: Fixed intermittent failure in GTS test.
* commit 'f6ffee472c33b85d21c820862c398406e1c964b5':
  Fixed intermittent failure in GTS test.
2014-06-11 22:05:25 +00:00
Edwin Wong
f6ffee472c Fixed intermittent failure in GTS test.
Need to clear mEncKey in constructor, otherwise, decrypted data is wrong.

bug: 15540382
Change-Id: I0e2d4d6edd8a5800fa2a36e9f258782edc493e13
2014-06-11 11:39:28 -07:00
Jeff Tinker
83e860f3aa Merge "Fix offline test failures" into lmp-preview-dev 2014-06-02 17:23:24 +00:00
Jeff Tinker
0c4784d591 Merge "Fix AUPT: Native crash in /system/bin/mediaserver" into lmp-preview-dev 2014-06-02 17:21:39 +00:00
Jeff Tinker
4af7ac78a3 Fix offline test failures
GPlay offline tests were failing due to additional query parameters that were
introduced with b12789275. Additional changes caused offline failures,
as the content pointed to by the test vectors was HD only and did not
allow for offline playback.

This addresses the problem by switching request license tests to point to UAT.
UAT is now the default license server destination for request license tests.
Test vectors for GPlay will be added back as a secondary option when they
are available.

b/13909635

Merge of https://widevine-internal-review.googlesource.com/#/c/10261/
from the widevine cdm repo.

Change-Id: I5e5a2b477b6d591747123e8eeb3cd00b7f762090
2014-06-02 17:04:20 +00:00
Jeff Tinker
aefd8f323a Merge "Pack structure OEMCrypto_PST_Report" into lmp-preview-dev 2014-05-31 00:13:03 +00:00
Jeff Tinker
8611de4ead Fix AUPT: Native crash in /system/bin/mediaserver
Protect against invalid memcpy to NULL

bug: 15163357
Change-Id: Ifab17714473f45cb714a0ee765638733b3236ec8
2014-05-30 17:06:13 -07:00
Jeff Tinker
9a3b641752 Merge "Deprecate provisioning test URI" into lmp-preview-dev 2014-05-31 00:04:01 +00:00
Fred Gylys-Colwell
6f3e866882 Pack structure OEMCrypto_PST_Report
Because the OEMCrypto_PST_Report is sent as a signed block to the
server, it needs to be a fixed, platform independent, size.  This CL
adds the packed attribute to the structure, which reduces its size
from 56 bytes to 48 bytes.

Copy of widevine change:
https://widevine-internal-review.googlesource.com/#/c/10321/

Library Versions:
libwvdrmengine/level3/x86/libwvlevel3.a  Level3 Library May 30 2014 15:40:50
libwvdrmengine/level3/arm/libwvlevel3.a  Level3 Library May 30 2014 15:39:04

bug: 15184821
Change-Id: I54db2c3bbc4e20ee0c19c33d6fd56f86f432e110
2014-05-30 15:47:16 -07:00
Jeff Tinker
1035bb32e0 Deprecate provisioning test URI
Certificate provisioning requests will be made to the production server
since the other URI is being deprecated.

Merge of https://widevine-internal-review.googlesource.com/#/c/10230/
from the widevine cdm repo.

b/15145406

Change-Id: If0cbcaa66fc871568507ee56656c04f8341fcdcf
2014-05-30 15:18:23 -07:00
Jeff Tinker
2bab114f59 Fix cast v2 authentication unit test
Merge of https://widevine-internal-review.googlesource.com/#/c/10309 from the widevine cdm repo.

bug: 15341137

Change-Id: I188d7d7a3861dcbec1950dfbe8dd9504a60899bf
2014-05-30 15:45:40 +00:00
Jeff Tinker
52683d3e28 Merge "Fix multilib issues" 2014-05-22 01:31:48 +00:00
Edwin Wong
8c73bde53f Add password to prevent vendors from editing CENC pdfs.
What can the user do with the security setting:
 - open and view the doc
 - print the doc
 - no copying of content
 - can add comment, filling in forms and signing existing signature fields
 (no forms or signature fields in the doc),this option is bundled together
 (it is nice to allow the user to add notes to the doc)

bug: 14294953
Change-Id: I8690ccd16daffbd62549c1e4e137880b196c12d4
2014-05-21 17:47:22 -07:00
Jeff Tinker
6f35b0b86c Fix multilib issues
Change-Id: I069c8681d2b25221e8767db9437dbfded5618283
2014-05-21 22:25:02 +00:00
Jeff Tinker
99c76b901e Build cast v2 mediadrm signer library as non-static
Change-Id: I5e4401d06480c2122a2f353e789a78933b6882c3
related-to: 13988104
2014-05-21 18:18:32 +00:00
Rahul Frias
e56e58fbf5 Enable usage reporting
[ Merge from Widevine CDM repo of
  https://widevine-internal-review.googlesource.com/#/c/10171/ and
  https://widevine-internal-review.googlesource.com/#/c/10172/ ]

Updated license_protocol.proto from constituent protos in google3

These changes make use of OEMCrypto v9 changes to support usage reporting.
Usage reporting may be enabled for streaming (by means of secure stops) and
offline playback by a provider session token specified in the license.

Changes include periodically updating usage information for relevant
sessions and reporting and releasing usage information as needed.

The CDM has removed all references to Secure Stops. This change
updates the Android API implementation to comply.

b/11987015

Change-Id: Ibb6f2ced4ef20ee349ca1ae6412ce686b2b5d085
2014-05-18 21:07:12 -07:00
Fred Gylys-Colwell
d68e1f8307 Usage Table for Level 3 OEMCrypto
This is a copy of the widevine CL.
https://widevine-internal-review.googlesource.com/#/c/10174/

This CL adds the OEMCrypto v9 functionality to the level 3 haystack
version of OEMCrypto.  Mostly, this is to support usage tables.

The code is feature complete, but the timing tests are a little flakey
-- I'm not sure if the problem is in the code or if the test has too
tight a tolerance.

Also, the storage of the generation number needs to be made more
secure.

Change-Id: I73fecf8934b6a46785f1f8b6f40b40ffe39b88de
2014-05-18 19:44:28 -07:00