Commit Graph

1243 Commits

Author SHA1 Message Date
Dan Albert
04a484762d am 67099326: Fix build.
* commit '670993262f57c37890cb4b1c600faa4a49434829':
  Fix build.
2014-11-26 03:12:44 +00:00
Dan Albert
670993262f Fix build.
This project is still using stlport (without telling the build system
about it), which was causing (broken) stlport headers to override
libc++ headers, leading to a broken copy of std::enable_if, which in
turn caused <atomic> to fail to compile. Since this project has
prebuilts that will need to be updated before this project can
actually move away from stlport, tell the build system that it is
still using stlport for now.

Bug: 18433002
Change-Id: I38b356428977ed2184eb28a07bd5e7424a4ace8d
(cherry picked from commit de4bc34719)
2014-11-26 03:05:50 +00:00
Dan Albert
0018a108f9 Merge "Fix build." 2014-11-25 21:42:07 +00:00
Dan Albert
de4bc34719 Fix build.
This project is still using stlport (without telling the build system
about it), which was causing (broken) stlport headers to override
libc++ headers, leading to a broken copy of std::enable_if, which in
turn caused <atomic> to fail to compile. Since this project has
prebuilts that will need to be updated before this project can
actually move away from stlport, tell the build system that it is
still using stlport for now.

Bug: 18433002
Change-Id: I38b356428977ed2184eb28a07bd5e7424a4ace8d
2014-11-25 13:41:47 -08:00
Rahul Frias
045c6f614a am 3a586ab2: Report HDCP status of no HDCP device attached
* commit '3a586ab27bb8b5621e12b07fa6a8f1ed5da354a8':
  Report HDCP status of no HDCP device attached
2014-11-25 17:48:15 +00:00
Rahul Frias
3a586ab27b Report HDCP status of no HDCP device attached
OEMCrypto may report an HDCP status of "No HDCP device attached/using
local display with secure path". This is not propagated upto
the server as an appropriate HDCP value did not exist in the
license protocol. This has now been added. Netflix has requested that
this be reported.

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

b/18377309

Change-Id: I3db88c7ab5e79a3c12dbc8a398c4770e14e5ee5c
2014-11-22 01:46:13 -08:00
Fred Gylys-Colwell
967a9704d0 am 5acf3cdc: Save and load usage table in level 3 OEMCrypto
* commit '5acf3cdc3d0c3837267601254a99d336d621e5c0':
  Save and load usage table in level 3 OEMCrypto
2014-11-20 21:23:45 +00:00
Fred Gylys-Colwell
5acf3cdc3d Save and load usage table in level 3 OEMCrypto
This is a merge of the widevine change:
https://widevine-internal-review.googlesource.com/#/c/11781

The OEMCrypto did not save the usage table correctly after a key was
loaded and not used.

Also, oemcrypto uses the keybox to verify and sign the usage table.
On library initialization, the usage table was being loaded before the
keybox, so the signature was not verified correctly.

Both these problems have been corrected.

Current Library Version:
arm:  Level3 Library Nov 19 2014 16:53:43

bug: 17328418 Can't play pinned content
Change-Id: Ia753e2f47b36433931fbe8dba78939581e647222
2014-11-19 17:02:33 -08:00
Rahul Frias
799368207f am dffa3ca9: Merge "MediaDrm throws an exception when Secure Stops are requested" into lmp-mr1-dev
* commit 'dffa3ca991c64035e1852543a215f99935b58c7f':
  MediaDrm throws an exception when Secure Stops are requested
2014-11-14 20:45:36 +00:00
Rahul Frias
dffa3ca991 Merge "MediaDrm throws an exception when Secure Stops are requested" into lmp-mr1-dev 2014-11-14 17:34:14 +00:00
Fred Gylys-Colwell
7d62c39b77 am 9810ff89: Merge "Accept new signing keys for no renewal license" into lmp-mr1-dev
* commit '9810ff8925cb2a82f7423eddb776e9bbd5a8ec4d':
  Accept new signing keys for no renewal license
2014-11-14 00:44:15 +00:00
Rahul Frias
aa7ad630d7 MediaDrm throws an exception when Secure Stops are requested
Our recommendation to OEMs is that they support a table of at least 50
usage entries in OEMCrypto. If more usage entries are stored, the PSTs get
added to the CDM but are LRU'ed out of the OEMCrypto usage table. When the
CDM queries those usage entries, OEMCrypto will return a
OEMCrypto_ERROR_INVALID_CONTEXT. Rather than return an error and have
MediaDrm throw an exception, CDM should delete this PST and return the
next usage entry, when queried.

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

