Commit Graph

1212 Commits

Author SHA1 Message Date
Jeff Tinker
7c28090a61 Annotate logcat with current running test
It's hard to correlate test failures with the tests that
were running when looking in the logcat.  This change adds
the current test name in the log for each test to make it
more clear.

Merge of go/wvgerrit/#/c/13847/ from the widevine cdm repo

b/19822500

Change-Id: Idd37a22f7063d9d686d3ead567954b86fb0fa70f
2015-03-26 13:47:36 -07:00
Edwin Wong
c47712f5a3 Change protobuff field name to anti_rollback_usage_table.
Change anti_rollback_hardware_present field name in ClientCapabilities
message to indicate the field is for usage table rollback prevention.

Merge from go/wvgerrit/13817.

bug: 19869828
Change-Id: I982bfe484aa39a54d0c3a9ae60dd9e46351385d9
2015-03-26 11:24:51 -07:00
KongQun Yang
6dd2d97452 Fix CDM request license unit test failures
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13821/

Change-Id: Iad889388c7d38679a0c5cb881a53c94e9d30f4f1
2015-03-24 15:57:36 -07:00
Jeff Tinker
a0e6f2804e WV DRM plugin stubs to report key request type for unprefixed EME
This CL allows the framework CLs to compile.  The stubs need to
be implemented properly in the DRM plugin and CDM.

bug: 19771299
Change-Id: I9e4b107370a4d73851ee28bcb9ab6087fdffeb13
2015-03-23 17:02:04 -07:00
KongQun Yang
6d9e0302f2 Merge "Refactor WvCdmEventListener and some cleanups" 2015-03-23 16:44:26 +00:00
Edwin Wong
f65c88d35c Fix GetResponse() return type usage and log response data if error occurs.
The return type of GetResponse() has been changed from int to bool a while back.
Fix the return type in unit tests that were still expecting int as the return type.
Also log the response message if there is an error in the http response.

Merged from go/wvgerrit/13783.

bug: 19822500
Change-Id: Ie52df0e19744a847690b788680f59915b0b6b534
2015-03-20 14:36:12 -07:00
Fred Gylys-Colwell
6af73ee6d7 Use HDCP capability with requested security level
Merge of http://go/wvgerrit/13750 in the Widevine repo.
(titled: Add HDCP Capacity to the static adpater)

Updates CryptoSession to use get the HDCP capability from the
oemcrypto with requested security level.

Change-Id: I2338a3f33d0fbe9fe43eb6bf1fe92bf5402f62d6
2015-03-20 12:24:39 -07:00
KongQun Yang
fddbc89136 Refactor WvCdmEventListener and some cleanups
Bug: 19771437

It is a merge of below CLs from Widevine CDM repo:

Clean up CdmSession and PolicyEngine testing injection
https://widevine-internal-review.googlesource.com/#/c/13700

Refactor WvCdmEventListener handling
https://widevine-internal-review.googlesource.com/#/c/13702

Change-Id: I356b90000c056113d394926862b859aab380d305
2015-03-20 11:25:52 -07:00
Fred Gylys-Colwell
69d7ffb22d Update key control block verification
This is a merge of http://go/wvgerrit/13752

Replace the mock's macro with a memcmp because that is
even cleaner.

Change-Id: Ie402689ca9e14a67736db7eea928204f067427ac
2015-03-19 20:49:14 -07:00
Fred Gylys-Colwell
047f543e7c Improve OEMCrypto unit tests
This is a merge of http://go/wvgerrit/13701 and http://go/wvgerrit/13780.

I added a new set of engine properties for the mock oemcrypto.  This
set pretends to be level 1. This allows the widevine build bot to test
the dual security level path: a level 1 liboemcrypto.so and a fall
back to L3.

I also adjusted the failing test in oemcrypto_test.cpp.  A correct fix
requires us to rewrite some of the oemcrypto mock code so that it
returns real error codes instead of just 'false' on error.

Change-Id: I9cdbfc23c87ad2fb6068eac1394ce4c5b6a32dae
2015-03-19 15:08:10 -07:00
Fred Gylys-Colwell
d2ba3a3f91 Allow selective removal of Usage Table Entries by PST
This is a merge of http://go/wvgerrit/13693 in the Widevine
repository.

This adds level 3 and mock implementation and unit tests for the
OEMCrypto function OEMCrypto_ForceDeleteUsageEntry.  It also plumbs
this function up into CdmEngine, CdmSession, and CryptoSession so that
deleting all usage information for a given app id will now delete the
entries in OEMCrypto, too.

