Commit Graph

768 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
9fdeabe3ed Update Widevine Modular DRM Integration Guide
The function OEMCrypto_LoadKeys should accept a null pointer for the
enc_mac_keys pointer.   This indicates that the mac_keys are not being
updated. This CL just updates the documentation to clarify this behavior.

bug: 9549308
Change-Id: I1073e72f9c8d0fa712ad02e4c2d517202b3defab
2013-06-24 17:23:30 -07:00
Fred Gylys-Colwell
0b56285a62 Update JBMR1 Widevine Libraries to 4.5.0.10095 (DO NOT MERGE)
This change updates the Widevine binary libraries.
It includes the change:

Change name of DNS Server For Android Build
https://widevine-internal-review.googlesource.com/3322

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

Bug: b/8173236
Bug: b/7594544 - Support x86 build on jbmr1
Bug: b/5425489
Change-Id: I6e32ab880c5768d724145d46a8b283bcdb2796ca
2013-06-24 21:17:43 +00:00
Edwin Wong
c49fe08576 Fixes GTS crash on Nexus 10.
When the video packets are clear, they are being
combined into a full frame between MediaExtractor or
DecryptCallback (where packets are never > 64k) and
MediaCrypto/DecryptVideo (where we are seeing clear
packets > 64k).

The max block size to be passed to DecryptVideo is
specified as 64K, handling of packets larger than 64K
is undefined and OEM implementation-dependent. In the
Nexus 10 case, it generates a SEG. fault.

Solution:
Add mClearSizes vector to keep track of each clear
packet size for android_media_MediaExtractor_getSampleCryptoInfo()
to process.

In android_media_MediaExtractor_getSampleCryptoInfo(), if it
does not see kKeyEncryptedSizes meta data, it will not
process the clear vector that contains the actual packet
sizes. Add a kKeyEncryptedSizes meta data that contains a zero
length size packet to trick the JNI code to process the
clear packets.

related-to-bug: 9261447

Change-Id: Ib0b655a95e099856babaf649f4a95fc7f9c17d41
2013-06-18 17:26:06 -07:00
Jeff Tinker
aae152cf78 am 47ef6eba: Fix erroneous "format unsupported " error in Play Movies
* commit '47ef6eba621fe95575d4bdda278d689fa84849e5':
  Fix erroneous "format unsupported " error in Play Movies
2013-06-14 09:11:21 -07:00
Jeff Tinker
47ef6eba62 Fix erroneous "format unsupported " error in Play Movies
Only the first 64K of the movie is pulled when sniffing,
if the widevine version metadata is not present in the
sniff buffer then a "format unsupported" error would occur.

This change increases the sniff buffer size to 128K.

bug: 9351294
Change-Id: If162cbea6915bf2b70122afd30e556e9206e8e43
2013-06-13 14:04:41 -07:00
Jeff Tinker
78b2231869 am f2afd994: Add Property for Provisioning ID
* commit 'f2afd99431694ac9f45ab729bbba6d7ff63505d6':
  Add Property for Provisioning ID
2013-05-30 18:51:47 -07:00
Jeff Tinker
f2afd99431 Add Property for Provisioning ID
Adds a property that allows applications to get the provisioning-unique serial
number.

Bug: 9175567

Also fixes some missing mutexes that were causing intermittent failures in
calls to OEMCrypto due to concurrency issues.

Bug: 9175583

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

Change-Id: I1d7e3ca9f3b06da345022f5f0d64e0c17a5cedca
2013-05-30 11:55:25 -07:00
Jeff Tinker
9bf8284362 am 0f2ff32f: Merge "Fix Level 3 Field Provisioning Device ID" into jb-mr2-dev
* commit '0f2ff32f7837fe969a19a046dd8fec563a064b51':
  Fix Level 3 Field Provisioning Device ID
2013-05-23 09:18:12 -07:00
Jeff Tinker
0f2ff32f78 Merge "Fix Level 3 Field Provisioning Device ID" into jb-mr2-dev 2013-05-23 16:13:57 +00:00
Jeff Tinker
5cac48a339 am 418f4b0e: License property for company_name should come from device on android
* commit '418f4b0e607316b90be54b3d0f3c09dddc3e59b6':
  License property for company_name should come from device on android
2013-05-22 12:19:25 -07:00
Jeff Tinker
424ead3417 Fix Level 3 Field Provisioning Device ID
The field provisioning code generates a randum number to use as the
device id, and then restricts the data to alphanumeric characters.
Previously, it could have also included a 0 byte in the data.  This CL
corrects that.

bug: 9073146

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

Change-Id: Iaf3e9e733f7c66c19d4168178a8e25ee0ba7e936
2013-05-22 12:10:11 -07:00
Jeff Tinker
418f4b0e60 License property for company_name should come from device on android
The company_name was hardcoded in the CDM as "Google" for all devices.
On Android, it needs to come from the ro.product.manufacturer system
property.

