Commit Graph

1737 Commits

Author SHA1 Message Date
Edwin Wong
c71446e166 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884 am: 5b8ce1cd64 -s ours am: 2ea811a508
am: 2f58b776ff

Change-Id: Ifa52d677cb2245f91e45108801a735f7e1b3f481
2016-09-22 21:58:14 +00:00
Edwin Wong
2f58b776ff DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884 am: 5b8ce1cd64 -s ours
am: 2ea811a508

Change-Id: If3714615668b5cad40782f5bff25e5e728633269
2016-09-22 18:09:03 +00:00
Edwin Wong
2ea811a508 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884
am: 5b8ce1cd64  -s ours

Change-Id: Iffe795854a4cd89f5793746bb84d86ec3b38f2fc
2016-09-22 12:00:46 +00:00
Edwin Wong
5b8ce1cd64 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e
am: 428a960884

Change-Id: If7ecda8b5c07d27da0bf66eb928da5a321890d6d
2016-09-22 11:58:03 +00:00
Edwin Wong
428a960884 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1
am: 5d4184e85e

Change-Id: I3788141d668dbfd0d3ede873f15589f08fd261bb
2016-09-22 08:14:08 +00:00
Edwin Wong
5d4184e85e DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142.
am: 0d1787e5a1

Change-Id: Ieb5d758c6061dc1d2fbaf78b6ab629064da0f5c7
2016-09-22 00:30:50 +00:00
Edwin Wong
0d1787e5a1 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142.
Remove openssl external symbols from libssl.a and libcrypto.a.

Widevine repo reference:
https://widevine-internal-review.googlesource.com/#/c/17990/
https://widevine-internal-review.googlesource.com/#/c/18004/

bug: 28013024
Change-Id: I8a6dd5a17f896a65da8209680ef200a953b21e80
2016-09-19 15:17:46 -07:00
Fred Gylys-Colwell
84d7185e5f Pull cache flush out of Haystack
Merge of http://go/wvgerrit/20924

This CL pulls the cache flush code out of the haystack code and into
the adapter level.  This is so it will be built with processor
specific compiler flags instead of as part of the precompiled binary.

level3/mips/libwvlevel3.a  Level3 Library 4465 Sep 10 2016 21:44:37
level3/arm/libwvlevel3.a  Level3 Library 4445 Sep 10 2016 21:30:01
level3/x86/libwvlevel3.a  Level3 Library 4464 Sep 10 2016 21:49:53

b/30550782 Battery Problems

Change-Id: I8967da498a43cabe82e78345162705dc2fcdb859
2016-09-10 21:55:52 -07:00
Fred Gylys-Colwell
3f040e0a9d Don't Increment IV for Partial Blocks in Unit Tests
Merge from widevine repo of http://go/wvgerrit/20660

For CTR encryption mode, when a subsample ends with partial block that
is continued on the next subsample, both blocks should have the same
IV.  This allows an implementation of OEMCrypto to optimize their
decryption algorithm.

b/31114392

Change-Id: I29a998b00f3bfb12c4bbbcb1fa1ebc371473fefd
2016-09-02 15:51:05 -07:00
John Bruce
3fbc2106d8 Merge "Widevine Version Number for NYC-MR1" into nyc-mr1-dev 2016-09-02 20:09:55 +00:00
John Bruce
bf53608a4e Merge "Fix cens Mode in Android CDM" into nyc-mr1-dev 2016-08-29 21:19:13 +00:00
John "Juce" Bruce
e0f4942b8f Fix cens Mode in Android CDM
(This is a merge of go/wvgerrit/20500)

This patch removes the logic that calculates the "pattern offset" from
the Android glue layer. There is no such thing as a pattern offset, and
setting this value to anything other than zero may break cens mode on
some devices.

To reduce the risk of setting this value to anything other than zero,
the offset_blocks parameter has been removed from the pattern descriptor
in the CDM Core. It will have to remain part of OEMCrypto v11,
unfortunately, but the code to set it to zero is now centralized in
CryptoSession.

Bug: 28726863
Change-Id: I9c5bfe470fe251c7a57901dc2e998f4dab7fe7d7
2016-08-26 16:02:21 -07:00
John "Juce" Bruce
15ca8148a8 Widevine Version Number for NYC-MR1
(This is a merge of go/wvgerrit/20402)

This updates the version number to v4.1.0 for the NYC-MR1 release. It
also updates the canary to pass on the nyc-mr1-dev branch.