b/18194071

Change-Id: Iaea4034a507b323878657215784edfe95876386a
2015-03-18 18:09:37 -07:00
Edwin Wong
a7887f60fc Add OEMCrypto_IsAntiRollbackHwPresent API for OEMCrypto v10.
Merge from WV CDM repo: https://widevine-internal-review.googlesource.com/#/c/13660/.

bug: 18948905
Change-Id: I1ffe72baaac9abf05c06139de790236e763f89a8
2015-03-18 17:53:17 -07:00
KongQun Yang
a8243b75fe Merge changes Id261ab16,I0aca81b9
* changes:
  Make GetMaxNumberOfSessions and GetNumberOfOpenSessions security level aware
  Add test for OEMCrypto_ERROR_TOO_MANY_SESSIONS
2015-03-18 23:53:28 +00:00
KongQun Yang
ef04608109 Merge "Use requested_security_level_ in SupportsUsageTable" 2015-03-18 22:40:17 +00:00
KongQun Yang
c88c681050 Make GetMaxNumberOfSessions and GetNumberOfOpenSessions security level aware
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13662/

Change-Id: Id261ab16c4f987dbee78b3ecde4beebbf44f5371
2015-03-17 17:29:54 -07:00
KongQun Yang
fa055673d5 Add test for OEMCrypto_ERROR_TOO_MANY_SESSIONS
Also restore the requirement that OEMCrypto shall support at least
8 sessions.

Bug: 19641109

Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13570/

Change-Id: I0aca81b9fe1f4f6505ddf91bcf399ac910b654aa
2015-03-17 17:25:53 -07:00
KongQun Yang
46f26fe6ae Implement OEMCrypto_GetNumberOfOpenSessions
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13560/

Change-Id: Ie19bf3e57d0c4b1621b95bd5912a751ccfbaaa7b
2015-03-17 17:25:33 -07:00
Fred Gylys-Colwell
bd2ac27684 Add backwards compatibility for OEMCrypto version 9
This is a merge of http://go/wvgerrit/13710

The oemcrypto adapter loads a version 8, 9 or 10 library and adds
backwards compatibility for version 8 or 9.

The only function whose signature has changed from v9 to v10 is
OEMCrypto_GetHDCPCability. This CL adds backwards compatibility for
that function.

Level 3 libraries are now:
level3/arm/libwvlevel3.a  Level3 Library Mar 17 2015 14:33:34
level3/x86/libwvlevel3.a  Level3 Library Mar 17 2015 14:30:23

b/19785099 L1 Widevine missing/broken on master (Fugu)
b/19789909 L1 Widevine missing on master (AAY75B)

Change-Id: I9bd716f5cdffaf1bfbdfcd8ed067af3f5d0ac9ba
2015-03-17 15:35:56 -07:00
KongQun Yang
9ee523a3cd Use requested_security_level_ in SupportsUsageTable
Also fix a build warning from an earlier CL.

Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13669/

Change-Id: I87f161afac76e622869e5370e4f63476cb3ea97f
2015-03-16 14:59:13 -07:00
Fred Gylys-Colwell
12a986f808 Clean up some compiler warnings
This is a cherry pick of http://go/wvgerrit/13665

Added a few static casts and removed some unused parameters.

Change-Id: I4f2d1c26580a188de429defc8d1d22757f4c6917
2015-03-16 11:31:48 -07:00
KongQun Yang
76eca48f76 Merge "Defines placeholder for v10 APIs in oemcrypto_adapter_dynamic" 2015-03-13 01:31:49 +00:00
Fred Gylys-Colwell
d266f6010b Merge "Docment OEMCrypto changes from v9 to v10." 2015-03-12 21:11:27 +00:00
Fred Gylys-Colwell
c5e0b1bb05 Docment OEMCrypto changes from v9 to v10.
This is a merge of http://go/wvgerrit/13391 from the Widevine
repository.  Most of the changes were already merged, but I forgot to
"git add" this new file.

Change-Id: Ie6875dc7f0d5a81c04bc5247e7d5ae0d033f695b
2015-03-12 11:59:40 -07:00
KongQun Yang
6109cddb6f Defines placeholder for v10 APIs in oemcrypto_adapter_dynamic
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13610