b/17994711

Change-Id: I00e3f93000096fb434d94333e22958de795a4bb5
2014-11-13 12:56:26 -08:00
Fred Gylys-Colwell
9810ff8925 Merge "Accept new signing keys for no renewal license" into lmp-mr1-dev 2014-11-13 17:13:23 +00:00
Fred Gylys-Colwell
a8e11ead04 am 3b1a3e47: Merge "Adjust CDM engine and request license unit tests" into lmp-mr1-dev
* commit '3b1a3e47d8c52e40cdf9c4eabe854d8a04c8aa7f':
  Adjust CDM engine and request license unit tests
2014-11-13 02:18:10 +00:00
Fred Gylys-Colwell
3b1a3e47d8 Merge "Adjust CDM engine and request license unit tests" into lmp-mr1-dev 2014-11-13 01:12:22 +00:00
Fred Gylys-Colwell
c325b3aec3 Accept new signing keys for no renewal license
Merge of widevine change
https://widevine-internal-review.googlesource.com/#/c/11501/

A license response can have new signing (mac) keys attached whether
the license can be renewed or not.  Previously, the new keys were
ignored if the license could not be renewed.

bug: 18009750 Secure stop release generation failing for Netflix

Change-Id: I06dd76b0ab9f459021f46eecc938aa43d8d29689
2014-11-12 16:29:42 -08:00
Fred Gylys-Colwell
9ff5125867 Adjust CDM engine and request license unit tests
Merge of the widevine change:
https://widevine-internal-review.googlesource.com/#/c/11632

Several unit tests in cdm_engine_test.cpp and request_license_test.cpp
were failing regularly. These were caused by either:
1) The device was not provisioned.
  This has been fixed by adding a certificate provisioning step in the
  test setup for the cdm engine tests and changing the existing
  provision steop in the request license tests to provision for both
  security levels.
2) The device was hitting a flaky server.
  This has been fixed by switching from the GooglePlayServer to the
  Widevine server.
3) A null pointer introduced when testing secure stops with an app
  id.  This has been fixed by directly injecting the app id in the unit
  tests.
4) Flaky network connections.  The unit tests were requesting data
  from the server and were timing out after 3 seconds.  I changed that
  to 12 seconds.
5) The tests were searching for an end-of-line marker to find the GLS
  header in the license response message.  The end-of-line marker was
  present in a valid DRM message for almost 1% of the test cases.  This
  code  has been replaced by searching for the string "GLS/1" at the
  begining of the HTML body.

I also added test_printers.cpp that defines functions used by GTest to
print error codes by name instead of numeric value.

This CL changes unit tests only. It does not change any production
code.

bug: 18316036

Change-Id: I3398580059a03114e782ac7ac59e6b0944012df4
2014-11-12 13:57:03 -08:00
John "Juce" Bruce
0f143e248b am abbef3d0: Merge "Fix Typos in License.cpp" into lmp-mr1-dev
* commit 'abbef3d0023ae1f7a8d4dd9e167e1e92ebc61cf1':
  Fix Typos in License.cpp
2014-11-07 22:04:06 +00:00
John "Juce" Bruce
abbef3d002 Merge "Fix Typos in License.cpp" into lmp-mr1-dev 2014-11-07 21:33:24 +00:00
John "Juce" Bruce
4d695de2b0 Fix Typos in License.cpp
(This is a merge of http://go/wvgerrit/11626 in the Widevine CDM
repo.)

Change-Id: Iad48e76a77c285c0e0738b22436dc60cb3704740
2014-11-07 13:21:40 -08:00
John "Juce" Bruce
1d7fb7cdf8 Merge "Add OS Version to Properties" into lmp-mr1-dev
automerge: 039b984

* commit '039b984a752f96038db15922181c7a9ff9736694':
  Add OS Version to Properties
2014-11-07 20:35:46 +00:00
John "Juce" Bruce
039b984a75 Merge "Add OS Version to Properties" into lmp-mr1-dev 2014-11-07 20:04:55 +00:00
John "Juce" Bruce
31f87bc19e Add OS Version to Properties
(This is a merge of http://go/wvgerrit/11613 from the Widevine CDM
repo.)

Adds a property for the OS version, implements it on Android, and
adds it to the license request property bag so that Netflix may
use it to discern the supported capabilities of the CDM.

Bug: 18230738
Change-Id: If5174a108093855314f3e0102b83691e20bb247b
2014-11-07 11:47:51 -08:00
Fred Gylys-Colwell
f9b4b25f46 Merge "Adjust PreventNonceFlood tests" into lmp-mr1-dev
automerge: def3c4d

