Commit Graph

3646 Commits

Author SHA1 Message Date
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
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
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
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
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
Jeff Tinker
93bf77ed6d Merge "Pack structure OEMCrypto_PST_Report" 2014-05-19 02:26:09 +00:00
Jeff Tinker
8aec8fe0bd Merge "Clean comments, namespace, and variable names" 2014-05-19 02:25:54 +00:00
Fred Gylys-Colwell
6bac5bc50d Clean comments, namespace, and variable names
This CL removes TODOs and email addresses from comments, unifies some
namespaces and cleans a few variable names.  It is a copy of multiple
CLs on the widevine side.

Change-Id: I1bb649096476a5001a56d746427399de6a88ff69
2014-05-16 15:53:12 -07:00
Fred Gylys-Colwell
4b83f96adf Pack structure OEMCrypto_PST_Report
This change is copied from the widevine CL:
https://widevine-internal-review.googlesource.com/#/c/10163/

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 47 bytes.

Change-Id: I2bae058b7eb0ac54ba9fad355f3d85ddc2cd4a58
2014-05-16 13:16:51 -07:00
Fred Gylys-Colwell
86e73deb4c Make test URLs more external
This CL changes several test URLs so that they do not reference
internal test servers.

Copied from many CLs on the widevine side.

Change-Id: Ia0e6d6faa19e1841bacaf3b90043aca3a12aaf8a
2014-05-16 13:14:22 -07:00
Fred Gylys-Colwell
1dfd204f22 Merge "Correct test vector in base64 test" 2014-05-16 19:25:08 +00:00
John "Juce" Bruce
1de68fb7c2 Merge "Remove Unused OEMCrypto Wrapper Methods" 2014-05-16 18:00:22 +00:00
John "Juce" Bruce
5a1bf27fd3 Upgrade Integration Test to Use Latest EME Spec
(This is a merge of
https://widevine-internal-review.googlesource.com/#/c/10140/
from the Widevine CDM repo.)

Updates the integration test from using "video/avc" to "cenc".

Bug: 13731637
Change-Id: Idfa0eabb6eb359a3d08008952bff495bea164cc7
2014-05-14 20:12:08 -07:00
John "Juce" Bruce
d6c98f1290 Remove Unused OEMCrypto Wrapper Methods
(This is a merge of
https://widevine-internal-review.googlesource.com/#/c/10141/
from the Widevine CDM repo.)

Over the course of revising the CAST support, the need for the
MediaDrm to call open and close session was removed. However, the
methods to do that were not. This removes the unused code.

Change-Id: I577f5314b6b20f36c308ac6753f1084ff3c707d9
2014-05-14 16:03:26 -07:00
Fred Gylys-Colwell
b0694bef17 Correct test vector in base64 test
This is a copy of
https://widevine-internal-review.googlesource.com/#/c/10050

The non-encoded base64 test vectors were modifed for the source
release, but the encoded test vectors were not updated to match.  This
CL updates the encoded test vectors to match.

Change-Id: I95ed881007e80da2d464f303eacf55cda38b586d
2014-05-07 13:06:30 -07:00
Fred Gylys-Colwell
7f9bff5ef5 Correct message size in call to OEMCrypto_RewrapDeviceRSAKey
This is a copy of https://widevine-internal-review.googlesource.com/#/c/10040/

The message size was wrong on several OEMCrypto_RewrapDeviceRSAKey
unit tests.  The function was supposed to fail in these tests.
However, a vendor found that they were failing with a different error
code because the buffer size was incorrect.  Now the function should
fail with the correct error code, and the test should pass for the
vendor.

Change-Id: Iea27b489f9bc386241d9add4f99ccb50560dfef6
2014-05-06 17:54:18 -07:00
John "Juce" Bruce
e924571282 Fix Crash When Renewing Licenses
The changes to support the newest EME spec did not account for an
empty init data.