Change-Id: Ibc0b8f372e752ec217b6bcfc01aee5dcbb5a5c99
2015-03-12 09:57:57 -07:00
KongQun Yang
7e5d016531 Reorder OEMCrypto definitions according to OEMCryptoCENC.h
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13510/

Change-Id: I0ce612a5ff2167704a87e3b3b650beaddf095c61
2015-03-12 09:21:40 -07:00
Fred Gylys-Colwell
68034dd900 OEMCrypto Version 10 API
This is a merge of http://go/wvgerrit/13391 from the Widevine repository.

This CL adds the OEMCrypto version 10 API to the header, and changes
just enough code so that code still compiles.  There are no unit tests
or implementation.

The level 3 libraries are just stubs so that tests will compile.
level3/arm/libwvlevel3.a  Level3 Library Mar 11 2015 13:33:21
level3/x86/libwvlevel3.a  Level3 Library Mar 11 2015 15:20:27

Change-Id: I41de753a2a60da29b756c3327341ece72069d8bb
2015-03-11 15:29:45 -07:00
John "Juce" Bruce
3398b1f8e7 Fix Repository Inconsistencies from LMP
Back when we were being proactive about merging LMP changes to master
in the Widevine repository, there were a few changes that got merged
in a different form than what got checked into the Android repository.
Mostly, this happened due to several large core changes that were
brought over to the master branch in multiple parts so as not to break
other teams using the Widevine repository. This patch brings the two
trees in sync.

Change-Id: I4e56a742686d73d1c6ace209684ce0e8542fd93f
2015-03-11 13:26:23 -07:00
John "Juce" Bruce
85daefb89d Restore Lost Formatting Fixes
Due to merges happening out-of-order, some formatting fixes that had
previously been merged from the Widevine repository were subsequently
wiped out by later merges.

Change-Id: I9f02d281d276b0f5b5f93b02a699144400db7520
2015-03-11 11:47:05 -07:00
John "Juce" Bruce
1bd405fc40 Merge Tweaks Originating in Merge Review Comments
This merges several small changes that were made in response to
comments that arose when LMP changes were merged into the Widevine
repository's master branch.

Change-Id: Ifec968af54dbc3288f24654ec0c6ca9b5962e1aa
2015-03-10 16:08:20 -07:00
Jeff Tinker
fb6d83398c Merge "Specify OEMCrypto API version in client capabilities"
Merges missing bits from the Widevine CDM repo for
https://widevine-internal-review.googlesource.com/#/c/10653

Most of this change was submitted into lmp-dev, but some tests
were ommitted.  This CL completes the missing changes from the
original widevine repo commit.

It also fixes some missing test installation commands.

b/15388863

Change-Id: Id59d885780134c6c6863477f8c49fb9d8ffe509d
2015-03-10 23:03:20 +00:00
John "Juce" Bruce
f17ef05ebf Fix Build
A nonexistant member field was being initialized.

Change-Id: I12b0917e70e163e71f09d5d4c03fd0bd59ad6002
2015-03-10 14:55:41 -07:00
Fred Gylys-Colwell
4e6fd5d2d8 Merge "Lock session list in CdmEngine OnTimerEvent (master)" 2015-03-10 20:48:13 +00:00
John Bruce
7c9d1224d2 Merge "Cleanup namespace ending comment" 2015-03-10 18:48:52 +00:00
KongQun Yang
c495694601 Merge "Merge MaxNumberOfSessions changes from CDM" 2015-03-10 00:31:05 +00:00
John "Juce" Bruce
da10592386 Merge "Drop google3 BUILD and OWNERS files for stringencoders." 2015-03-09 21:16:33 +00:00
John "Juce" Bruce
2667effe19 Drop google3 BUILD and OWNERS files for stringencoders.
This is a merge of http://go/wvgerrit/12740 from the Widevine CDM
repository.

Change-Id: I1dc40b464d6ea6edf9d62e0a04e18da99d0ae05e
2015-03-09 13:43:00 -07:00
KongQun Yang
0a564039ca Cleanup namespace ending comment
(This is a merge of http://go/wvgerrit/13400 from the Widevine CDM
repository.)

Replace "};  // namespace" with "}  // namespace":
ag -l --ignore-dir third_party "};  //" | \
while read f; do sed -r -i 's/\};  \/\//}  \/\//' $f ; done

Replace "// unnamed namespace" with "// namespace":
ag -l --ignore-dir third_party "unnamed namespace" | \
while read f; do sed -r -i 's/unnamed namespace/namespace/' $f ; done