Bug: 30813903
Change-Id: I05de038ff52e9f7633efff7011052b48b59d90fa
2016-08-23 15:34:39 -07:00
Rahul Frias
4b8b1e0e98 Merge "Do not convert the protection scheme to network byte order" into nyc-mr1-dev 2016-08-23 21:55:11 +00:00
Rahul Frias
6a206191f0 Do not convert the protection scheme to network byte order
[ Merge of http://go/wvgerrit/19960 ]

Protections schemes are specified using a 4CC code {"cbc1", "cbcs",
"cenc", "cens"}. A host to network conversion was performed when the
PSSH was created and inserted into the license request. A reverse
conversion was performed when the code was extracted from the
license response.

These conversions are problematic if the PSSH is created externally and
passed into mediaDrm. To address this, the conversions have been removed
and allow protobuf to handle byte ordering. For backward compatibility
we allow codes in either ordering.

b/30713238

Change-Id: I25f01ecc621549fd3c13b443e4c8b89168463249
2016-08-23 12:51:12 -07:00
Rahul Frias
9ed5a46808 Do not convert the protection scheme to network byte order [DO NOT MERGE ANYWHERE] am: 13a4fe8e4c -s ours
am: ae61d10476  -s ours

Change-Id: I32cacb23a6e59bc1db65198f0c441cdeb7491661
2016-08-22 22:06:40 +00:00
Rahul Frias
ae61d10476 Do not convert the protection scheme to network byte order [DO NOT MERGE ANYWHERE]
am: 13a4fe8e4c  -s ours

Change-Id: I42dbfbcb84d2f66fdfbc30c6a1122a5966055ddb
2016-08-22 21:46:02 +00:00
Rahul Frias
13a4fe8e4c Do not convert the protection scheme to network byte order [DO NOT MERGE ANYWHERE]
[ Merge of http://go/wvgerrit/19901 ]

Protections schemes are specified using a 4CC code {"cbc1", "cbcs",
"cenc", "cens"}. A host to network conversion was performed when the
PSSH was created and inserted into the license request. A reverse
conversion was performed when the code was extracted from the
license response.

These conversions are problematic if the PSSH is created externally and
passed into mediaDrm. To address this, the conversions have been removed
and allow protobuf to handle byte ordering. For backward compatibility
we allow codes in either ordering.

b/30713238

Change-Id: I721b375e446526e544856759cada76a1fa6c7be5
2016-08-22 20:49:24 +00:00
Rahul Frias
eeb6606784 Merge \"Upgrade TLS version in integration tests\" into nyc-dev
am: 1ebaf6ad82

Change-Id: I87127e320f65c48c95496815a634c6ad854af58a
2016-06-20 20:02:53 +00:00
Rahul Frias
1ebaf6ad82 Merge "Upgrade TLS version in integration tests" into nyc-dev 2016-06-20 19:55:27 +00:00
Rahul Frias
b552a133c2 Upgrade TLS version in integration tests
[ Merge of http://go/wvgerrit/18295 ]

SSL v3 is being disabled across Google infrastructure. Networking
code in integration tests used SSL v3 during HTTPS protocol negotiation.
Once this is disabled, it will cause integration test failures at
staging and UAT license servers.

With this change the client will use TLS 1.2. Insecure cipher suites
(TLS_RSA_WITH_RC4_128_MD5, TLS_RSA_WITH_RC4_128_SHA,
 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA)
have been disabled as well.

b/29356581

Change-Id: I98a04d345fe83c48132b9d79986a21cc84827dc8
2016-06-17 22:28:56 -07:00
Jeff Tinker
9b8c6286b6 Merge \"Rework WidevineSamplePlayer to use fragments\" into nyc-dev
am: 02d8671882

Change-Id: I5846eabc3774e616d4334e5f03080ca9e6ed6aaa
2016-06-18 02:01:31 +00:00
Jeff Tinker
02d8671882 Merge "Rework WidevineSamplePlayer to use fragments" into nyc-dev 2016-06-17 21:24:47 +00:00
Jeff Tinker
cb9fc66a34 Update the expected android build version for NYC release
am: 2bd6131162

Change-Id: I27f76c54e3192151ad6d4857dd9ed59bf265760d
2016-06-17 18:25:51 +00:00
Jeff Tinker
2bd6131162 Update the expected android build version for NYC release
bug: 29270537
Change-Id: I2f85dd95e1a2b9eaa79299441b48716599211eea
2016-06-17 00:39:33 +00:00
Jeff Tinker
9f735d298a Rework WidevineSamplePlayer to use fragments
Previously it used TabActivity which has been deprecated
and no longer works.

bug: 29045104

Change-Id: I207f0208b6dba47adfa0ffe7485800d1561af617
2016-06-13 11:27:03 -07:00
Rahul Frias
ce5475169b Report OEMCrypto security patch level
am: e33895f5de

* commit 'e33895f5deccdbb15d3ba028190e07864f326ab2':
  Report OEMCrypto security patch level

Change-Id: Ica7691a9001b29adb55e173ce2876e5a955a0415
2016-05-24 00:38:59 +00:00
Rahul Frias
e33895f5de Report OEMCrypto security patch level
[ Merge of http://go/wvgerrit/17959 ]

This will allow the license server to base licensing decisions on the
devices security module revision.

b/28882058

Change-Id: I574e7686bb305397946d2bfaff504cfae242e628
2016-05-23 10:50:07 -07:00
Fred Gylys-Colwell
6db197210f Remove pattern offset tests
am: 0b2223018d

* commit '0b2223018dd2901e1d5e68d2a5f238bba9ba79ed':
  Remove pattern offset tests

Change-Id: I2e94ef907230119f1e728942a5b8b8537c836e3f
2016-05-19 21:53:34 +00:00
Fred Gylys-Colwell
0b2223018d Remove pattern offset tests
Merge from widevine repo of http://go/wvgerrit/17877

The final spec for CENC says that partial encrypted blocks are only
allowed for "cenc" mode, and not for "cens" mode.  Also, the
pattern_offset must be 0 for all calls to OEMCrypto_DecryptCENC.

Review doc changes http://go/wvdelta11 and http://go/oemcrypto

Notice that this CL affects documentation and test code only.  No
production code is affected.

b/28718266
b/28817376

Change-Id: I1d6a38a763a2b693ea0c26bc909e1c721b8facaf
2016-05-17 15:15:18 -07:00
Fred Gylys-Colwell
bba11c61a2 Merge "Push android unit tests to /data" into nyc-dev
am: 1f204c5cfa

* commit '1f204c5cfa1bf3aee53e9f284a92031c47c31cbd':
  Push android unit tests to /data

Change-Id: I5f537c2741a4504f9c111809bf94457d015e1fc1
2016-05-03 15:51:32 +00:00
Fred Gylys-Colwell
1f204c5cfa Merge "Push android unit tests to /data" into nyc-dev 2016-05-03 15:48:04 +00:00
Fred Gylys-Colwell
a4ebdf80b5 Push android unit tests to /data
Merge of http://go/wvgerrit/17652

This CL changes the android/build_and_run_all_unit_tests.sh script to
push exectuables to /data if it can't push to /system/bin.

The script run_all_unit_tests.sh will check if test files are in /data
and run those first, if not, it runs the files in /system/bin.

This change is needed to test unit tests on devices where /system/bin
is a read only file system, even after running "adb remount".

This CL will help verify, but will not fix
b/27678092

Change-Id: Ia0fe8c2e68722f58c2626f22113abdbdc8c5e408
2016-05-02 15:16:14 -07:00
John "Juce" Bruce
31a75673b8 Don\'t Validate Crypto Mode for Unencrypted Decrypt
am: 6d2822f

* commit '6d2822f6c615e957de2ad0af3fb1009e79a46fcc':
  Don't Validate Crypto Mode for Unencrypted Decrypt

Change-Id: I225cf7310cd43ac6c7cf0c6082d3220ce4bbbb9b
2016-04-27 23:18:46 +00:00
John "Juce" Bruce
6d2822f6c6 Don't Validate Crypto Mode for Unencrypted Decrypt
(This is a merge of http://go/wvgerrit/17661)

Because Widevine core always has a decrypt mode set, even on unencrypted
calls where we potentially do not know the crypto mode, it will reject
unencrypted decrypt calls for sessions that have been flagged as
AES-CBC, since the crypto mode defaults to AES-CTR.

The fix is to not validate the crypto mode on unencrypted decrypt calls,
as the data won't be getting decrypted anyway.

Bug: 28423928
Change-Id: If848834dd498ca96983a2b69d448b8d81d50e0a4
2016-04-27 12:20:18 -07:00
Rahul Frias
ecfd61e803 Merge "Modify QueryStatusL3 test to allow for L3 devices" into nyc-dev 2016-04-15 22:51:56 +00:00
Kyle Alexander
53ad22d970 Merge "Add display and logging for validating HDCP levels." into nyc-dev 2016-04-15 00:30:03 +00:00
Fred Gylys-Colwell
2717f29707 Specify generic encryption buffer sizes
Merge from widevine repo of http://go/wvgerrit/17463

This CL updates the unit tests to verify that
OEMCrypto_Generic_Encrypt and OEMCrypto_Generic_Decrypt can handle a
buffer size of at least 100k.  It also adds code to the
oemcrypto_dynamic_adapter so that buffer sizes that are larger than
100k are broken into chunks of 100k.

All Nexus devices targeted for N pass these tests.

b/27040752

Change-Id: Iaf5c65d2f0b69e60f03cc99732d1ecab60658049
2016-04-14 15:02:59 -07:00
Rahul Frias
c535436bab Modify QueryStatusL3 test to allow for L3 devices
[ Merge of http://go/wvgerrit/17501 ]

Widevine request_license_tests were written with the expectation that
devices would by default be enabled for security level 1 and fallback
to level 3 if needed. Some devices such as seed are L3 only and results
in failures in the QueryStatusL3 test. This CL corrects the test's
expectation.

b/26902214

Change-Id: Ie84554337cd3716d120f67e592888af0cde719c7
2016-04-13 10:30:07 -07:00
Kyle Alexander
27c8c3f150 Add display and logging for validating HDCP levels.
This adds display and logging values to help with debugging b/28024277.

Matching Widevine cl: go/wvgerrit/17446

Bug: 28024277
Change-Id: Ib25ebf37f885b60ae4ab41851df4af4e75b5aace
2016-04-11 09:48:27 -07:00
John Bruce
91059f1d81 Merge "Restore WVCryptoPlugin Unit Tests" into nyc-dev 2016-04-08 18:22:17 +00:00
Jeff Tinker
5dd0d2a5ce Merge "Fix StringIndexOutOfBoundsException in MediaDrmAPITest" into nyc-dev 2016-04-08 18:05:12 +00:00
Jeff Tinker
06c45414b5 Fix StringIndexOutOfBoundsException in MediaDrmAPITest
The AES test was useful to verify the framework API changes, but
the decrypt test was not correct.  Removing it for now.

Merge of go/wvgerrit/17472

bug: 27973491
Change-Id: I942fda22072636ea7ce56b992e7d3a60077c0d27
2016-04-08 16:51:22 +00:00
Rahul Frias
7cb83eb02e Load keys before sending OnKeyStatusChange notifications
[ merge of http://go/wvgerrit/17454 ]

When processing a license or renewal, calls to Set/UpdateLicense
update the policy information. A side effect was introduced whereby
updating the policy may cause (expiration, session key state)
notifications to be sent to the listener. Due to the ordering,
the notifications would be sent before the keys were loaded/refreshed,
which caused issues when the notifications were immediately acted upon.
This has now been corrected.

b/27842970

Change-Id: Id81a71ff48edfa9ca0baafc43267995d5a3e80a6
2016-04-07 15:58:45 -07:00
John "Juce" Bruce
a73dc419fd Restore WVCryptoPlugin Unit Tests
(This is a merge of http://go/wvgerrit/17452)

When the Crypto API was updated, several unit tests were removed, as
they did not work with the new API. This patch restores those tests.

Note that this does not add NEW tests for the new functionality
enabled by the API changes. Those will be coming in a separate patch.
This patch merely restores the previous tests and their functionality.

Bug: 26901698
Change-Id: I3315408804bdc6871b58c3620e482bf6d61fe03b
2016-04-07 12:15:12 -07:00
Rahul Frias
b76eccf32d Return ERROR_INSUFFICIENT_OUTPUT_PROTECTION when appropriate
[ Merge from http://go/wvgerrit/17429 ]

This is to correct for when HDCP validation failure at the OEMCrypto level
ends up returning a CryptoException through MediaCrypto with error code
Unknown Error (-2998).

b/27849488

Change-Id: Ib3a9b1c3a17b9323f3d079a678cf88dedeec3b4b
2016-04-05 16:44:31 -07:00
John Bruce
19c36a64d6 Merge "Move Widevine Unit Tests to Standard gMock" into nyc-dev 2016-04-04 23:13:23 +00:00
Jeff Tinker
971d94e410 Merge "Fix offline playback using widevine sample player" into nyc-dev 2016-04-04 21:27:19 +00:00
Jeff Tinker
ad8e58f6f7 Fix offline playback using widevine sample player
Previously the sample player relied on implementation
details of FileDescriptor.toString() to get the low
level int file descriptor, which changed in N release.
This updates the sample player to use a more reliable
method.

bug: 26422357
Change-Id: I73cc759542994a352eae646a3872ee1125445739
2016-04-04 12:13:53 -07:00
Fred Gylys-Colwell
c42f1e9372 Update Mock Android.mk
Merge from widevine repo of http://go/wvgerrit/17393

This CL changes the installation directory for oemcrypto reference
code. In particular, it uses the new build rules to specifies the library
should go in /vendor/lib instead of /system/lib or /vendor/lib64.

This library should not be used on a production device.

b/26425759

Change-Id: I3a58d0d1ddeb5601b0f2f97cc87c2d4a2a41f0d8
2016-04-01 15:57:56 -07:00