* commit 'def3c4d5b8aa7739bf8d686399f5e49e84a2ffa0':
  Adjust PreventNonceFlood tests
2014-11-07 19:43:25 +00:00
Fred Gylys-Colwell
def3c4d5b8 Merge "Adjust PreventNonceFlood tests" into lmp-mr1-dev 2014-11-07 19:27:22 +00:00
Edwin Wong
e9091b30db am 59da4188: Remove corrupted license file from storage.
* commit '59da4188833cf281043a08deb788e59cca23b153':
  Remove corrupted license file from storage.
2014-11-07 15:29:28 +00:00
Fred Gylys-Colwell
2ca704e5c0 Adjust PreventNonceFlood tests
The OEMCrypto library should prevent too many nonces from occuring in
a row. Previously, we tested that GenerateNonce generated an error if
there were too many nonce requests.

This CL makes it possible for OEMCrypto to delay the return from
GenerateNonce if there are too many requests.  This is an equally
valid solution to the nonce flood attack.

This is a unit test change only.  No production code is affected.

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

bug: 17630253
Change-Id: Ie97f712d70230cd8e7ea7089da0aa18039673bb4
2014-11-06 22:12:51 -08:00
Alvin Huang
791d35e726 am fb651077: Try to fix the build break caused by WVMExtractorImpl.cpp
* commit 'fb651077bae9ac717e32470ec7db0dc69997efc5':
  Try to fix the build break caused by WVMExtractorImpl.cpp
2014-11-07 04:13:04 +00:00
Edwin Wong
59da418883 Remove corrupted license file from storage.
(This is a port of http://go/wvgerrit/11614 from the
 Widevine repo.)

CDM does not recover if a license file has invalid size
or the hash is incorrect. Remove the corrupted license
file in such cases.

bug: 18002606

Change-Id: I46dec853ce6b2e7c7430297d50df5d30488cde3b
2014-11-06 17:07:48 -08:00
Alvin Huang
fb651077ba Try to fix the build break caused by WVMExtractorImpl.cpp
Merge of https://partner-android-review.googlesource.com/#/c/186263

bug: 18279011

Change-Id: I6d4482827b17ea671a4bd73ab79486583a83fcbf
2014-11-06 21:59:37 +00:00
Jeff Tinker
de11df88dc am 960718a6: Merge "Wire Up Max-Res Plumbing" into lmp-mr1-dev
* commit '960718a673aeda9ead3b68e2722799c8b6fa6b7d':
  Wire Up Max-Res Plumbing
2014-11-06 02:48:17 +00:00
Jeff Tinker
33d0f6b534 am 418887a5: Merge "Add Max-Res Decode Engine to CDM Core" into lmp-mr1-dev
* commit '418887a5e72861c837bc3c579c3ea49ff838e49d':
  Add Max-Res Decode Engine to CDM Core
2014-11-06 02:48:16 +00:00
Fred Gylys-Colwell
35f9c18003 am 20191d99: Allow Secure Stops to be queried and deleted by application ID
* commit '20191d996c1aace4544e0b59466e3a0321e6b980':
  Allow Secure Stops to be queried and deleted by application ID
2014-11-06 02:48:14 +00:00
Jeff Tinker
960718a673 Merge "Wire Up Max-Res Plumbing" into lmp-mr1-dev 2014-11-06 02:36:01 +00:00
Jeff Tinker
418887a5e7 Merge "Add Max-Res Decode Engine to CDM Core" into lmp-mr1-dev 2014-11-06 02:35:56 +00:00
Fred Gylys-Colwell
20191d996c Allow Secure Stops to be queried and deleted by application ID
This CL changes the WVDrmPlugin so that an application can segregate
its secure stops from those of other applications by setting an
application ID.

This CL is a merge of the following Widevine CLs:
https://widevine-internal-review.googlesource.com/#/c/11565/
Add getSecureStop by ssid

https://widevine-internal-review.googlesource.com/#/c/11572
Add getSecureStop by SSID and releaseAllSecureStops by app id.

https://widevine-internal-review.googlesource.com/#/c/11564/
Store Usage Info by App Id (device_file stubs)

https://widevine-internal-review.googlesource.com/#/c/11563/
Add application id to StoreUsageInfo.

https://widevine-internal-review.googlesource.com/#/c/11561/
Added Application ID to PropertySet for secure stop.

bug: 18053197
bug: 18076411
Change-Id: I5444baf67ba1b960dee2dc958bced8de82ab70a3
2014-11-05 17:39:44 -08:00
John "Juce" Bruce
e4252f3861 Wire Up Max-Res Plumbing
(This is a port of http://go/wvgerrit/11556 from the Widevine CDM
repo.)