Change-Id: I50ece9a127ce669f15cd532dfae1dd741338a075
2015-03-09 13:05:25 -07:00
KongQun Yang
23c95a1251 Merge MaxNumberOfSessions changes from CDM
Bug: 18377675

Implement new OEMCrypto function to get max number of sessions
https://widevine-internal-review.googlesource.com/#/c/12980/

Add oemcrypto static adapter for v9
https://widevine-internal-review.googlesource.com/#/c/13022/

Support new property to query MaxNumberOfSessions in CDM
https://widevine-internal-review.googlesource.com/#/c/13020/

Fix GetHdcpCapabilities incorrect return if not initialized
https://widevine-internal-review.googlesource.com/#/c/13210/

Change-Id: I02738c543cedd6e38d8826f845fec6cb2b1ede3c
2015-03-09 13:05:21 -07:00
KongQun Yang
ec0b7aae14 Merge "Exit on error when build and run Android unit tests" 2015-03-09 20:02:28 +00:00
KongQun Yang
891bd057f4 Merge "Fix race condition in CDM policy timer" 2015-03-09 19:04:04 +00:00
John "Juce" Bruce
978f530e8b Merge "Fix C++11 Narrowing Errors in WVDrmPlugin" 2015-03-09 19:03:12 +00:00
John "Juce" Bruce
625d8ed99a Merge "Generate New Obfuscated L3 Libraries for Android" 2015-03-09 19:02:22 +00:00
KongQun Yang
e3f668785e Exit on error when build and run Android unit tests
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13200/

Change-Id: Ifd785a9b30293746f0ae0262b37f03bc905a5e09
2015-03-06 16:57:01 -08:00
KongQun Yang
87f179307f Fix race condition in CDM policy timer
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13345/

Bug: 19592752
Change-Id: I73a215f9e67330caaced0110262448973aaae0a7
2015-03-06 16:41:35 -08:00
John "Juce" Bruce
854a47981a Generate New Obfuscated L3 Libraries for Android
(This is a merge of http://go/wvgerrit/13420 from the Widevine
repository.)

Generates new obfuscated libraries that include @kqyang's recent
changes to add OEMCrypto_GetMaxNumberOfSessions().

libwvdrmengine/level3/arm/libwvlevel3.a  Level3 Library Mar  6 2015 15:16:17
libwvdrmengine/level3/x86/libwvlevel3.a  Level3 Library Mar  6 2015 15:20:30

Change-Id: Ibea299a372617f98c0f24861c673f56a97845ad8
2015-03-06 16:14:18 -08:00
Fred Gylys-Colwell
6444332cd7 Lock session list in CdmEngine OnTimerEvent (master)
Cherry pick of
https://widevine-internal-review.googlesource.com/#/c/12935/

Change-Id: I029d36b2b6d092ae938fca2a7f6d893814c25a8a
2015-03-06 16:00:37 -08:00
John "Juce" Bruce
b331822558 Fix C++11 Narrowing Errors in WVDrmPlugin
(This contains a merge of http://go/wvgerrit/13382 from the Widevine
repository.)

This undoes the previous change to silence harmless C++11 narrowing
warnings and instead changes the code to no longer trigger them. The
fix was to delcare the type of our PSSH prefix constant to be uint8_t*
and then convert it to char* at usage-time rather than defining the
not-technically-char* data as a char* to start.

Change-Id: I68ff8c3ed0859096863b49c61cd60ae8461b5b29
2015-03-06 15:57:40 -08:00
John "Juce" Bruce
2c809b62ca Replace Uses of .compare() in Device Files
(This is a merge of http://go/wvgerrit/13390 from the Widevine CDM
repository.)

Change-Id: I5b3595d5ef52b670e5ba5019746f03d934ae9625
2015-03-06 12:06:47 -08:00
John "Juce" Bruce
a3b0d83d19 Run clang-format on Core
This copies over formatting changes from the Widevine CDM repository
that resulted from running clang-format with Google style on the
shared core/ directory. It also copies over some rewordings of log
messages that were made at the same time.

Aside from the changed log messages, this should not affect behavior
or functionality.

Change-Id: I69c57c188f7a79f30fa3517afeed17365929b6b6
2015-03-05 16:46:01 -08:00
John "Juce" Bruce
dff91b48c1 Merge "Generate Key Set IDs at Key Request Generation Time" 2015-03-05 20:05:13 +00:00