bug: 9074091

This is a merge of https://widevine-internal-review.googlesource.com/#/c/5730/
from the Widevine CDM repository.

Change-Id: Ia3ae82abf350c32ba8b4d05b59e95361927dea40
2013-05-21 15:22:00 -07:00
Jeff Tinker
47a483fe3e am 32d61899: Merge "Fix intermitent bad nonce being passed to RewrapDeviceRSAKey." into jb-mr2-dev
* commit '32d61899a2a366036f0a1fe9b8ebb1d83e216226':
  Fix intermitent bad nonce being passed to RewrapDeviceRSAKey.
2013-05-21 10:01:20 -07:00
Jeff Tinker
bd01268490 am 9019e22b: Key derivation failure on key release
* commit '9019e22b118d1799fa96690bace42acf951a3b10':
  Key derivation failure on key release
2013-05-21 10:01:20 -07:00
Jeff Tinker
32d61899a2 Merge "Fix intermitent bad nonce being passed to RewrapDeviceRSAKey." into jb-mr2-dev 2013-05-21 16:57:53 +00:00
Jeff Tinker
9019e22b11 Key derivation failure on key release
Signing and encryption keys are not correctly setup in OEMCrypto, when
an offline license is restored, before generating a key release message.
This results in key release failures. Playing back the license response
causes keys to be derived and allows the key release message to be constructed.

b/9016545

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

Change-Id: Ica9f13acc7c87e3125fa706f3a56e95b77a14a3c
2013-05-17 11:23:54 -07:00
Jeff Tinker
71aa639c48 Fix intermitent bad nonce being passed to RewrapDeviceRSAKey.
Since CryptoSession::RewrapDeviceRSAKey takes a const std::string& nonce, the calling code
implicitly constructa temporary std::string from a character array with undefined termination
and sometimes bogus value when nonce.data() is passed in.

Bug: 9016828

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

Change-Id: Ia3beaa5f1a96924a8cc53a719f25af52217b8cc5
2013-05-17 11:19:45 -07:00
Jeff Tinker
8608e0be4d am eaebea91: Merge "Update 4.5.0.10098 of Widevine Classic Library" into jb-mr2-dev
* commit 'eaebea9141882fa3c86c8de864ff0ddfd4f7e55e':
  Update 4.5.0.10098 of Widevine Classic Library
2013-05-16 11:10:07 -07:00
Jeff Tinker
1caf4568c3 am 1b295f4c: Support Offline Licenses
* commit '1b295f4c8114c9bd0da4a6e62220633195884df9':
  Support Offline Licenses
2013-05-16 11:03:18 -07:00
Jeff Tinker
eaebea9141 Merge "Update 4.5.0.10098 of Widevine Classic Library" into jb-mr2-dev 2013-05-16 18:01:32 +00:00
Jeff Tinker
1b295f4c81 Support Offline Licenses
Bug: 8621588

Merge of the following CLs from the Widevine CDM repository:

https://widevine-internal-review.googlesource.com/#/c/5602/
https://widevine-internal-review.googlesource.com/#/c/5431/
https://widevine-internal-review.googlesource.com/#/c/5660/

Change-Id: If37940e2535e1a1eca95e4394d8cf9bf689e9c3a
2013-05-15 21:18:20 -07:00
John "Juce" Bruce
c9112ae31c Update 4.5.0.10098 of Widevine Classic Library
This CL replaces https://googleplex-android-review.git.corp.google.com/#/c/288483/
and adds the fix for error 408 preload timeouts due to badly configured IPv6
networks.

Bug: 8291064

Prefer IPv4 To Avoid Badly-Configured IPv6 Networks
https://widevine-internal-review.googlesource.com/#/c/5641/

The changes previously made on the AndroidOS_J branch, from
https://googleplex-android-review.git.corp.google.com/#/c/288483/
are:

Change name of DNS Server For Android Build
https://widevine-internal-review.googlesource.com/3322
(This is a no-op since the change to the android tree that
necessitated it was reverted.)

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

Fix Android OS Plugin Build on JB-MR2-DEV
https://widevine-internal-review.googlesource.com/#/c/5640/

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

Change-Id: Ia13d322d853e843fd26582fa72c38ff7c7bd59a6
2013-05-15 20:07:02 -07:00
Jeff Tinker
a76e860d54 am 898d8701: Merge "Disable OEMCrypto tests that install a test keybox." into jb-mr2-dev
* commit '898d8701267c6d7b41cf4b36ac133984e0fcd8af':
  Disable OEMCrypto tests that install a test keybox.
2013-05-13 23:28:21 -07:00
Jeff Tinker
3594b9c56c am e1151975: Merge "Resize signature buffer" into jb-mr2-dev
* commit 'e1151975d093698816575fc7272272e61f8d3246':
  Resize signature buffer