(This is a merge of
https://widevine-internal-review.googlesource.com/#/c/9991/
from the Widevine CDM repo.)

Bug: 14410226
Change-Id: Ieb818751fa49e92068014d64767c563da2050431
2014-04-29 14:38:39 -07:00
Fred Gylys-Colwell
1cd8195d88 OEMCrypto Usage Tables
This CL adds usage tables to the OEMCrypto reference implementation
(mock) and unit tests.

There is also a new parameter called oem_crypto_require_usage_tables
that determines if the usage tables are required or not.  This is set
to true for Android and false for all other platforms.

This CL is most of OEMCrypto version 9 updates.

This CL is a copy of
https://widevine-internal-review.googlesource.com/#/c/9720
https://widevine-internal-review.googlesource.com/#/c/9874
https://widevine-internal-review.googlesource.com/#/c/9873

Change-Id: I78c4f7651306f9f79ba2260c3e04fb1eca7e20e3
2014-04-24 11:40:30 -07:00
John "Juce" Bruce
951f08c2da Support Latest Version of EME Spec Init Data Specification
(This is a merge of
https://widevine-internal-review.googlesource.com/9711 from the
Widevine CDM repo.)

This change updates the CDM's handling of init data types, previously
known as MIME types, to comply with the latest version of the EME
spec.

Following this change, in addition to accepting the deprecated MIME
types "video/mp4", "audio/mp4", "video/webm", and "audio/webm", the
CDM will accept the new standard: Init data types "cenc" and "webm".

Furthermore, this removes the non-PSSH-parsing path from the CDM. All
platforms have unified on the CDM being responsible for parsing the
concatenated PSSH box list, as outlined in the latest EME spec.

As Android has shipped code that expects pre-unwrapped PSSH boxes and
must maintain backwards-compatibility, code has been inserted on that
platform to detect pre-unwrapped data and re-wrap it with a PSSH
header before sending it to the CDM.

There are some small changes to unit tests because of this change:

1) The CDM Engine unit test now no longer needs to unwrap the PSSH on
   any platforms when testing ISO-BMFF. It now pre-caches the
   unwrapped key ID for use when testing WebM.

2) Several substantially-similar unit tests in the Android code have
   been rolled into one test.

Bug: 13564917
Bug: 13570595
Bug: 9465346
Bug: 13570288
Change-Id: I7f27b16b8503f24a26746b5dce71fb61b6fd1bb2
2014-04-17 20:35:02 +00:00
Rahul Frias
de6f6f6324 Merge "Handle key expiry error on decryption" 2014-04-14 21:35:05 +00:00
Fred Gylys-Colwell
e95eebf326 Refactor OEMCrypto mock and its unit tests
This is a copy of the Widevine CL:
https://widevine-internal-review.googlesource.com/#/c/9708/

This CL refactors some of code in oemcrypto/mock and oemcrypto/test in
preparation for adding usage table code.

Change-Id: I7e58c8ecd6d92b3e177cb915733212fcad645485
2014-04-10 17:34:51 -07:00
Fred Gylys-Colwell
026a04701e Test Key Control Block with HDCP Version
This is a copy of the Widevine CL:
https://widevine-internal-review.googlesource.com/#/c/9480/

This change is part of OEMCrypto API version 9.

This CL adds verification that a key control block which requires a
specific version of HDCP can be loaded.  Also, if secure data path is
not set, it verifies that data is still decrypted.

This CL also adds test that verify DecryptCTR fails when the current
HDCP version is below that in the key control block.  The expected
error is OEMCrypto_ERROR_INSUFFICIENT_HDCP.  This error code is newly
introduced in this CL.

This is one attempt to clarify HDCP, as specified in b/13626021, and
is a slight modification from previous behavior for the mock and the
level 3 haystacked code.

This CL also tests the two valid verification codes "kctl"
and "kc09".

