Commit Graph

3668 Commits

Author SHA1 Message Date
Automerger Merge Worker
c2387ab507 Merge "Add odk_test to platform tests" into rvc-dev am: 5ebb430af7 am: 013fff3618
Change-Id: Icbfce4669bf2dc6889c8a6eb3dc029b0ff9a6b83
2020-02-28 02:54:35 +00:00
Automerger Merge Worker
645bd40a5a Merge "Add odk_test to platform tests" into rvc-dev am: 5ebb430af7 am: 440b864da3
Change-Id: I96734ebe2f43c8aa2c394e072afd44ec15ba600c
2020-02-28 02:54:34 +00:00
Automerger Merge Worker
53ec720bfc Merge "Add odk_test to platform tests" into rvc-dev am: 5ebb430af7 am: 440b864da3
Change-Id: I39878e94de6640b3a58d3d6fb829df89dfd6d245
2020-02-28 02:54:14 +00:00
Automerger Merge Worker
013fff3618 Merge "Add odk_test to platform tests" into rvc-dev am: 5ebb430af7
Change-Id: I7c3466b42ad6512831e49181cd09fa92e5719b01
2020-02-28 02:43:44 +00:00
Automerger Merge Worker
440b864da3 Merge "Add odk_test to platform tests" into rvc-dev am: 5ebb430af7
Change-Id: I6986db3399629f65af8e74d254b3e5a7736ea6a2
2020-02-28 02:43:41 +00:00
TreeHugger Robot
5ebb430af7 Merge "Add odk_test to platform tests" into rvc-dev 2020-02-28 02:26:50 +00:00
Automerger Merge Worker
1e464933ec Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca am: c4804925ed am: 0e2adab96f
Change-Id: I001b3d097d4fd21a13a8a91cd37fa6fee2169097
2020-02-28 00:38:43 +00:00
Automerger Merge Worker
30f9881e05 Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca am: 50a831a37e am: 0d9d17a748
Change-Id: Id3a603ed217462c7b9925f1ec5a487f363349d14
2020-02-28 00:33:40 +00:00
Automerger Merge Worker
d8454fdc54 Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca am: c4804925ed am: 97698623e6
Change-Id: I6e483c94291de3862f20a869a47e59710a3b4576
2020-02-28 00:26:04 +00:00
Automerger Merge Worker
0e2adab96f Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca am: c4804925ed
Change-Id: I04e4e66881432fa8aed5af33d9227db5faef706f
2020-02-28 00:18:40 +00:00
Automerger Merge Worker
0d9d17a748 Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca am: 50a831a37e
Change-Id: I00f12b28f3752b7f69a6504f16f01c471912fbd5
2020-02-28 00:18:13 +00:00
Automerger Merge Worker
97698623e6 Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca am: c4804925ed
Change-Id: I9c048e3899fc252f4319a35f19665376d34d958e
2020-02-28 00:14:28 +00:00
Automerger Merge Worker
c4804925ed Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca
Change-Id: Iadc7390665edb0324437d35e350fb8994a88c63c
2020-02-28 00:04:21 +00:00
Automerger Merge Worker
50a831a37e Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca
Change-Id: I3e31324bfb2c681edb225999c98ff7218ed866df
2020-02-28 00:00:01 +00:00
Rahul Frias
6373ff35ca Merge "Search for test executables in odk_test" into rvc-dev 2020-02-27 23:47:56 +00:00
Robert Shih
b1ee517ff1 Add odk_test to platform tests
Bug: 150158890
Test: build & inspect platform_tests.zip
Change-Id: I06c0acd0f7fed168e8e2ad876a58983b11d9b43f
2020-02-27 21:35:30 +00:00
Automerger Merge Worker
ff8d2a9bc1 Fix nonce problem in license renewal am: 0947bd185b am: 54a2a92988 am: 5e6aaefc69
Change-Id: Idcff26d7bf586730b2e97110740a4f6193df9763
2020-02-27 20:53:25 +00:00
Automerger Merge Worker
6c775f9e64 Fix nonce problem in license renewal am: 0947bd185b am: e8406c63fd am: 161d7b9f08
Change-Id: I967638f06930da9bf6e14f603662f28aa4fe6a1b
2020-02-27 20:53:16 +00:00
Automerger Merge Worker
a8770bd08d Fix nonce problem in license renewal am: 0947bd185b am: e8406c63fd am: af930f2cc4
Change-Id: I5ae3ebfe975bd51be967c4994e7832eeb4bb56b3
2020-02-27 20:52:56 +00:00
Automerger Merge Worker
5e6aaefc69 Fix nonce problem in license renewal am: 0947bd185b am: 54a2a92988
Change-Id: I4330802d905f4bb48e5d2423ac2bf58491f51107
2020-02-27 20:37:03 +00:00
Automerger Merge Worker
161d7b9f08 Fix nonce problem in license renewal am: 0947bd185b am: e8406c63fd
Change-Id: Ib3d73959e7399a413bc1b93661efe54698b0b799
2020-02-27 20:37:03 +00:00
Automerger Merge Worker
af930f2cc4 Fix nonce problem in license renewal am: 0947bd185b am: e8406c63fd
Change-Id: I26567ab69b4c3f347800b77230b09811f9b2c75f
2020-02-27 20:36:37 +00:00
Fred Gylys-Colwell
e8406c63fd Fix nonce problem in license renewal
am: 0947bd185b

