Commit Graph

3685 Commits

Author SHA1 Message Date
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
TreeHugger Robot
5775aff942 Merge "CryptoSession: Propagate err from GetSystemIdInternal in Open" into rvc-dev am: 4fe638a779
Change-Id: I01fda2def9771a40c1e4c5b2bfcac2b92401f574
2020-04-01 23:19:25 +00:00
TreeHugger Robot
4fe638a779 Merge "CryptoSession: Propagate err from GetSystemIdInternal in Open" into rvc-dev 2020-04-01 22:52:21 +00:00
Robert Shih
07f40d1bed CryptoSession: Propagate err from GetSystemIdInternal in Open
Merge of http://go/wvgerrit/96509

Bug: 151231204
Test: GtsMediaTestCases
Change-Id: Ib29691fcea1c9d5fcfa981caf3e5bdab00cbb0bf
2020-04-01 07:01:24 +00:00
TreeHugger Robot
6b53b2f4ba Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev am: e59339ed6d am: f8175bda83
Change-Id: I6fb21dee970930702e83f11e8e8a6f4da0bea921
2020-04-01 05:44:35 +00:00
TreeHugger Robot
08eb9a7fae Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev am: e59339ed6d am: 94108cdbe8
Change-Id: Ie6186c8d4a98c65b4eab47b329c72eceebd25b2a
2020-04-01 05:44:04 +00:00
TreeHugger Robot
f8175bda83 Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev am: e59339ed6d
Change-Id: Ib7a0a1c7f1ad11f80482efa0bf87259d5d7d5207
2020-04-01 05:32:06 +00:00
TreeHugger Robot
94108cdbe8 Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev am: e59339ed6d
Change-Id: Ie427ca27c16376f1202e3a43b58a50f19ecc0d94
2020-04-01 05:32:01 +00:00
TreeHugger Robot
e59339ed6d Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev 2020-04-01 05:12:53 +00:00
Robert Shih
dc9809f7c3 CryptoSession: handle 0-length buffer in DecryptSample
In `Combine Decrypt Calls to OEMCrypto`,
OEMCrypto_ERROR_BUFFER_TOO_LARGE is used as the default error code to
signal fallback to legacy decrypt (sending subsamples separately).
The error code would not be updated if no calls to OEMCrypto were
made (e.g. 0-length buffers).

This change resets error code to OEMCrypto_SUCCESS after fall back to
legacy decrypt. Consequently, buffers that do no require OEMCrypto
calls would return OEMCrypto_SUCCESS.

Merge of http://go/wvgerrit/96743

Bug: 150188155
Test: GtsMediaTestCases
Test: DashTest#testWidevineH264AdaptiveWithRendererDisabling
Change-Id: Ib23803c51f16bc809bda5c2720e628e81f1df1dc
2020-04-01 02:47:13 +00:00
John Bruce
630141b5fc Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev am: c113df815d am: d57c09b29b
Change-Id: Id972921cfb3c458c8611631e3f5375b7a0066e0a
2020-03-30 19:09:24 +00:00
John Bruce
bbd4f33386 Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev am: c113df815d am: 5f09de89ae
Change-Id: I73ca6457a6b8aa132e47a5479751f3616f92c3b0
2020-03-30 18:15:28 +00:00
John Bruce
d57c09b29b Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev am: c113df815d
Change-Id: I4e1f3e8ff3e11e7d06defad929bf08ef828b23eb
2020-03-30 18:00:26 +00:00
John Bruce
5f09de89ae Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev am: c113df815d
Change-Id: Ifcfe2508123bca879c457082090133751bceae6a
2020-03-30 17:59:52 +00:00
John Bruce
c113df815d Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev 2020-03-30 17:46:33 +00:00
Fred Gylys-Colwell
c78affbc28 Replace OEMCrypto_LoadDeviceRSAKey with OEMCrypto_LoadDRMPrivateKey am: 56b836bda3 am: 4af6f0cf42
Change-Id: I938b2cad4c00df41562b0f7ddb327f60961f491e
2020-03-29 19:46:04 +00:00
Fred Gylys-Colwell
6b56c1c5ec Replace OEMCrypto_LoadDeviceRSAKey with OEMCrypto_LoadDRMPrivateKey am: 56b836bda3 am: bb42e9bd41
Change-Id: I4099a6dcd2aed17b2132ac0fad22b0268098d22d
2020-03-29 19:45:51 +00:00