bug: 13626021
Change-Id: If380709d2306a3489470b29fb148a45b609b089d
2014-04-10 16:22:25 -07:00
Rahul Frias
9a59086d00 Handle key expiry error on decryption
OEMCrypto now returns OEMCrypto_ERROR_KEY_EXPIRED rather than
OEMCrypto_UNKNOWN_ERROR when the key has expired. This CL adds
a test to verify that CDM is handling this correctly.

[Merge of https://widevine-internal-review.googlesource.com/#/c/9730
from the Widevine cdm repo]

b/9205119

Change-Id: I6b13b43d71f7fa51531c309ffd3f93d3648f9b89
2014-04-10 12:46:14 -07:00
Jeff Tinker
45dc595f92 am d875310a: am d3e06ad1: am eafc65e7: resolved conflicts for merge of 65a35c7d to klp-dev
* commit 'd875310a7650a8606acbfc64e4315c05376b6881':
  Update DASH demo player for OEMs
2014-04-05 00:45:59 +00:00
Jeff Tinker
d875310a76 am d3e06ad1: am eafc65e7: resolved conflicts for merge of 65a35c7d to klp-dev
* commit 'd3e06ad1e5b58b4d81c5e465d753fc6e08fc8273':
  Update DASH demo player for OEMs
2014-04-05 00:36:55 +00:00
Jeff Tinker
eafc65e794 resolved conflicts for merge of 65a35c7d to klp-dev
Change-Id: If8f3ff6b3f638038da57fde85edee982f7ef8144
2014-04-04 15:48:47 -07:00
Jeff Tinker
65a35c7df6 Update DASH demo player for OEMs
OEMs testing Widevine/DASH playback have requested
additional test content.  This updated demo apk
provides it.

bug: 12789209
Change-Id: Idba85a1569bc59e43cfcb15b762d0d5da74c91aa
2014-04-04 12:09:53 -07:00
Jeff Tinker
05a83a8faa am f9b1a2e1: Merge "Add signature|system permission to MediaDrm signer APIs" into klp-modular-dev
* commit 'f9b1a2e1f1b989acc66d4969d11690f8d3407e25':
  Add signature|system permission to MediaDrm signer APIs
2014-04-03 02:11:53 +00:00
John "Juce" Bruce
31aa8eea04 resolved conflicts for merge of 7eea20df to master
Change-Id: Ibd8b16745d36b24041856f315fbb09a6c25cf4fb
2014-04-02 18:59:05 -07:00
Jeff Tinker
f9b1a2e1f1 Merge "Add signature|system permission to MediaDrm signer APIs" into klp-modular-dev 2014-04-03 01:30:44 +00:00
Jeff Tinker
aaf4427950 Add signature|system permission to MediaDrm signer APIs
Update test to require the system permission

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

Change-Id: I071e55f09f85c420e6778ebf170f5110cf39809e
related-to-bug: 12702350
2014-04-02 23:41:12 +00:00
John "Juce" Bruce
7eea20df86 Add Support for Audio MIME Types
The EME spec technically requires CDMs to treat audio/mp4 and
video/mp4 equivalently, as well as audio/webm and video/webm. We had
only been accepting video/mp4 and video/webm up until now.

This change also centralizes handling of init data types in the shared
CDM code instead of having it spread across multiple places in the
codebase.

(This is a merge of https://widevine-internal-review.googlesource.com/9532/
from the Widevine CDM repo.)

Bug: 13564917
Change-Id: Ib8bdfb2b003ffb00e8f0559561335abb3c5778b0
2014-04-02 15:39:12 -07:00
John "Juce" Bruce
46be6edcc3 am b920034e: Add Yet More Backwards-Compatibility
* commit 'b920034e3be73eb010a349115cf25ca2a4ef83a7':
  Add Yet More Backwards-Compatibility
