Commit Graph

3701 Commits

Author SHA1 Message Date
Rahul Frias
2ffb86ffca Accept a security level to be specified during provisioning am: e27bc4ba6a
Change-Id: I40d648eadb71cc4677fb9b38f8e766ee4f552c19
2020-04-30 00:27:14 +00:00
Rahul Frias
8429ab587a Accept a security level to be specified during provisioning am: e27bc4ba6a
Change-Id: I20b0adbb6c27507b7d63a6cd0084b4230d5ed6e0
2020-04-30 00:27:03 +00:00
Rahul Frias
e27bc4ba6a Accept a security level to be specified during provisioning
[ Merge of http://go/wvgerrit/97267 ]

In earlier releases, provisioning would occur based on a cached
security level. If an open session call returned a NotProvisionedException
the security level would be cached for use with any future provisioning
call.

An app would have to set the security level, then call openSession,
have it fail and then request provisioning. This fits the normal flow of
most apps. Still on occasion, an app might change requested security level
after an openSession call failed. Using the cached security level
would result in unexpected behavior.

This change allows provisioning to occur at the last security level that
was set.

Bug: 129356527
Test: wv unit/integration tests, GTS tests (GtsMediaTestCases)
Merged-In: I8d9234eec2b23a9c913e77a709943b431e25e43e
Change-Id: I8d9234eec2b23a9c913e77a709943b431e25e43e
2020-04-28 11:58:59 -07:00
TreeHugger Robot
aec7696984 Merge "Verify error code when usage entry in use" into rvc-dev am: 6bd68c9660 am: c14031eb7b
Change-Id: I392d826aa2e377612405dcd61261b9d9096520c0
2020-04-28 17:58:48 +00:00
TreeHugger Robot
248ec379d2 Merge "Fix buffer size on generic decrypt tests" into rvc-dev am: 9448696b9f am: 48a1c257fd
Change-Id: I993c4401359021539fcd668e978fb3f68d93d340
2020-04-28 17:58:28 +00:00
TreeHugger Robot
925db173aa Merge "Verify error code when usage entry in use" into rvc-dev am: 6bd68c9660 am: 6fd344812d
Change-Id: I9097d87eae51f821201e2cc6334c79b2f4494110
2020-04-28 17:57:59 +00:00
TreeHugger Robot
8b05bc3ed5 Merge "Fix buffer size on generic decrypt tests" into rvc-dev am: 9448696b9f am: ed4daa7583
Change-Id: I719260bb570ec546cf31c44146f10997f1755ad3
2020-04-28 17:57:53 +00:00
TreeHugger Robot
c14031eb7b Merge "Verify error code when usage entry in use" into rvc-dev am: 6bd68c9660
Change-Id: I9ee2b3a47a3a61e0596195de39f9e47a4128ec33
2020-04-28 17:42:16 +00:00
TreeHugger Robot
6fd344812d Merge "Verify error code when usage entry in use" into rvc-dev am: 6bd68c9660
Change-Id: I59fa7ba554c560f0c8e68f69747a4eb98f297e51
2020-04-28 17:42:14 +00:00
TreeHugger Robot
48a1c257fd Merge "Fix buffer size on generic decrypt tests" into rvc-dev am: 9448696b9f
Change-Id: I5d365b629a6c13c36b60d90680c012d81f360baf
2020-04-28 17:42:06 +00:00
TreeHugger Robot
ed4daa7583 Merge "Fix buffer size on generic decrypt tests" into rvc-dev am: 9448696b9f
Change-Id: I6d367165623fd96fa21fee3e274b9c9b99b0aba3
2020-04-28 17:42:03 +00:00
TreeHugger Robot
6bd68c9660 Merge "Verify error code when usage entry in use" into rvc-dev 2020-04-28 17:25:22 +00:00
TreeHugger Robot
9448696b9f Merge "Fix buffer size on generic decrypt tests" into rvc-dev 2020-04-28 17:23:37 +00:00
Rahul Frias
70e71421eb Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 3601ac7387
Change-Id: Iec573e53829047daf055003815841c2cc30641c2
2020-04-24 23:27:56 +00:00
Rahul Frias
37606c6956 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 086aa7b283
Change-Id: Icb635a36a2b60b6a9410fc786c57ba3020760ac7
2020-04-24 23:27:26 +00:00
Rahul Frias
3601ac7387 Correct OpenSessions_1_1 test failure am: 3df8bc5133
Change-Id: I3a11cc8034711d6e1219d3b248fdcf73d7f155e8
2020-04-24 23:11:45 +00:00
Rahul Frias
086aa7b283 Correct OpenSessions_1_1 test failure am: 3df8bc5133
Change-Id: I4c1eb3590a956967e85cb1d63969e002a026e8a0
2020-04-24 23:11:21 +00:00
Fred Gylys-Colwell
a3a61a68c4 Verify error code when usage entry in use
Merge from Widevine repo of http://go/wvgerrit/98265

Previously, if we tried to shrink the usage table over an entry in
use, we expected an error. Now, we expect the specific error,
OEMCrypto_ERROR_ENTRY_IN_USE.

Test: unit tests on taimen
Bug: 124776024
Change-Id: I2b4b872943bf65401c0a6b5dc1237d77341b1f5b
2020-04-24 14:13:15 -07:00
Rahul Frias
3df8bc5133 Correct OpenSessions_1_1 test failure
[ Merge of http://go/wvgerrit/98025 ]

This adds mocking for WvContentDecryptionModule::QuerySessionStatus
to WvDrmPluginTest which was missing. This corrects the failure in
WVDrmPluginTest.OpensSessions_1_1 from libwvdrmdrmplugin_hidl_test

Bug: 154011452
Test: wv unit/integration tests
Change-Id: I9904595a62a71541ab534aca7d7dfbf95f3225c9
2020-04-20 15:48:20 -07:00
Rahul Frias
d56a6bffd2 Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: 0b0d3500ec
Change-Id: I03c8b87873e5bb5bf806d7890629a5082caeb409
2020-04-20 19:38:38 +00:00
Rahul Frias
c00f9a3ce1 Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: dec9af442b
Change-Id: Ie281c339b05d7691b6e36b3abec67ee2db27aa7a
2020-04-20 19:37:20 +00:00
Rahul Frias
0b0d3500ec Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d
Change-Id: I44b9672e6d1ef99ef2ef95bdb8eb04edc811b27a
2020-04-20 19:20:22 +00:00
Rahul Frias
dec9af442b Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d
Change-Id: I8f6bd2763d68abbba6e7728ea58cc80a8f6516be
2020-04-20 19:19:37 +00:00
Rahul Frias
d260c2cf2d Merge "Correct reporting of KeyStatus usable in future" into rvc-dev 2020-04-20 19:06:18 +00:00
Rahul Frias
6404b42fb2 Correct reporting of KeyStatus usable in future
[ Merge of http://go/wvgerrit/98004 ]

This corrects mapping for KeyStatus event kKeyStatusUsableInFuture in
the legacy WVDrmPlugin. It earlier reported DrmPlugin KeyStatusType
kKeyStatusType_StatusPending and now reports kKeyStatusType_UsableInFuture.

This fixes the test failure WVDrmPluginTest.MarshalsEvents

Bug: 153509007
Bug: 116738851
Test: WV unit/integration tests
Change-Id: I4b2c74f5a0757975861ef41fa575a749ff9da391
2020-04-20 10:23:27 -07:00
Fred Gylys-Colwell
eb227bdc61 Fix buffer size on generic decrypt tests
Merge from Widevine repo of http://go/wvgerrit/98264

The generic decrypt tests changed the variable controlling buffer size
after it initialized the buffer -- so the buffer was not changed. This
CL fixes that.

Also, RefreshLargeBuffer changed the size of the license message
buffer, not the renewal message buffer.

Bug: 153590142
Test: ran unit tests on taimen
Change-Id: Ib01b411478a181ba956ac2e23c03634a2d971cc0
2020-04-18 09:07:07 -07:00
Fred Gylys-Colwell
d89f49b089 Update OEMCrypto documents am: 15b1cd9cc9 am: b38e279ed6
Change-Id: Ife6573b0ab697e9f4de9a1f9f1f24b5936464e42
2020-04-13 18:53:23 +00:00
Fred Gylys-Colwell
045e637317 Update OEMCrypto documents am: 15b1cd9cc9 am: 02443e2142
Change-Id: I5e67c8eb7a93e8d8adb9cec006a1c3b38d869b85
2020-04-13 18:53:13 +00:00
Fred Gylys-Colwell
b38e279ed6 Update OEMCrypto documents am: 15b1cd9cc9
Change-Id: I2c5f7fc814a621642a2376f98ef25eb4d10c392f
2020-04-13 18:24:57 +00:00
Fred Gylys-Colwell
02443e2142 Update OEMCrypto documents am: 15b1cd9cc9
Change-Id: I3036f1fb8c73fa3c8ede0c3686e466f24a90c000
2020-04-13 18:23:24 +00:00
Fred Gylys-Colwell
15b1cd9cc9 Update OEMCrypto documents
Merge from Widevine repo of http://go/wvgerrit/97763

There were no function signature changes, so the API version number
did not change from 16.2. There were several grammar and spelling
errors. There were also the following corrections:

1. The description of OEMCrypto_LoadProvisioning now says that devices
with a keybox use keys derived from the keybox device key, and devices
using Provisioning 3.0 use keys derived from the session key. The
description was previously reversed.

2. The function OEMCrypto_SupportedPatterns is no longer
discussed. This function was never fully defined.

3. The function OEMCrypto_LoadRenewal no longer says that keys and key
control blocks should be verified. This is because the function
OEMCrypto_LoadRenewal processes a message with no key control
block. It should update timers for the entire license.

Test: doc and comment change only
Bug: 153731804
Change-Id: I11a3069fcdbf67b369e2e2bc3fea8c08842eeb7b
2020-04-10 10:12:10 -07:00
Robert Shih
bf48be8d9a WVDrmPlugin signRSA: check arguments before caller am: 2278917116 am: 1659f38dd4
Change-Id: I9f2ec442ca45e27b41caf7f0d560927539e027b2
2020-04-08 20:26:12 +00:00
Robert Shih
b8f7c9ce95 WVDrmPlugin signRSA: check arguments before caller am: 2278917116 am: 983698e6cb
Change-Id: Ib6b8e488f99ce244da01aad2fee7325d0db0ac34
2020-04-08 20:24:56 +00:00
Robert Shih
1659f38dd4 WVDrmPlugin signRSA: check arguments before caller am: 2278917116
Change-Id: Iaaf830cd60c417bbc595a175d901a6088861eab0
2020-04-08 20:08:44 +00:00
Robert Shih
983698e6cb WVDrmPlugin signRSA: check arguments before caller am: 2278917116
Change-Id: Ic5b158f14835176a412b3d350cdd080f674f6b61
2020-04-08 20:08:33 +00:00
Robert Shih
2278917116 WVDrmPlugin signRSA: check arguments before caller
Merge of http://go/wvgerrit/97444

Bug: 153356263
Test: VtsHalDrmV1_0Target
Test: VtsHalDrmV1_3Target
Change-Id: Ic27056d86804972859a85c0eb2a0e79a0563d040
2020-04-06 16:13:40 -07:00
John W. Bruce
ea7c1d2a82 Fix Entitlement Licenses am: 4444ba3b47 am: 379127929e
Change-Id: I6d2fe6251847ffcbbccbb78380a89584739356db
2020-04-03 23:17:32 +00:00
John W. Bruce
f810732cdb Fix Entitlement Licenses am: 4444ba3b47 am: c9caa507b3
Change-Id: I81f5d4f636081bb2682004c18bbd723584f04bd0
2020-04-03 23:17:21 +00:00
John W. Bruce
c9caa507b3 Fix Entitlement Licenses am: 4444ba3b47
Change-Id: I8fc3a51bf829a0036928d2ae7b55d6d69cd7a483
2020-04-03 22:54:25 +00:00
John W. Bruce
379127929e Fix Entitlement Licenses am: 4444ba3b47
Change-Id: Ib438a6659f401e59cf58671dbac3f2cc865a5b0e
2020-04-03 22:54:22 +00:00
John W. Bruce
4444ba3b47 Fix Entitlement Licenses
(This is a merge of http://go/wvgerrit/97083.)

The switch from LoadKeys to LoadLicense broke entitlement licenses
entirely because the LoadLicense path in CryptoSession didn't include
any affordances for updating the KeySession, unlike the LoadKeys path.
This patch adds code to handle this.

Bug: 152814106
Test: CE CDM Unit Tests
Test: Android Unit Tests
Change-Id: Id0c33a566e17e6be8da04e12be4b0fc87559aa8f
2020-04-03 22:33:40 +00:00
Fred Gylys-Colwell
30aaa6ba10 Merge "Adjust time for unit tests" into rvc-dev am: bab44e0ad4 am: 3c71641040
Change-Id: I639e1d711cba7aedd1009ac11416a1840a3adc17
2020-04-03 17:17:10 +00:00
Fred Gylys-Colwell
dd209b595a Merge "Adjust time for unit tests" into rvc-dev am: bab44e0ad4 am: b1d7728b29
Change-Id: I54ea0789a803923bf2dab95ed71eda52cdb60d9b
2020-04-03 17:16:19 +00:00
Fred Gylys-Colwell
b1d7728b29 Merge "Adjust time for unit tests" into rvc-dev am: bab44e0ad4
Change-Id: Ib75c6d6ba0ede24858827da7c611d1888bf5baf3
2020-04-03 16:54:40 +00:00
Fred Gylys-Colwell
3c71641040 Merge "Adjust time for unit tests" into rvc-dev am: bab44e0ad4
Change-Id: I021dcc56aa8619325f9c97b632562cc8e387c2a2
2020-04-03 16:54:29 +00:00
Fred Gylys-Colwell
bab44e0ad4 Merge "Adjust time for unit tests" into rvc-dev 2020-04-03 16:30:53 +00:00
Fred Gylys-Colwell
67aaa1c309 Adjust time for unit tests
Merge from Widevine repo of http://go/wvgerrit/96843

This CL modifies the system time used by the reference OEMCrypto so
that it recovers from a clock rollback. When the clock rolls back, it
now adjusts the current time and continues forward. This is needed
when running unit tests on some platforms that reset the clock at
the beginning of a test.

Bug: 152649427
Test: unit tests on buildbot. (No production code on Android)
Change-Id: I7edcdc0cd4e5938c9a54e745d3a0e008f9eb13ed
2020-04-03 16:28:38 +00:00
TreeHugger Robot
74372b97bd Merge "CryptoSession: Propagate err from GetSystemIdInternal in Open" into rvc-dev am: 4fe638a779 am: 3fdeb011df
Change-Id: I3df23c70eb4ecf1f118a46e4e5477fe6f946cf8f
2020-04-01 23:48:02 +00:00
TreeHugger Robot
d251cea528 Merge "CryptoSession: Propagate err from GetSystemIdInternal in Open" into rvc-dev am: 4fe638a779 am: 5775aff942
Change-Id: I9cfa9df6c3a2d733449ab329c32021d767f4a2f4
2020-04-01 23:40:54 +00:00
TreeHugger Robot
3fdeb011df Merge "CryptoSession: Propagate err from GetSystemIdInternal in Open" into rvc-dev am: 4fe638a779
Change-Id: I24b593df28cc9a0000901c813b6fd1bd72e6d61b
2020-04-01 23:20:39 +00:00