This wires up the new method on the crypto interface with the core
code that handles the max-res decode.

Bug: 16034599
Change-Id: Id2ea5635bf732eabf1fd33712ff8bab6cf1a1745
2014-11-04 11:55:27 -08:00
John "Juce" Bruce
12821d5968 Add Max-Res Decode Engine to CDM Core
(This is a port of http://go/wvgerrit/11555 from the Widevine CDM
repo.)

Bug: 16034599
Change-Id: Ie69afac7d89e27623adbc84d2baebccf1d1ba6e6
2014-11-04 11:55:23 -08:00
Jeff Tinker
a52bf2233c Ensure crypto gets terminated on error.
automerge: b3650a9

* commit 'b3650a9661a7c1cac1c876f70a040d8a6f523657':
  Ensure crypto gets terminated on error.
2014-10-18 03:30:37 +00:00
Jeff Tinker
b3650a9661 Ensure crypto gets terminated on error.
Change-Id: If5ade69f98eb4511064b649fa5a8544065753d97
related-to-bug: 17062671
2014-10-18 00:48:54 +00:00
John "Juce" Bruce
ce78a7f64a Protect Session ID List With a Lock
automerge: 3da4f9d

* commit '3da4f9d7d502aa544542c3f469b57faa8c23c49b':
  Protect Session ID List With a Lock
2014-10-16 19:28:45 +00:00
John "Juce" Bruce
3da4f9d7d5 Protect Session ID List With a Lock
(This is a merge of
https://widevine-internal-review.googlesource.com/#/c/11405
from the Widevine CDM Repo.)

AUPT is revealing a crash when destructing WVDrmPlugin due to
multi-threaded contention over the session map. As a fix, we are now
protecting access to the map via a mutex.

Bug: 17761616
Change-Id: Iddeca657effd3c7f3ff35ce334d7979291667cef
2014-10-13 13:40:44 -07:00
Fred Gylys-Colwell
1edf1c172c Flush instruction cache for arm in haystack code
automerge: 95658e7

* commit '95658e73b2baf391e0033b407e1b8c4925171faa':
  Flush instruction cache for arm in haystack code
2014-10-05 15:51:55 +00:00
Jeff Tinker
e104128121 Eliminate delay in MediaDrm.closeSession for widevine CDM
automerge: 16abc11

* commit '16abc110bbb1e44ecbf605ea5eb96cbb1229c5e7':
  Eliminate delay in MediaDrm.closeSession for widevine CDM
2014-10-05 05:02:13 +00:00
Jeff Tinker
9e83c8b749 Merge "Report WOULD_BLOCK if buffer is non-empty instead of ERROR_IO" into lmp-dev
automerge: 30e4ba6

* commit '30e4ba61bd8be252ce1f1ab72b5875cbbaa75305':
  Report WOULD_BLOCK if buffer is non-empty instead of ERROR_IO
2014-10-05 03:15:06 +00:00
Lajos Molnar
570417ded5 Dequeue new input buffer once old on is queued
automerge: 63aa037

* commit '63aa037b036b4234b99f34506ae9b246c3651c0a':
  Dequeue new input buffer once old on is queued
2014-10-05 03:12:35 +00:00
Fred Gylys-Colwell
95658e73b2 Flush instruction cache for arm in haystack code
This is a merge of the widevine CL:
https://widevine-internal-review.googlesource.com/11254

On arm64, some devices are having random issues that probaby relate to
a stale instruction cache.  This code change flushes the cache for
pages that are going to be made executable.

b/17400000

Current Library Version:
  arm64:  Level3 Library Sep 25 2014 17:10:03

Change-Id: I3904e96e922654c055a478079aa52c29cbde8b9f
2014-09-30 14:43:22 -07:00
Jeff Tinker
16abc110bb Eliminate delay in MediaDrm.closeSession for widevine CDM
merge of https://widevine-internal-review.googlesource.com/11255
from the widevine cdm repo.

bug: 17657356
Change-Id: Ia228395c412c8d00ef0230f86f4b56469a1e6c69
2014-09-25 18:35:24 -07:00
Jeff Tinker
30e4ba61bd Merge "Report WOULD_BLOCK if buffer is non-empty instead of ERROR_IO" into lmp-dev 2014-09-25 01:51:02 +00:00
Jeff Tinker
e82044e05d Report WOULD_BLOCK if buffer is non-empty instead of ERROR_IO
Bug: 17423087
Change-Id: I4b1c5ead919649be3b820f63a030acac729fb06e
2014-09-25 01:39:29 +00:00