2014-04-02 00:12:09 +00:00
Jeff Tinker
965cedd5ee resolved conflicts for merge of 3db90f54 to master
Change-Id: Ie9e46292e003fefce9ca44a31cb338a0ecf51930
2014-04-01 16:57:14 -07:00
John "Juce" Bruce
b920034e3b Add Yet More Backwards-Compatibility
It turns out the array of things certain apps pass as the MIME type is
greater than we believed. To support this, we will treat anything that
is not a known type as video/mp4 to mimic old behavior.

(This is a merge of https://widevine-internal-review.googlesource.com/9636
from the Widevine CDM repo.)

Bug: 13750843
Change-Id: I4b7bbe7d266ade9b35c6c5beb21502bf0715b854
2014-04-01 16:01:27 -07:00
Rahul Frias
ef875d25ed am 7e5c5c75: am cbcc609d: Update YT CP server URI to point to the UAT server
* commit '7e5c5c75d6f3064ce76b64fa1f389ab24dbeddaf':
  Update YT CP server URI to point to the UAT server
2014-04-01 22:15:09 +00:00
Jeff Tinker
3db90f54c1 Support CAST V2 authentication
bug: 12702350

Squashed commit of these CLs from the widevine cdm repo:

Cast V2 cdm support
https://widevine-internal-review.googlesource.com/#/c/9190/

Add CASTv2 Support to DrmPlugin
https://widevine-internal-review.googlesource.com/#/c/9228/

Test for CastV2 authentication APIs
https://widevine-internal-review.googlesource.com/9550

Change-Id: I6d66bc1bbd653db5542c68687b30b441dd20617f
2014-04-01 14:26:27 -07:00
Rahul Frias
cbcc609d5b Update YT CP server URI to point to the UAT server
Privacy tests from request license were failing as the YTCP drm
server location had changed.

Also updates the MediaDrmAPI test to reference the UAT server

This affects OEMs doing Widevine integrations on KK devices.

Merge of https://widevine-internal-review.googlesource.com/#/c/9233/
from wv cdm git repository

b/13324394

Change-Id: I97152b2a79a9088303e5fc4a5c07a413e4c85e15
2014-04-01 01:36:49 +00:00
John "Juce" Bruce
c3444dc9e9 resolved conflicts for merge of f111bea1 to master
Change-Id: I7f95eba8d5fb1e9a20800b9c1ef7fcb813eff41c
2014-03-31 17:35:24 -07:00
John "Juce" Bruce
f111bea1b1 Merge "Add Support for WebM Back" into klp-modular-dev 2014-03-31 23:46:51 +00:00
John "Juce" Bruce
702aadf853 Add Support for WebM Back
Adds support for WebM to the CDM. Decryption remains untouched,
however the initialization data is passed differently for WebM.

The previous version of this change broke playback for certain
apps that were being allowed to pass invalid MIME types before
this change was made. This version maintains backwards-compatiblity
for these apps for now by rewriting their MIME types as "video/mp4".

Merge of https://widevine-internal-review.googlesource.com/9225/
and https://widevine-internal-review.googlesource.com/9611/ from
the Widevine cdm repo.

Bug: 10638562
Change-Id: Ib37e838d08363f07b34b3a2e79a3f80a1f43e9ad
2014-03-31 16:16:18 -07:00
Fred Gylys-Colwell
2069af7771 Remove Test Keybox - DO NOT MERGE
This CL removes the test keybox from the reference
implementation. This keybox is only needed temporarily for Cast
testing with the test server before the real certificate server is
working.

Change-Id: Icb8b5587acc91fd9f3ec35f04f91734437f804e0
2014-03-31 15:35:12 -07:00
Jeff Tinker
55f1de2fe5 resolved conflicts for merge of 66cadaa9 to master
Change-Id: I2a052d56516f0e246d77148a38191430ff139c3e
2014-03-29 12:33:46 -07:00
Jeff Tinker
66cadaa9fa Revert "Add Support for WebM"
This reverts commit ab95cf27f1.

Change-Id: Ie78c2c14fa9b598b5ea67d6e9e60479e652b0b06
2014-03-29 17:09:28 +00:00