Change-Id: Ibeb92f4598af6bcf414f6757e8b9816d9988751e
2020-02-27 12:24:29 -08:00
Fred Gylys-Colwell
54a2a92988 Fix nonce problem in license renewal
am: 0947bd185b

Change-Id: Ic1bc6c3a83ff64d09bafac0a3851fa26973139a3
2020-02-27 12:24:26 -08:00
Automerger Merge Worker
a645da282f Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb am: 938bfe1a40 am: f81fe480eb
Change-Id: Id1e10558b56f89dfb79cd88db9d9bc62ef3c5724
2020-02-27 05:24:44 +00:00
Automerger Merge Worker
f81fe480eb Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb am: 938bfe1a40
Change-Id: I41d5a8eeb38cf874255318b96cfbc72e04bd985f
2020-02-27 04:59:07 +00:00
Automerger Merge Worker
3765558218 Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb am: 938bfe1a40 am: 566e2448d2
Change-Id: I8a0cdba1a54fb227877ca83bbad6489ec48cdd5b
2020-02-27 04:55:52 +00:00
Automerger Merge Worker
566e2448d2 Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb am: 938bfe1a40
Change-Id: I1d2481c8f87978600dcdb052b0f4370a7c1c6b99
2020-02-27 04:53:36 +00:00
Automerger Merge Worker
7d02410a43 Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb am: 69b6019d39 am: 81a9803241
Change-Id: I6f34afe4b3f056a9ed7d0fa9f54ebf559801f2c6
2020-02-27 04:48:38 +00:00
Automerger Merge Worker
81a9803241 Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb am: 69b6019d39
Change-Id: Ia90b035b76a3bd9e6a28529fd197710e6a336e36
2020-02-27 04:39:10 +00:00
Automerger Merge Worker
69b6019d39 Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb
Change-Id: I5f62b43edd5898bda5c4c06ee44bb34b62e5a9e6
2020-02-27 04:08:11 +00:00
Automerger Merge Worker
938bfe1a40 Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb
Change-Id: I32d98f57678911e3b0eb3882064aa1161fb7d9c8
2020-02-27 04:07:51 +00:00
Fred Gylys-Colwell
0947bd185b Fix nonce problem in license renewal
Merge from Widevine repo of http://go/wvgerrit/94523

For OEMCrypto v16, a renewal does not get a new nonce.

