Commit Graph

4203 Commits

Author SHA1 Message Date
Rahul Frias
3c8acc3d56 Accept a security level to be specified during provisioning
[ Merge of http://go/wvgerrit/98694 and http://go/ag/11052323 ]

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)
Change-Id: I8d9234eec2b23a9c913e77a709943b431e25e43e
2020-04-27 23:20:40 -07:00
Bharath Chandra Elluru
d0b3316d96 Merge Android odk fuzz changes(Adding corpus) from http://go/wvgerrit/98692
Google3 CLs:
http://cl/308666040

Bug: b/154264716
Test: Locally ran and built odk fuzz binaries and tested
fuzzer binaries on pixel device
Change-Id: Icdb81291e101a0abdb75f84008f701c06e7384d6

Change-Id: Iad573209b47bd450c843a7cab5570a76c012fce9
2020-04-27 14:00:17 -07:00
Rahul Frias
2201e62870 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 3601ac7387 am: e8e0dcd887 am: fbc9019888 am: 4884e79a42 am: 8d836e8000
Change-Id: I5166eb55c556ba0f25584c0e6d77294bb5c636b4
2020-04-25 00:22:18 +00:00
Rahul Frias
41f0a38ea4 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 3601ac7387 am: 70e71421eb am: dec90462b6 am: b40fc3ec40
Change-Id: Idaefb8fd7699bd1f61d8cbcfdabd42eac6c064bd
2020-04-25 00:21:33 +00:00
Rahul Frias
4e0aab35b5 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 086aa7b283 am: 37606c6956 am: cf8f897be3 am: be2e4e280b
Change-Id: Ic41bbf43f3ccf229e16ce0d9627c45c059432c39
2020-04-25 00:19:12 +00:00
Rahul Frias
8d836e8000 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 3601ac7387 am: e8e0dcd887 am: fbc9019888 am: 4884e79a42
Change-Id: Iacb9f23ced8ca4e66e0e67cc9ac91d71d77a8a61
2020-04-25 00:08:30 +00:00
Rahul Frias
b40fc3ec40 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 3601ac7387 am: 70e71421eb am: dec90462b6
Change-Id: Ic79f1e94fb140bd71ff89bec7331a87e8bd127c9
2020-04-25 00:07:56 +00:00
Rahul Frias
be2e4e280b Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 086aa7b283 am: 37606c6956 am: cf8f897be3
Change-Id: I056d3400ab1050dd215573e52ea98e75b6a542be
2020-04-25 00:05:33 +00:00
Rahul Frias
4884e79a42 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 3601ac7387 am: e8e0dcd887 am: fbc9019888
Change-Id: I4338722a1555d795d1f29dfdcca00e383f8629d7
2020-04-24 23:58:49 +00:00
Rahul Frias
dec90462b6 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 3601ac7387 am: 70e71421eb
Change-Id: Id83de835a3d0a6dab1fed223080f0ad63149234b
2020-04-24 23:51:05 +00:00
Rahul Frias
cf8f897be3 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 086aa7b283 am: 37606c6956
Change-Id: I78262af3141d303e6923cfa7708bc549b5e5210d
2020-04-24 23:49:55 +00:00
Rahul Frias
fbc9019888 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 3601ac7387 am: e8e0dcd887
Change-Id: I36103187fc1c7a8501a971141b44ba4c3994cda8
2020-04-24 23:49:20 +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
e8e0dcd887 Correct OpenSessions_1_1 test failure am: 3df8bc5133 am: 3601ac7387
Change-Id: I98328c3518339defb48053038aa4c3d82e983e07
2020-04-24 23:27:30 +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
Alex Dale
d2b9b4f0e8 Removed provisioning loop in unittests. am: bebedce81f
Change-Id: Ibabd7e74eb6f5af4aaf3b73eeeacfb42036c5250
2020-04-23 22:39:26 +00:00
Alex Dale
bebedce81f Removed provisioning loop in unittests.
[ Merge of http://go/wvgerrit/98467 ]

The issue with intermediate provisioning request failures with the
development provisioning server has been resolved in b/139206968.

This change removes the provisioning retry loop which was a workaround
for the CDM unit tests.  Should the issue re-arise, it would be useful
to detect it in our unit tests.

Bug: 139361531
Test: Linux unit tests
Change-Id: Ib44c56c740efea562803d3f8f93ffd62bd95e485
2020-04-22 15:23:35 -07:00
Bharath Chandra Elluru
60bfcc544e Merge "Copy submitted odk fuzzing changes from cdm repository to android" am: b0dcd88ec4
Change-Id: Id4b4d0c8001e5d07a3ac5cb2ca09da70f7d7db63
2020-04-21 19:06:33 +00:00
Bharath Chandra Elluru
b0dcd88ec4 Merge "Copy submitted odk fuzzing changes from cdm repository to android" 2020-04-21 18:48:17 +00:00
Bharath Chandra Elluru
d524d840e3 Copy submitted odk fuzzing changes from cdm repository to android
Merging odk changes from http://go/wvgerrit/98084

Copy submitted changes for oemcrypto/odk/test/fuzzing from cdm
repository to android so that fuzzer scripts in odk can be run
using go/android-fuzzing

Google3 CLs:
http://cl/301943247
http://cl/304011238
http://cl/307142293
http://cl/307087692

Bug: 150900870
Test: The fuzzer scripts can be built once the code is moved to android
tree. Odk fuzzer scripts have been verified and successfully running in
google3

Change-Id: I92b8a357c32b145c7f80bdc93d05214862368957
2020-04-21 18:42:43 +00: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
b461ae4e04 Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: dec9af442b am: 7ef5203a00 am: 3614e47762 am: dacaaa15c6 am: 27793ede9e
Change-Id: Ib74e231028fbb5ad7c8b25fa32b5074f8f98acf8
2020-04-20 20:39:05 +00:00
Rahul Frias
ea4a4ebd5b Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: 0b0d3500ec am: d56a6bffd2 am: 7f8f6dc0bf am: c3c0062ec8
Change-Id: Ib802740f51d88a7648ac9ef52ca56c5482b0c49d
2020-04-20 20:38:45 +00:00
Rahul Frias
7f880bcd0a Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: dec9af442b am: c00f9a3ce1 am: 3bf1e1b1b5 am: ec919ed72a
Change-Id: I4b78b4fbb9fae0a9de56a903df3784357ee12efa
2020-04-20 20:38:33 +00:00
Rahul Frias
27793ede9e Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: dec9af442b am: 7ef5203a00 am: 3614e47762 am: dacaaa15c6
Change-Id: Ic1d0bd03ead7478ebf64e521fabd01ef61044216
2020-04-20 20:22:16 +00:00
Rahul Frias
c3c0062ec8 Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: 0b0d3500ec am: d56a6bffd2 am: 7f8f6dc0bf
Change-Id: I98dbe434965488778b504e756b4feca49f2eb9ef
2020-04-20 20:22:03 +00:00
Rahul Frias
ec919ed72a Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: dec9af442b am: c00f9a3ce1 am: 3bf1e1b1b5
Change-Id: If0c534f9724a1507bee01cfc09d7084f20202907
2020-04-20 20:21:55 +00:00
Rahul Frias
dacaaa15c6 Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: dec9af442b am: 7ef5203a00 am: 3614e47762
Change-Id: I252ca71488e44cafe7a02938859b5864ead15958
2020-04-20 20:21:37 +00:00
Rahul Frias
3614e47762 Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: dec9af442b am: 7ef5203a00
Change-Id: I2c39d917e6608b39a3328a18e6af5731b04f6546
2020-04-20 19:59:22 +00:00
Rahul Frias
7f8f6dc0bf Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: 0b0d3500ec am: d56a6bffd2
Change-Id: Ieb2e732fc8ab00dfbb0779740462da3301ddd9a4
2020-04-20 19:57:33 +00:00
Rahul Frias
3bf1e1b1b5 Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: dec9af442b am: c00f9a3ce1
Change-Id: Icdecbab3401c32f7c122f56693cdf6d4f5aea048
2020-04-20 19:57:21 +00: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
7ef5203a00 Merge "Correct reporting of KeyStatus usable in future" into rvc-dev am: d260c2cf2d am: dec9af442b
Change-Id: Idd0c126798678cd92b3c61f8c2f217914e8155f5
2020-04-20 19:38:37 +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
5e696f4411 Update OEMCrypto documents am: 15b1cd9cc9 am: 02443e2142 am: 0214b1eb5e am: fa4d43d550 am: 8fbdddfd3e am: 2e5e7cafa4
Change-Id: Ia4de95ea331839e4c858ad25fd0a14177ca52b4b
2020-04-13 20:07:05 +00:00
Fred Gylys-Colwell
ca7bffee20 Update OEMCrypto documents am: 15b1cd9cc9 am: b38e279ed6 am: d89f49b089 am: 29778ba638 am: 63c7f1276c
Change-Id: Ibd16af326d31083c3eb2f377055506983d276122
2020-04-13 20:06:59 +00:00
Fred Gylys-Colwell
1c727d328a Update OEMCrypto documents am: 15b1cd9cc9 am: 02443e2142 am: 045e637317 am: 12d6316b6f am: 3924a00573
Change-Id: I0d435446c14beeea238e19ada0aec6f6e208d339
2020-04-13 20:06:29 +00:00
Fred Gylys-Colwell
2e5e7cafa4 Update OEMCrypto documents am: 15b1cd9cc9 am: 02443e2142 am: 0214b1eb5e am: fa4d43d550 am: 8fbdddfd3e
Change-Id: Ica2e992931c50d66b02644c1de04b80f7d4654b2
2020-04-13 19:50:31 +00:00
Fred Gylys-Colwell
63c7f1276c Update OEMCrypto documents am: 15b1cd9cc9 am: b38e279ed6 am: d89f49b089 am: 29778ba638
Change-Id: I73cee05a0e4ef7f6ef875b02ffa59d55fd8a6bf1
2020-04-13 19:49:28 +00:00
Fred Gylys-Colwell
8fbdddfd3e Update OEMCrypto documents am: 15b1cd9cc9 am: 02443e2142 am: 0214b1eb5e am: fa4d43d550
Change-Id: Ie68d96e15ce61aa8d6fde89a6685f81051950957
2020-04-13 19:48:24 +00:00
Fred Gylys-Colwell
3924a00573 Update OEMCrypto documents am: 15b1cd9cc9 am: 02443e2142 am: 045e637317 am: 12d6316b6f
Change-Id: I23804e7f976038607b90ee49348a6c66fb0cda69
2020-04-13 19:48:21 +00:00
Fred Gylys-Colwell
29778ba638 Update OEMCrypto documents am: 15b1cd9cc9 am: b38e279ed6 am: d89f49b089
Change-Id: I0eb9257814b534dde9aa9ab54c12f42f99047720
2020-04-13 19:21:29 +00:00