2013-05-13 23:28:20 -07:00
Jeff Tinker
27875b13f4 am 8653c0bf: Merge "Device unable to recover from a bad certificate" into jb-mr2-dev
* commit '8653c0bfa5fc902be265adccc070e22ecc525b6a':
  Device unable to recover from a bad certificate
2013-05-13 23:28:20 -07:00
Jeff Tinker
898d870126 Merge "Disable OEMCrypto tests that install a test keybox." into jb-mr2-dev 2013-05-14 05:36:29 +00:00
Jeff Tinker
e1151975d0 Merge "Resize signature buffer" into jb-mr2-dev 2013-05-14 05:17:49 +00:00
Jeff Tinker
8653c0bfa5 Merge "Device unable to recover from a bad certificate" into jb-mr2-dev 2013-05-14 05:16:52 +00:00
Jeff Tinker
5d7ac644c5 Disable OEMCrypto tests that install a test keybox.
Because we do not want to accidentally install a test keybox on a
production device, most of the oemcrypto unit tests are being disabled
by default.

If you wish to run these tests, you can override this choice, by
running:
adb shell /system/bin/oemcrypto_test --gtest_also_run_disabled_tests

This change prompts for and requires positive confirmation before
running the disabled tests on a device that has a non-test keybox
already installed.

Bug: 8907626

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

Change-Id: Ib8e3605129ebf0861b4af15d04676f7a06cc5b78
2013-05-13 14:56:01 -07:00
Jeff Tinker
3342e33143 Resize signature buffer
There is an ambiguity in the use of the signature length in
OEMCrypto_GenerateRSASignature.  If the pointer to the vector is null,
the function should set the length parameter to be the size of the
buffer needed.

This ambiguity has been clarified in the documentation: the
length returned should be the exact length of the buffer.  It
will be corrected in a future release of Qualcomm's L1.  However,
we are putting this change in both as a stop-gap and as a
belt-and-suspenders fix.

Bug: 8878371

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

Change-Id: I7574874884ca10da68d15674c971a565d015767d
2013-05-13 14:13:00 -07:00
Jeff Tinker
0bbbcaa1cb Device unable to recover from a bad certificate
In the android media DRM api test, provisioning is indicated, when a
generate license request command is issued after a switch between L1 and
L3. This is as expected as oemcrypto is unable to decrypt
the key wrapped earlier (bad padding). Subsequent provisioning request
and storage of wrapped keys complete successfully. If the same session
is used to reissue a generate license request command, the wrapped keys
and cert used are those present in memory from the initial retrival,
rather than rereading the new ones from persistent storage.
This results in a cycle of successful provisioning attempts followed
by generation of license requests commands which return a provisioning needed
error.

A change has been added to reinitialize the session and reload the
wrapped keys.

b/8878324

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

Change-Id: Iaf47d15d104fd681706df5f64be583af24186abe
2013-05-13 13:39:56 -07:00
Marco Nelissen
d6d05d5293 am d7589452: Fix build
* commit 'd758945249631db85c0e44f2ff2caf23b2eaba3b':
  Fix build
2013-05-10 12:46:30 -07:00
Marco Nelissen
d758945249 Fix build
Change-Id: Ife1a8494d5a02985f8bd7fdd28130486aad34d3b
2013-05-10 08:28:15 -07:00
Jeff Tinker
97e6ef8e4e am 4cf8594a: Replaces staging provisioning server url with production server url
* commit '4cf8594a87e2eb02bd615d4baaf4e28d98942c14':
  Replaces staging provisioning server url with production server url
2013-05-10 03:06:30 -07:00
Jeff Tinker
4cf8594a87 Replaces staging provisioning server url with production server url
The default provisioning server url now points to the production server.
Also switches to the real field provisioning system ID that works
only on the production servers, and updates the unit tests to work
properly with the prod servers.

Bug: 8724358

Merge of:
  https://widevine-internal-review.googlesource.com/#/c/5270/
  https://widevine-internal-review.googlesource.com/#/c/5550/
  https://widevine-internal-review.googlesource.com/#/c/5321/
  https://widevine-internal-review.googlesource.com/#/c/5501/
from the Widevine CDM repository

Change-Id: Iff1d7349c6a84bf30c6cdd534933ae747d5cff55
2013-05-09 15:54:33 -07:00
Jeff Tinker
7d48387e26 am 10a55612: MediaDrmAPI test: send signed provisioning request as query string
* commit '10a55612d04af767bd359e0376536b4ebcd320e9':
  MediaDrmAPI test: send signed provisioning request as query string
2013-05-08 19:32:16 -07:00
Jeff Tinker
10a55612d0 MediaDrmAPI test: send signed provisioning request as query string
bug: 8790775

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

