Commit Graph

627 Commits

Author SHA1 Message Date
Rahul Frias
6af72cb3b4 Merge "Enable CDM integration tests to run against staging" 2015-09-11 20:44:02 +00:00
Rahul Frias
48feb576e6 Enable CDM integration tests to run against staging
[ Merge of https://go/wvgerrit/15534 ]

Added command line support and configuration information.
Removed secure transfer, full path and port options from the usage
message as they are not supported.

b/23593222

Change-Id: I7d4cdb4b4db543a6302c742bfc2d2572d75957bd
2015-09-10 14:13:10 -07:00
Rahul Frias
199cfb8f19 Make OEM Crypto API version available through mediaDrm properties
[ Merge of http://go/wvgerrit/15540 ]

b/22771529

Change-Id: I8a3d3b3d7a943c531ef0ff2c860442e0690b9175
2015-09-08 16:33:58 -07:00
Fred Gylys-Colwell
c94912d197 Compile Level 3 OEMCrypto on Emulators
Merge from Widevine of http://go/wvgerrit/15507

This change recompiles the oemcrypto libraries on the emulators
because those should have the "least common denomintor" of compiler
options.

New Versions:
android/level3/mips/libwvlevel3.a  Level3 Library Aug 27 2015 11:53:29
android/level3/arm/libwvlevel3.a  Level3 Library Aug 27 2015 11:43:45
android/level3/x86/libwvlevel3.a  Level3 Library Aug 27 2015 11:48:16

bug: 21766765
Change-Id: Ic69bacd71af835df940af1c21166b0ade57abf04
2015-08-27 11:57:08 -07:00
Rahul Frias
265fa9d9b2 am 178cadfc: am 25a6185c: Address releaseAllSecureStops crash
* commit '178cadfce145b6164d4ff7c693e996bf1536b98b':
  Address releaseAllSecureStops crash
2015-08-25 19:09:31 +00:00
Rahul Frias
178cadfce1 am 25a6185c: Address releaseAllSecureStops crash
* commit '25a6185c8434c62af73d2c6c91bda5fc50d20ca7':
  Address releaseAllSecureStops crash
2015-08-25 19:05:30 +00:00
Rahul Frias
25a6185c84 Address releaseAllSecureStops crash
[ Merge of http://go/wvgerrit/15474 ]

Changes to releaseAllSecureStops made use of a session that was
initialized only if getSecureStops had been previously called. If it was not,
accessing the session resulted in a segfault. This was uncovered by a change
in how the Netflix app invoked mediaDrm.

b/23498809

Change-Id: Ib426ae1830c3a42c5e0849f1b6e8bbfe0d2c74ff
2015-08-25 10:40:12 -07:00
John Bruce
da6a221f91 am 67b5d921: am 0e1839ac: Merge "Do Not Clean Up Licenses As Aggressively" into mnc-dev
* commit '67b5d9216d192025ffe7d3e2e6ba82d76ee6942d':
  Do Not Clean Up Licenses As Aggressively
2015-08-20 22:22:28 +00:00
John Bruce
67b5d9216d am 0e1839ac: Merge "Do Not Clean Up Licenses As Aggressively" into mnc-dev
* commit '0e1839ac4d4b540f46db83684b436d400fe4a292':
  Do Not Clean Up Licenses As Aggressively
2015-08-20 22:13:15 +00:00
John Bruce
0e1839ac4d Merge "Do Not Clean Up Licenses As Aggressively" into mnc-dev 2015-08-20 21:21:43 +00:00
Jeff Tinker
f0eb4b9045 am d38fc184: am 1319c433: Part of fix for libmedia OOB write anywhere
* commit 'd38fc184a7dc544d064d8086f5e72092debaa413':
  Part of fix for libmedia OOB write anywhere
2015-08-19 23:18:19 +00:00
Jeff Tinker
d38fc184a7 am 1319c433: Part of fix for libmedia OOB write anywhere
* commit '1319c43361cc8fdd3e2ce61db4185e38f128e76b':
  Part of fix for libmedia OOB write anywhere
2015-08-19 23:13:05 +00:00
John "Juce" Bruce
1d4339d0df Do Not Clean Up Licenses As Aggressively
(This is a merge of http://go/wvgerrit/15430)

Previously, after provisioning, any existing offline licenses would be
deleted, as they were inevitably tied to the certificate that was just
replaced. However, due to the way per-origin provisioning works on
Android, this is no longer a safe assumption. Licenses from different
origins are all stored together, so this behavior would delete all
offline licenses across all origins every time any origin is
provisioned. And it is not possible to delete only the licenses for
specific origins without changing how licenses are stored. It is too
late to change how licenses are stored in Android M, so we need to
stop proactively cleaning up licenses in this edge case for now. Once
b/23354606 is resolved, we can reinstate this clean-up and properly
only clean up the licenses associated with the origin that was just
provisioned.

Bug: 23324167
Change-Id: Ic21db8c21bdb4243266cd49020ed52287eb21d9a
2015-08-19 21:21:44 +00:00
Jeff Tinker
1319c43361 Part of fix for libmedia OOB write anywhere
Prevent usage of client provided address on
non-secure devices spoofed as being secure.

b/23223325

merge of go/wvgerrit/15420 from widevine repo

Change-Id: I1d4f3a652b3d5e78fca508f92005cfa8df5ec6db
2015-08-17 17:56:27 -07:00
Fred Gylys-Colwell
150a6ea02a am c0455244: am 9a714edc: Merge "Fix RSA Key Padding in OEMCrypto Unit Tests" into mnc-dev
* commit 'c0455244631e8fd2627a5a95c9d956727b6a162c':
  Fix RSA Key Padding in OEMCrypto Unit Tests
2015-08-16 03:02:11 +00:00
Fred Gylys-Colwell
c045524463 am 9a714edc: Merge "Fix RSA Key Padding in OEMCrypto Unit Tests" into mnc-dev
* commit '9a714edc6f6accfda151c2d728e316017d21efb4':
  Fix RSA Key Padding in OEMCrypto Unit Tests
2015-08-16 02:54:29 +00:00
Fred Gylys-Colwell
9a714edc6f Merge "Fix RSA Key Padding in OEMCrypto Unit Tests" into mnc-dev 2015-08-14 22:01:06 +00:00
Fred Gylys-Colwell
bb3f9edb25 am 631d3e7a: Relax test on forbidden signing [DO NOT MERGE]
* commit '631d3e7a4c509c9a231959f07f58f311dc038579':
  Relax test on forbidden signing  [DO NOT MERGE]
2015-08-12 01:25:47 +00:00
Fred Gylys-Colwell
631d3e7a4c Relax test on forbidden signing [DO NOT MERGE]
Copy from widevine repo of http://go/wvgerrit/15390

Because some devices are failing oemcrypto unit tests related to
signing schemes that they do not support, we are relaxing the
requirement that they return the correct error code.

We are still requiring that the device does NOT sign with a forbidden
scheme.  However, it is OK if they do not return an error code from
OEMCrypto_GenerateRSASignature.   They will be required to return the
correct error code in the next release.

bug: 21668896
bug: 21708882

Change-Id: I1b8a410909b364d0086cba38eadca11aceaac5f6
2015-08-11 17:05:20 -07:00
Fred Gylys-Colwell
29e08f2166 Fix RSA Key Padding in OEMCrypto Unit Tests
Merge from widevine of http://go/wvgerrit/15371

incorrectly have leading 0x00 bytes added to all integers.  This
leading 0 should only be added to integers that had a leading byte
larger than 0x80 because those would be parsed as negative numbers.

bug: 23105200
Change-Id: I1dd01cc2b83a807bbdb78c079c6ce4e01d41f616
2015-08-11 13:52:50 -07:00
Rahul Frias
8fa20543d1 am ae28e741: am 496bfc87: Correct android release version number in tests
* commit 'ae28e74144eca30363925269391ed1261c7d4d87':
  Correct android release version number in tests
2015-08-05 07:16:35 +00:00
Rahul Frias
ae28e74144 am 496bfc87: Correct android release version number in tests
* commit '496bfc87b31fc31d4a04542cb1877d7be28ec911':
  Correct android release version number in tests
2015-08-05 07:11:32 +00:00
Rahul Frias
496bfc87b3 Correct android release version number in tests
[ Merge of http://go/wv/15293 ]

b/22916797

Change-Id: I120bae5e656c6d766f8ab7a21d578f17ff22d37a
2015-08-04 14:59:08 -07:00
Rahul Frias
bd8b7f231a am 93f5f1cd: am bf100619: Merge "Verification of client identification in Secure Stop messages" into mnc-dev
* commit '93f5f1cda8986f0455d400bcae348ef2cd024b32':
  Verification of client identification in Secure Stop messages
2015-07-14 16:52:42 +00:00
Rahul Frias
93f5f1cda8 am bf100619: Merge "Verification of client identification in Secure Stop messages" into mnc-dev
* commit 'bf10061929aebb2ddf088b4daad42458ac8eefa4':
  Verification of client identification in Secure Stop messages
2015-07-14 16:30:22 +00:00
Rahul Frias
bf10061929 Merge "Verification of client identification in Secure Stop messages" into mnc-dev 2015-07-13 18:45:18 +00:00
Jeff Tinker
a87caa88bd am 59a9f8e3: am 47014df2: Return specific error code when decrypting on invalid session
* commit '59a9f8e37eb723780d6f463531a07d00a8b753b2':
  Return specific error code when decrypting on invalid session
2015-07-08 02:07:29 +00:00
Jeff Tinker
59a9f8e37e am 47014df2: Return specific error code when decrypting on invalid session
* commit '47014df2e8b8a3bc350a170ae3d15230332a505a':
  Return specific error code when decrypting on invalid session
2015-07-08 01:37:28 +00:00
Jeff Tinker
47014df2e8 Return specific error code when decrypting on invalid session
bug: 22235465
Change-Id: I7b4d47d86d35270291ced02112a96800ba03ed1a
2015-07-07 08:55:22 -07:00
Rahul Frias
12ccd847cf Verification of client identification in Secure Stop messages
[ Merge of http://go/wvgerrit/14993 ]

b/22047007

Change-Id: I8f3de72f0746fad4a2382a826cb301408398a4c4
2015-07-06 15:23:24 -07:00
Fred Gylys-Colwell
b1ddcf1495 am 03f523ca: am e280ba6c: Merge "Add Short Key ID Test" into mnc-dev
* commit '03f523cab014cc3169d603d289dd51f9ca9ee71e':
  Add Short Key ID Test
2015-07-04 08:04:40 +00:00
Kyle Alexander
c6ff29c6c3 am bc14139f: am 86adf4a2: Add secure VP9 content to GTS content list.
* commit 'bc14139fc02caad4ded8faa4dbbf7697e50924f2':
  Add secure VP9 content to GTS content list.
2015-07-04 08:04:40 +00:00
Fred Gylys-Colwell
03f523cab0 am e280ba6c: Merge "Add Short Key ID Test" into mnc-dev
* commit 'e280ba6c4149f4631df9f7e301b81c44aa228dc6':
  Add Short Key ID Test
2015-07-02 01:09:42 +00:00
Kyle Alexander
bc14139fc0 am 86adf4a2: Add secure VP9 content to GTS content list.
* commit '86adf4a25ce0f1ead40c9877ff981d30f5c9cbc2':
  Add secure VP9 content to GTS content list.
2015-07-02 01:09:41 +00:00
Fred Gylys-Colwell
e280ba6c41 Merge "Add Short Key ID Test" into mnc-dev 2015-07-01 22:50:10 +00:00
Fred Gylys-Colwell
4b3c02267a Add Short Key ID Test
Merge from widevine repo of http://go/wvgerrit/14970

Even if devices cannot handle key ids with different lengths in the
same license, they should still handle keys with a shorter key id.

This is a partial fix for:
bug: 21935358

Change-Id: Ibc84f0b5d7d9bc5d24a2081f0581a2b256e51f44
2015-07-01 13:21:21 -07:00
Kyle Alexander
86adf4a25c Add secure VP9 content to GTS content list.
ExoPlayerDemo build is based on the demo-debug.apk built from:
google3/third_party/java_src/android_libs/exoplayer

Supporting cl in google3: cl/97176187

Bug: 19571315
Change-Id: I611e9e5f363ecfeb66e4813c1f6939abbf855d09
2015-07-01 10:02:49 -07:00
Fred Gylys-Colwell
84efb88c28 Do not depend on wvcdm::Clock in OEC tests
Merge from widevine repo of http://go/wvgerrit/14669

This fixes two timing-related test failures when running the OEMCrypto
tests in the CE test suite.  The failures were caused by the TestHost
Clock implementation, which is a fake.  Since there is no clear reason
for OEMCrypto/mock to rely on wvcdm::Clock, this replaces it with
time(NULL).  Incidentally, this also makes the time source consistent
with the tests themselves, which were already using time(NULL).

Change-Id: I0fad51f14d45f99526146da05b757d4ba7b6aba0
2015-06-29 18:17:15 -07:00
Fred Gylys-Colwell
54bb6ea3c8 Add Comment to DecryptWithNearWrap
Merge from widevine repo of http://go/wvgerrit/14933

There was some confusion what the test DecryptWithNearWrap is
testing.  This CL adds some expanatory comments.

Change-Id: I9228830d81c089f80e0878f647e7e94c3e49896a
2015-06-29 18:16:21 -07:00
Rahul Frias
49022130db am 460d24b1: Merge "Return Client Identification information in Secure Stop" into mnc-dev
* commit '460d24b135bc601f712b432ba915bd2009fe230a':
  Return Client Identification information in Secure Stop
2015-06-29 23:26:02 +00:00
Rahul Frias
5bda807161 am 6e2cc1a3: Avoid multiple deletions of a usage entry
* commit '6e2cc1a3ed53d2fed2ad87edbcda4fac37313fb0':
  Avoid multiple deletions of a usage entry
2015-06-29 23:26:01 +00:00
Rahul Frias
460d24b135 Merge "Return Client Identification information in Secure Stop" into mnc-dev 2015-06-29 22:59:47 +00:00
Rahul Frias
6e2cc1a3ed Avoid multiple deletions of a usage entry
[ Merge of http://go/wvgerrit/14900 ]

When releasing a license, usage entries were being released twice with
both OEMCrypto_DeleteUsageEntry and OEMCrypto_ForceDeleteUsageEntry being
called. The second call would always fail because the usage information had
already been released. The CdmSession::DeleteLicense methods will now only
handles deletion of license metadata and leave deletion of usage entries to
the CdmLicense class.
b/22097805

Change-Id: Ic55764d5357043d136e7d88583f709a4ceea3e64
2015-06-29 14:47:24 -07:00
Rahul Frias
d220d41425 Return Client Identification information in Secure Stop
[ Merge of http://go/wvgerrit/14920 ]

The renew_with_client_id field was not being correctly set when licenses
were being restored for usage reporting.

b/22047007

Change-Id: Ib769431b1e49bb498f53d8153a970b6c0a2776d2
2015-06-29 14:06:17 -07:00
Rahul Frias
d58ac8094f am 57eb7cb6: Merge "Add unit tests for offline licenses without session usage" into mnc-dev
* commit '57eb7cb6ba415634aa90fbb2d7b63561f1b6416d':
  Add unit tests for offline licenses without session usage
2015-06-25 15:12:30 +00:00
Rahul Frias
57eb7cb6ba Merge "Add unit tests for offline licenses without session usage" into mnc-dev 2015-06-25 06:40:21 +00:00
Fred Gylys-Colwell
3f34e492b9 am 66603102: Make MaxSessionsOpenCloseAPI10 More Lenient
* commit '666031026ca8e85a87b90922e4af1b8b633b3aac':
  Make MaxSessionsOpenCloseAPI10 More Lenient
2015-06-25 05:20:54 +00:00
Fred Gylys-Colwell
666031026c Make MaxSessionsOpenCloseAPI10 More Lenient
Merge from widevine repo of http://go/wvgerrit/14870

OEMCrypto_GetMaxNumberOfSessions is not required to return a hard
limit for the number of sessions.  This CL adjusts the test to verify
we can open within 5% of the maximum number of sessions.

bug: 22029687
Change-Id: I6e72e39338cead8d547cdb194a32fb7e7dc53037
2015-06-24 17:49:06 -07:00
Tim Kilbourn
c74222f523 Rename the internal copy of gmock.
The external/gmock project does not include the patches needed for
widevine, so renaming the internal copy allows both to coexist in the
build system.

(cherry-pick of 5b830f19b6 with conflict.)

Change-Id: I77c956db30921afffe31d11e1cd2d99541925f35
2015-06-23 16:00:47 -07:00
Rahul Frias
f5f2e826f2 Add unit tests for offline licenses without session usage
[ Merge of http://go/wvgerrit/14824 ]

OEMCrypto v9 added support for secure usage reporting with the help of
a session usage table. This was enabled through the replay control bits
in the key control block. It was expected that streaming licenses
would enable the nonce required bit, while offline licenses would
enable session usage table entry flag. There are certain cases
where content providers would prefer not to enable the flag for offline
licenses and this test verifies that this scenario works.

b/17514500

Change-Id: Icd1bea8cec2fd52be2be249424891ce1755d5f25
2015-06-22 15:38:33 -07:00