Bug: 149856581
Test: WvCdmRequestLicenseTest.StreamingLicenseRenewal
Change-Id: I258f0bcb9c9a417310785f130d32d66fa7430185
2020-02-26 14:32:24 -08:00
Rahul Frias
19605579d5 Search for test executables in odk_test
[ Merge of http://go/wvgerrit/94507 ]

./build_and_run_all_tests.sh runs all WV unit/integration tests.
It searches for unit/integration tests in $OUT/data/nativetest/ .
ODK tests are in $OUT/data/nativetest/vendor/odk_test. Adding this
path to the list of directories that the script searches through.

Bug: 150158890
Test: Run ./build_and_run_all_tests.sh
Change-Id: Ib3b7d247a5cb86f9972157c13ad60b7f3cbbb7dc
2020-02-26 13:51:14 -08:00
Fred Gylys-Colwell
7f006997cb Change some test EXPECT to ASSERT to avoid segfaults
Merge from Widevine repo of http://go/wvgerrit/94505

Some tests use an EXPECT when checking an array size or to verify a
pointer is not null. Then they access the pointer or array. When they
use an EXPECT, this access results in a segfault.

I also removed a compiler warning about unused parameters.

Bug: 149856581
Test: request_license_test (now lists failed tests)
Change-Id: I08ac11250921245c89ed5c0c43cc5f4321e0a9cc
2020-02-26 13:11:25 -08:00
Alex Dale
9c60d1e1ae Adding app package name to license request.
[ Merge of http://go/wvgerrit/94323 ]

Content providers wish to know the application package name that is
requesting a license from the content server.  The app package name that
is provided to the CDM during initialization is provided to the client
identification message as a key-value pair during license request
generation.  App packages names are keyed under 'application_name'.

This feature was tested manually by scraping the content of the license
request for YouTube TV.

Bug: 148689078
Test: manual
Change-Id: I6b65f2ab9845dbea37aaaab76ecea25c228bde5b
2020-02-20 13:23:16 -08:00
TreeHugger Robot
f13cbff0cd Merge "Adjust provisioning retry" 2020-02-20 04:36:48 +00:00
Robert Shih
838788cf00 Merge "wv hidl: only mediashell/mediadrmserver can call signRSA" 2020-02-20 00:46:35 +00:00
Fred Gylys-Colwell
18da273c42 Adjust provisioning retry
Merge from Widevine repo of http://go/wvgerrit/94243

When generating a second provisioning request, a new session should be
opened because a session can only have one nonce for v16.

For Provisioning 3.0 devices, the OEM Cert's private key must be
loaded in the new session.

Test: WvCdmRequestLicenseTest.ProvisioningInterposedRetryTest
Bug: 135288420 Nonce reuse
Bug: 141655126 Cert reload
Change-Id: I8a96566142c4d4380e2bdd571e8d363a7a1f74d4
2020-02-19 13:42:55 -08:00
Robert Shih
be7b89e155 wv hidl: only mediashell/mediadrmserver can call signRSA
Merge of go/wvgerrit/93524

Bug: 134787536
Bug: 148895349
Test: VtsHalDrmV1_3TargetTest
Change-Id: I48fb63d044271243fa1d290443d437f0697994d3
2020-02-19 13:38:23 -08:00
John W. Bruce
a62886b925 Combined Decrypt Calls
(This is a merge of http://go/wvgerrit/93829,
http://go/wvgerrit/93830, http://go/wvgerrit/93832,
http://go/wvgerrit/93833, and http://go/wvgerrit/93834 from the
Widevine repo.)

This implements the CDM code changes necessary to take advantage of
Combined Decrypt Calls on OEMCrypto v16. The result of this is that
WVCryptoPlugin is much lighter now because it can pass the full sample
down to the core in one call, but CryptoSession is heavier, as it now
has to handle more complex fallback logic when devices can't handle
multiple subsamples at once.

This patch also removes support for the 'cens' and 'cbc1' schema, which
are being dropped in OEMCrypto v16. This fixes an overflow in the code
for handling those schemas by removing it entirely.

This patch also fixes the "in chunks" legacy decrypt path to use larger
chunk sizes on devices with higher resource rating tiers.

Bug: 135285640
Bug: 123435824
Bug: 138584971
Bug: 139257871
Bug: 78289910
Bug: 149361893
Test: no new CE CDM Unit Test failures
Test: Google Play plays
Test: Netflix plays
Test: no new GTS failures
Change-Id: Ic4952c9fa3bc7fd5ed08698e88254380a7a18514
2020-02-19 11:44:35 -08:00
Rahul Frias
3708c4d53f Merge changes I442b7919,Ie5b4ff75
* changes:
  Improve android MediaDrm property latency
  Delay OEMCrypto Termination
2020-02-19 15:51:14 +00:00
Rahul Frias
0e02d6a1f6 Merge changes Iacbbd51a,Id925ddcc
* changes:
  Add policy handling for v16
  More policy engine/timers refactoring
2020-02-19 15:37:35 +00:00
Rahul Frias
c033892f2a Add policy handling for v16
[ Merge of http://go/wvgerrit/93865 ]

This allows for handling of timer and clock values as supported when both
the license service and the OEMCrypto on the device support v16.
A flag based on a value in the SignedResponse license indicates
whether this support should be enabled. A new class PolicyTimerV16
performs the duration value evaluation.

Bug: 139372190
Test: Android WV unit/integration tests
Change-Id: Iacbbd51ad26c9f29cb5418ff832f8822982644b7
2020-02-18 22:33:47 -08:00
Rahul Frias
68587be8a0 More policy engine/timers refactoring
[ Merge of http://go/wvgerrit/93838 ]

Some more rework of policy engine/policy timers code to support
timer and clock value handling introduced by OEMCrypto v16.

Changes are
* renamed methods to include rental duration since policies for v16 use
  rental and playback duration for all licenses. Previously rental and
  playback durations enforced timing for persistent licenses and license
  duration was used for streaming licenses.
* Moved some common code to the base PolicyTimer class from
  PolicyTimerV15.
* Corrected data member naming (policy_timers -> policy_timers_)
* Updated comments

Bug: 139372190
Test: Android WV unit/integration tests
Change-Id: Id925ddcc14608a8500f30c2c68486d91608a9abe
2020-02-18 22:29:49 -08:00
TreeHugger Robot
5a08937110 Merge "Remove unused parameters" 2020-02-19 05:52:39 +00:00
Alex Dale
c1cb64a0dc Merge "LRU algorithm adapts to usage table capacity." 2020-02-19 02:18:03 +00:00
Fred Gylys-Colwell
3012ff29bd Use staging provisioning server
Merge from Widevine repo of http://go/wvgerrit/94067

The android tests should use the staging provisioning server until
production is able to support core messages.

Test: ran WvCdmRequestLicenseTest.ProvisioningTest with v16 mod mock
Bug: 149622735
Change-Id: I4ec0cc8e8474dc4250e092473fef90d7358260de
2020-02-18 14:26:29 -08:00
Alex Dale
4a8aeb29ef LRU algorithm adapts to usage table capacity.
[ Merge of http://go/wvgerrit/93564 ]

OEMCrypto v16 introduced the ability to report the maximum possible
size of the usage table to the CDM.  The LRU algorithm will take the
table capacity into account when deciding which entry is removed.

Bug: 148795097
Bug: 135298906
Test: CDM unit tests
Change-Id: Ibba88813618c13a9bf1121e560b8cc02b1c7e7a6
2020-02-18 12:22:23 -08:00
Rahul Frias
78d2fa5e9e Improve android MediaDrm property latency
[ Merge of http://go/wvgerrit/89848 ]

Apps query a number of properties at initialization. The mediaDrm
API getProperty allows the query of a single property at a time.
This causes a series of requests. If no crypto
sessions are concurrently open, a series of expensive OEMCrypto
Initialization and Termination calls will occur.

In this change OEMCrypto termination is delayed. If an OEMCrypto
Terminate is followed in close succession by an Initialize, neither
will occur avoiding the overhead. A timer enables a countdown process.
If no session activity occurs, the timer will eventually terminate
OEMCrypto and exit.

Bug: 136282358
Test: Android unit/integration tests
Change-Id: I442b7919b4e7835c52583516c8bc64d0c150241d
2020-02-17 20:50:32 -08:00