Change-Id: I7d040fcebdea7f038352bd4216dcbaab4ff9401c
2013-05-08 17:41:52 -07:00
Jeff Tinker
84096b4e33 am f62dc230: Fix renewal failures after server sdk update
* commit 'f62dc230bb153e1e06add7ea1a2d0b9d16967b33':
  Fix renewal failures after server sdk update
2013-05-08 15:03:29 -07:00
Jeff Tinker
f62dc230bb Fix renewal failures after server sdk update
In a renewal message, in order to extend the duration, the server sdk
sends back a single key in the key container. Earlier the key was of type
CONTENT and only contained a key control block. No id, key data or
iv information were supplied. After a recent server sdk update
the key type in the renewal message has been changed to KEY_CONTROL.
This change enables the client to process the updated renewal message.

bug: 8736545

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

Change-Id: Ia9f3620b86460278285fddee57ee923e269de7c1
2013-05-07 15:44:17 -07:00
Jeff Tinker
b76d6ef958 am 7aa99d4a: Squashed commit of 3 CLs related to provisioning retries
* commit '7aa99d4a36434af618db6240d4a74ea1ef641802':
  Squashed commit of 3 CLs related to provisioning retries
2013-05-07 10:25:30 -07:00
Jeff Tinker
a990027734 am d0f17846: Sends signed provisioning request as query string instead of payload.
* commit 'd0f1784615f6dc95665eda58acd0aced50230bf3':
  Sends signed provisioning request as query string instead of payload.
2013-05-07 10:18:47 -07:00
Jeff Tinker
2830e109ea am 779b887b: Merge "Generate renewal and expiry events" into jb-mr2-dev
* commit '779b887bb3b2b88e50ddfc76dc0ace21734efdb1':
  Generate renewal and expiry events
2013-05-07 10:01:19 -07:00
Jeff Tinker
7aa99d4a36 Squashed commit of 3 CLs related to provisioning retries
Bug: 8770327

    1. Allow provisioning retries

    Allow multiple provisioning request messages to be generated without
    requiring an equal number of HandleProvisioningResponse's. This is to
    allow for lost messages.

    2. Properly deletes cdm and crypto sessions created for cert provisioning.

    The CleanupProvisioningSession() has not been deleting the cdm and crypto sessions
    created for certificate provisioning properly. The lives of these sessions are
    short and therefore, not added to the CdmSessionMap. We need to explicitly delete
    these objects when error occurs or when we are done with provisioning.

    3. Fixes provisioning responses that contain multiple chunks.

    When we make multiple provisioning requests during testing, Apiary
    sends response that contains more than one chunk. The test app.
    needs to parse the response and concatenates the chunk data.
    Otherwise, the size for each chunk is treated as base64 encoded data,
    which will generate error when we try to deserialize the response
    message.

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

Change-Id: I5b0ed982849c12628a3949f8d51515fcf6ce5a5f
2013-05-06 23:04:34 -07:00
Jeff Tinker
d0f1784615 Sends signed provisioning request as query string instead of payload.
Bug: 8790775

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

Change-Id: I749303eee8162f37982f6dd5d83b6cf254b96847
2013-05-06 16:28:32 -07:00
Jeff Tinker
779b887bb3 Merge "Generate renewal and expiry events" into jb-mr2-dev 2013-05-06 22:11:14 +00:00
Jeff Tinker
3cfb86cea1 Generate renewal and expiry events
The android timer class was not generating timer events correctly. This caused
renewal and expiration events not to be sent. A strong pointer to the
timer thread was not held and this caused the android util timer
thread to exit after firing once. This is now addressed.

Bug: 8736545

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

Change-Id: I2d904e55d4d10eacc1a51f1c6b5c1a267c92c8d8
2013-05-02 16:42:04 -07:00
Jeff Tinker
aca911f488 am e9ab0939: Merge "Hook up events and new exceptions in the MediaDrm API test" into jb-mr2-dev
* commit 'e9ab09391740a9987c870fe4d4baf435a26b9cf6':
  Hook up events and new exceptions in the MediaDrm API test
2013-05-01 15:04:33 -07:00
Jeff Tinker
e9ab093917 Merge "Hook up events and new exceptions in the MediaDrm API test" into jb-mr2-dev 2013-05-01 22:02:10 +00:00
Jeff Tinker
74b495a66c am 4bce2959: Allow PSSH data to be unspecified on license renewal
* commit '4bce2959efe276998a9b438ae890905918c7eb71':
  Allow PSSH data to be unspecified on license renewal
2013-04-30 17:54:18 -07:00
Jeff Tinker
cb5541b740 Hook up events and new exceptions in the MediaDrm API test
Bug: 8725707

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

Change-Id: If142e558585e5cc7ba0cecf45693413943b2b64f
2013-04-30 17:35:29 -07:00