Commit Graph

1086 Commits

Author SHA1 Message Date
Rahul Frias
0dbc087eab Correct openssl error logging
[ Merge of http://go/wvgerrit/29041/ ]

Releasing allocated BIO buffers before logging failure causes the
openssl error to be erased.

b/62486203

Test: Ran WV unit, integration tests on angler

Change-Id: I3315edae2d3bd34887569ab88817f9591c12f409
2017-06-24 17:13:32 -07:00
Jiyong Park
a6bc2c61e1 Merge "Use libstagefright_foundation_vendor" into oc-dr1-dev am: 5fb6323de8
am: 56102aedaf

Change-Id: I36c0ab87259211dff17af78227c7fd7e51da9bda
2017-06-20 05:48:56 +00:00
TreeHugger Robot
5fb6323de8 Merge "Use libstagefright_foundation_vendor" into oc-dr1-dev 2017-06-20 05:40:13 +00:00
John W. Bruce
3459020b00 Pass CdmIdentifier to UsageInfo Methods am: 43b8522b70 am: ed50683f80
am: 6db464ca54

Change-Id: I4dd629161df7a1f1e07b1913d8cf422ef58e8c6d
2017-06-20 00:15:50 +00:00
John W. Bruce
ed50683f80 Pass CdmIdentifier to UsageInfo Methods
am: 43b8522b70

Change-Id: Ida417b7043115f54c9b8daaa75d417dea39aafe6
2017-06-19 23:32:23 +00:00
John W. Bruce
43b8522b70 Pass CdmIdentifier to UsageInfo Methods
The methods on WvContentDecryptionModule related to UsageInfo (Secure
Stops) do not work if kDefaultCdmIdentifier has not been provisioned.
This can occur if an app provisions and uses an origin without any app
on that device ever provisioning the default origin. More concerningly,
this will happen 100% of the time on SPOID-using devices, as there is no
way to provision the default identifier on these devices.

The fix is to pass the current identifier to these methods so that they
do not have to use kDefaultCdmIdentifier.

Test: build_and_run_all_unit_tests.sh
Test: WV GTS Tests
Bug: 62431478
Change-Id: I92a8b4acb69c964abe8129bccf2ff48a66c4a9e0
2017-06-16 17:59:24 -07:00
Jiyong Park
a632dd3bb4 Use libstagefright_foundation_vendor
libwvdrmengine is a library in vendor. When BOARD_VNDK_VERSION is turned
on, any lib in vendor partition can only link against to other vendoor
libs or libs marked as vendor_available:true. This lib is using
libstagefright_foundation and the lib is not available to vendors.
Instead, libstagefright_foundation_vendor is provided as a
vendor-variant of the foundation library. Thus switching to the vendor
variant.

Bug: 37462569
Test: m libwvdrmengine
Change-Id: I1f83eb71a3ba496889f1fa5771029cd8b603f258
2017-06-15 11:02:17 +09:00
Rahul Frias
5e6e6737f1 Merge "Usage license handling corrections" into oc-dev am: c3cdb531d4 am: 1073526555
am: 93f5f43107

Change-Id: I1398ae005403d3a502da2163cee428a8a53b7deb
2017-06-14 00:07:47 +00:00
Kyle Alexander
f7ef98b60a Merge "Update unit tests to build into /data/bin" into oc-dev am: b683d2be57 am: fc7e636bdf
am: b13900af37

Change-Id: I46970986c1c1b7188226b2df0a7626aae55762e7
2017-06-14 00:07:21 +00:00
Rahul Frias
93f5f43107 Merge "Usage license handling corrections" into oc-dev am: c3cdb531d4
am: 1073526555

Change-Id: Ib7f14ce42b9aba16025c5396e32b6427f92b759c
2017-06-13 22:52:23 +00:00
Rahul Frias
ab0cb541d0 Merge "Usage license handling corrections" into oc-dev
am: c3cdb531d4

Change-Id: Ideb1ee0c9735fc83c28ac3064f804650ab98c99e
2017-06-13 22:46:07 +00:00
Rahul Frias
1073526555 Merge "Usage license handling corrections" into oc-dev
am: c3cdb531d4

Change-Id: Ib7a6b14cd009abf2247bad28939c06938c07db0a
2017-06-13 22:45:53 +00:00
Rahul Frias
c3cdb531d4 Merge "Usage license handling corrections" into oc-dev 2017-06-13 22:40:54 +00:00
Kyle Alexander
b13900af37 Merge "Update unit tests to build into /data/bin" into oc-dev am: b683d2be57
am: fc7e636bdf

Change-Id: I311feb5f5f0c060bf776780de4cca3395d023239
2017-06-13 22:21:39 +00:00
Kyle Alexander
15cfe0abfa Merge "Update unit tests to build into /data/bin" into oc-dev
am: b683d2be57

Change-Id: I6c5cc5924b0a8eb52c235eef24cbd08efaf298dc
2017-06-13 22:18:18 +00:00
Kyle Alexander
fc7e636bdf Merge "Update unit tests to build into /data/bin" into oc-dev
am: b683d2be57

Change-Id: I1a88eb1d4f9a8d1df6fc66f6277c5afc5ead9c07
2017-06-13 22:18:14 +00:00
TreeHugger Robot
b683d2be57 Merge "Update unit tests to build into /data/bin" into oc-dev 2017-06-13 22:10:13 +00:00
Kyle Alexander
038580c6c9 Update unit tests to build into /data/bin
Tradefed needs these tests to be in the /DATA directory.

Test: cd vendor/widevine && ./build_and_run_all_unit_tests
      All tests should build and pass.
      make tests
      unzip android-tests.zip and verify all tests located in DATA/bin

Bug: 62055647
Change-Id: I35925e29558561c4726bb2249499bfee4e54cf45
2017-06-12 23:48:15 -07:00
Rahul Frias
db05f1e01c Usage license handling corrections
[ Merge of http://go/wvgerrit/28460 ]

Validate that offline licenses that do not contain a provider session
token are not handled by the TEE.

b/38490468

Test: WV Unit/integration tests, GtsMediaTestCases,
      WvCdmRequestLicenseTest.ReleaseRetryL3OfflineKeySessionUsageDisabledTest

Change-Id: Idaf62f2a882ae933c1a3e108d791943034780a46
2017-06-12 20:03:57 -07:00
Rahul Frias
0e920107f9 Recreate usage tables on error am: 4228e2327e am: fcc1c1a54d
am: 9eaf7cf958

Change-Id: I8e37c97a0a0b0a020bb3f3046682b5982ad6b9d1
2017-06-10 00:01:39 +00:00
Rahul Frias
fcc1c1a54d Recreate usage tables on error
am: 4228e2327e

Change-Id: I66140b35d3b992aaedb15c8e2dd2167127183eb3
2017-06-09 23:47:01 +00:00
Rahul Frias
61f0de0e7d Recreate usage tables on error
am: 4228e2327e

Change-Id: I249dc9ee4c01dc24eb68a2ee876b800449ac7e3c
2017-06-09 23:47:01 +00:00
Rahul Frias
4228e2327e Recreate usage tables on error
[ Merge of http://go/wvgerrit/28265 ]

A vendor specific error (10008) in response to OEMCrypto_LoadKeys
indicates that usage table corruption has occurred and that
the only way to recover is to regenerate usage tables.
Recreating usage tables will result in loss of offline licenses
and usage information. To make the app aware that this information
will be lost, a provisioning exception is generated when this error
is detected. The app can then choose to reprovision and in turn
delete and recreate usage tables.

A new OEMCrypto error has been added whose use has been reserved.
Rather than correct OEMCrypto behaviour to use the new error code,
we choose to handle this within the CDM. The fix can then be ported
to prior android releases. Also this error will not be generated
with OEMCrypto V13+.

b/33817629

Test: WV Unit, integration and GTS tests.
Change-Id: I936fc234d101b6a92d86f5735d035d19ddcf19e3
2017-06-08 23:46:04 -07:00
Rahul Frias
7f3578aaab Correct offline license handling am: 1857da2c8c am: 4c8af4872d
am: ce54031351

Change-Id: I6ffef72ad17a2e9a56b7738da8c800af1dd8bda9
2017-06-08 16:13:42 +00:00
Rahul Frias
ce54031351 Correct offline license handling am: 1857da2c8c
am: 4c8af4872d

Change-Id: Ic6225dc3013b19183b00135f8694e02839df7939
2017-06-08 09:54:01 +00:00
Rahul Frias
4c8af4872d Correct offline license handling
am: 1857da2c8c

Change-Id: Ieebed7532da0e2de79e9cfafa20c40d1aed10b0f
2017-06-08 09:51:51 +00:00
Rahul Frias
2efd7d71fa Correct offline license handling
am: 1857da2c8c

Change-Id: I8aa8408f5f81851de20bea6ad8c501d45894327d
2017-06-08 09:51:36 +00:00
Rahul Frias
1857da2c8c Correct offline license handling
[ Merge of http://go/wvgerrit/28261 ]

Licenses (offline, secure stops) that contain provider session tokens
are handled securely using usage tables. A recent fix did not correctly
handle offline licenses that do not contain a provider session token and
are not handled by the TEE.

b/62340248
Test: WV Unit/integration tests, GtsMediaTestCases

Change-Id: Ia1331fea9deff44dd1d93219b37f5bea4b8ee168
2017-06-07 17:23:27 -07:00
Edwin Wong
947f06a0ae Merge "Fix and rename ClosesSessionWithoutReturningError test." 2017-06-07 15:00:31 +00:00
Rahul Frias
be7a3c5494 Merge "Update Widevine integration test to match android version" into oc-dev am: ba346a1bea
am: 658dbe1dc7

Change-Id: I23316e905af3e618d1e5d266e83051eef8ba6cb8
2017-05-31 21:39:48 +00:00
Rahul Frias
658dbe1dc7 Merge "Update Widevine integration test to match android version" into oc-dev
am: ba346a1bea

Change-Id: I8aa8d2711a7e0ddd3a44a964daff9d7db3f3a7a7
2017-05-31 21:37:46 +00:00
Rahul Frias
ea3cf8472b Merge "Corrections for big usage table support in L3" into oc-dev am: 9edaf2ab39
am: 97a77d4c2c

Change-Id: Ie8949a574ae8ea3c9219fe483eeae985a54b05cd
2017-05-31 21:36:00 +00:00
Rahul Frias
ba346a1bea Merge "Update Widevine integration test to match android version" into oc-dev 2017-05-31 21:31:14 +00:00
Rahul Frias
97a77d4c2c Merge "Corrections for big usage table support in L3" into oc-dev
am: 9edaf2ab39

Change-Id: I4651713271f53d0aca77d8ecaaae57f3ab855471
2017-05-31 21:31:03 +00:00
Rahul Frias
9edaf2ab39 Merge "Corrections for big usage table support in L3" into oc-dev 2017-05-31 21:12:21 +00:00
Fred Gylys-Colwell
20175a21d8 Merge "Update Docs for OEMCrypto v13.2" into oc-dev am: d64169c1da
am: efeb2e0593

Change-Id: I45be643dd553257556d2d562b328cccb49e725f1
2017-05-31 19:46:49 +00:00
Fred Gylys-Colwell
b232f86bfb Merge "Build level 3 with latest updates" into oc-dev am: 31a2af7c17
am: 7316aba6fc

Change-Id: Id460f428e607a67b815fbf974ecda149d4a08979
2017-05-31 19:46:39 +00:00
Fred Gylys-Colwell
efeb2e0593 Merge "Update Docs for OEMCrypto v13.2" into oc-dev
am: d64169c1da

Change-Id: I78a00db44fba4f7eec9c7292a8aa3bd9d79f3cef
2017-05-31 19:28:42 +00:00
Fred Gylys-Colwell
7316aba6fc Merge "Build level 3 with latest updates" into oc-dev
am: 31a2af7c17

Change-Id: I731cace0d95a3d624f1787ae9e93697100e5c0d4
2017-05-31 19:28:32 +00:00
TreeHugger Robot
d64169c1da Merge "Update Docs for OEMCrypto v13.2" into oc-dev 2017-05-31 19:26:10 +00:00
TreeHugger Robot
31a2af7c17 Merge "Build level 3 with latest updates" into oc-dev 2017-05-31 19:18:33 +00:00
Edwin Wong
262219114b Fix and rename ClosesSessionWithoutReturningError test.
Merge from http://go/wvgerrit/27880

ClosesSessionWithoutReturningError should not check for
Status::OK since it is expecting an error code back.
The test is renamed to ClosesSessionWithError.

Test: libwvdrmdrmplugin_hidl_test

bug: 62205215
Change-Id: Ic57733c6adc7242413cf3cb74f03ac41f764c42c
2017-05-31 11:44:11 -07:00
Fred Gylys-Colwell
101f2b11d5 Use mac keys from usage entry if keys are not loaded am: 8138df1c86
am: af34b31112

Change-Id: I1617e3f91576201228ca896682697681c1fede71
2017-05-31 17:41:22 +00:00
Fred Gylys-Colwell
af34b31112 Use mac keys from usage entry if keys are not loaded
am: 8138df1c86

Change-Id: I00c781d2074be6ec7358ad208a6dc91b0bfdb7a8
2017-05-31 17:37:13 +00:00
Rahul Frias
5da8da58f6 Corrections for big usage table support in L3
[ Merge of http://go/wvgerrit/26421 ]

* Corrects usage_table_header lifetime management. Earlier the
  UsageTableHeader class was a singleton tied to the CdmEngine lifetime.
  With SPOIDs there might be multiple concurrent CdmEngine objects.
  The UsageTableHeader class is now associated with OEMCrypto
  lifetime. There are two UsageTableHeader objects one for each L1 and L3.
  These get allocated/deallocated on OEMCrypto Initialization/Termination
  respectively.
* UsageTableHeader requires OEMCrypto, file read/writes and
  metric gathering to perform its required functionality. Because of the
  lifetime changes, CryptoSession, DeviceFiles and MetricsGroup objects
  need to passed to the methods rather than at Creation time.
* Miscellaneous fixes, when moving or deleteing entries.
* Adds usage_table_header_unittests.
* Addresses failures with request_license_test with secure stop in L3.

b/36858906
b/36855557
b/36048120
b/38341136
b/37100505
b/35946047

Test: Verified by unit and integration tests. Added new
      usage_table_header_unittests

Change-Id: I20e396ab2c0afbd14372dd93b969e5b0f1ccd291
2017-05-31 00:37:58 -07:00
Rahul Frias
b1fe0834a5 Update Widevine integration test to match android version
[ Merge of https://go/wvgerrit/27860 ]

The android version was updated from "O" to "8.0.0"

b/62201928

Test: Ran wv unit and integration tests.

Change-Id: I57525af2ab3bdfa0e77ad8f0efbff26cf8ff5c32
2017-05-30 23:43:43 -07:00
Fred Gylys-Colwell
f0ef2a32e8 Build level 3 with latest updates
Merge from Widevine repo of:
http://go/wvgerrit/27504
http://go/wvgerrit/27461

arm64/libwvlevel3.a            Level3 Library 7283 May 21 2017 09:56:42
arm/libwvlevel3.a              Level3 Library 4445 May 19 2017 17:17:20
x86_64/libwvlevel3.a           Level3 Library 7284 May 22 2017 11:21:02
x86/libwvlevel3.a              Level3 Library 4464 May 19 2017 16:59:48

b/38203566
b/37521546

Change-Id: Ia881e7bc2ef8e56e67e3b8775d9dd6a94a834d95
2017-05-31 01:29:15 +00:00
Edwin Wong
106858bc84 Merge "Revert conditional tests using a logical AND operator." 2017-05-31 00:19:23 +00:00
Jeff Tinker
d346473eaa Merge "Revert "Convert libwvdrmengine to soong."" 2017-05-25 17:22:03 +00:00
Jeff Tinker
23398a8d7c Revert "Convert libwvdrmengine to soong."
This change introduced b/38487636 "Distorted video observed when
playing purchased/rented movie in Google play movies & TV app."

Before resubmitting an updated variant of the original CL, please
test playback with Play Movies and the GTS media tests. 

This reverts commit 33f9979b2b.

Change-Id: I4ec2e6fe81323e91e4b62288755c967999e81041
2017-05-24 21:17:59 +00:00