Commit Graph

5392 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
9dbc32089f Add MediaDrm property to allow test keybox am: df04f3f0f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16507299

Change-Id: I734f26fa06a19ac6e8526bfdaa074fb5a8bbdab3
2022-01-07 05:57:13 +00:00
Fred Gylys-Colwell
78d0b73964 Test session should continue with no keybox am: 75b87c7f59
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16507242

Change-Id: I41ad0bd10056a3f1615d390a0b33b42cfcd6e4b3
2022-01-07 05:57:12 +00:00
Fred Gylys-Colwell
76bbdba1e5 Skip OTA test if not supported am: 2f57079f6a
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16507241

Change-Id: If8bf505db0424e596f946f51daafc7b66233e0e5
2022-01-07 05:57:11 +00:00
Fred Gylys-Colwell
5e5913818d Handle nonce flood in OTA test am: 3c7528de62
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16507240

Change-Id: I3fabca84341ff313f569780c3b7e253a44af4d05
2022-01-07 05:57:11 +00:00
Alex Dale
25098c88e8 Open session when checking for OTA keybox support. am: 2d1372fbec
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16496630

Change-Id: Ia16f9c4cf293520047faeae2d69b5c8f05f47439
2022-01-07 05:57:10 +00:00
Alex Dale
d2c1aec4a7 Return failure if ignore keybox debug count is non-zero. am: 1b35b915b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16496629

Change-Id: Ibf4fcd015569173fb3779f1a0b09d9e137f84a83
2022-01-07 05:57:09 +00:00
Fred Gylys-Colwell
bf776ef27d Fix System ID problem for devices with no keybox am: f6d682b182
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16408945

Change-Id: I26c5d75affe116c56665de4a038e008ba34bd0d7
2022-01-07 03:48:24 +00:00
Alex Dale
c645c398c5 Correctly record license service version in metrics. am: 8aabf20134
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16416872

Change-Id: Ic3fe7f7bc7f425f6e1a3071b098f0c602e6ac927
2022-01-07 03:48:18 +00:00
Fred Gylys-Colwell
df04f3f0f8 Add MediaDrm property to allow test keybox
Merge from Widevine repo of http://go/wvgerrit/142150 (part 1)

For an EVT device, without a keybox or with a test keybox, we want it
to fall back to L3. However, when running the unit or integration
tests it should continue running tests with test keybox. This will
allow us to test L1 oemcrypto on an EVT device, while still using an
EVT device for dogfooding video content at the L3 level.

This CL modifes the HIDL and non-HIDL plugin, so it was hand merged to
downstream branches.

Bug: 210807585
Merged-In: I85b96f127abe30f8f061b242f7580fa8f6c01776
Change-Id: I85b96f127abe30f8f061b242f7580fa8f6c01776
2021-12-23 20:18:44 +00:00
Fred Gylys-Colwell
75b87c7f59 Test session should continue with no keybox
Merge from Widevine repo of http://go/wvgerrit/142149

This CL updates the TestCryptoSession so that it will recover from
initializing without a keybox. This allows unit and integration tests
to be run using a test keybox on a device that does not have any
keybox.

Bug: 210807585
Bug: 161925952
Change-Id: I8639bd733a50ae5af3a7c786347b5a06a9d783ce
2021-12-19 17:58:58 +00:00
Fred Gylys-Colwell
2f57079f6a Skip OTA test if not supported
Merge from Widevine repo of http://go/wvgerrit/142050

This is test only code.

Bug: 210690170
Change-Id: Ic982cc1ed801325146918bd6153e7f34faf31196
2021-12-19 17:58:26 +00:00
Fred Gylys-Colwell
3c7528de62 Handle nonce flood in OTA test
Merge from Widevine repo of http://go/wvgerrit/142049

This CL is test only code. A nonce flood was causing the OTA test to
be a little flaky when run on the automatic testing platform Luci.

Bug: 205889158
Change-Id: I4f3e5d8469b899e565c430bd46994e098c5d94e6
2021-12-19 17:56:57 +00:00
Alex Dale
2d1372fbec Open session when checking for OTA keybox support.
[ Merge of http://go/wvgerrit/142089 ]
[ Cherry-pick of http://ag/16496425 ]

Qualcomm's implementation of GenerateOTARequest requires an open
session before attempting to generate an OTA keybox request.  When
checking for OTA keybox support, the dynamic layer was not opening
a session, getting a different error than expected.  Coincidentally,
this would trick the dynamic layer to thinking it was supported, but
hides useful error information.

Bug: 210823889
Test: Android manual testing
Change-Id: I60662d2d9d411c0f999b619d6088aabdba55e2c3
2021-12-17 04:31:31 +00:00
Alex Dale
1b35b915b5 Return failure if ignore keybox debug count is non-zero.
[ Merge of http://go/wvgerrit/141949 ]
[ Cherry-pick of http://ag/16496424 ]

If the debug count for ignoring an L1 keybox is still non-zero after
successfully processing an OTA keybox request, the dynamic layer MUST
return a failure to the CDM to keep the CDM and dynamic layer in
agreement that the L1 keybox should continue be treated as invalid.

This will trigger a fallback; but the fallback can be canceled via
the debugging app.

Bug: 210823889
Test: Android manual testing
Change-Id: I75f50ba605d17872c0e8abffc1eee13ff539f01c
2021-12-17 04:30:43 +00:00
Fred Gylys-Colwell
f6d682b182 Fix System ID problem for devices with no keybox
Merge from Widevine repo of http://go/wvgerrit/139372
Revert workaround for falling back to L3
(Partially merged previously)

Merge from Widevine repo of http://go/wvgerrit/139498
Guard against double initialize
(Partially merged previously)

Merge from Widevine repo of http://go/wvgerrit/139343
Use a placeholder ID for devices missing a system ID

Merge from Widevine repo of http://go/wvgerrit/140934
Check security-level during OpenSession.

Merge from Widevine repo of https://go/wvgerrit/141469
Make OTAKeyboxSupported handle the short buffer return
code

Bug: 187646550
Bug: 206670307
Bug: 206570220
Bug: 205896558
Bug: 205041153
Test: Manual test on flame
Change-Id: I71f5faf6b611337b82d8b6179251f6b0224780e6
2021-12-14 19:36:41 -08:00
Alex Dale
8aabf20134 Correctly record license service version in metrics.
[ Cherry-pick of http://ag/15245767 ]
[ Merge of http://go/wvgerrit/128624 ]

The CDM session was incorrectly recording the "license SDK version" as
the "license service version" in the session metrics.  This
discrepancy reduces the quality of devices' metrics and limits
debugging capabilities for the Widevine metric monitoring services.

Bug: 193177333
Test: Linux unit tests
Change-Id: Ic58cf7bc4fde777bb590c05777b76f5ff5c2f1ea
(cherry picked from commit 78278c3eb4)
2021-12-08 02:23:43 +00:00
Jeff Tinker
6a005a95b9 Merge "OEMCrypto Testing: Don't return key data if no keybox" into sc-v2-dev am: ecb4d64e41
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16300800

Change-Id: I1284acd93a68a49185c9fbffe91b0b7bd7cf35c1
2021-12-03 09:25:03 +00:00
Jeff Tinker
ecb4d64e41 Merge "OEMCrypto Testing: Don't return key data if no keybox" into sc-v2-dev 2021-12-03 07:12:19 +00:00
Fred Gylys-Colwell
6864a04975 Guard against double initialize am: 03f8d1b6f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16306734

Change-Id: Ie2628bdebded7e58474b54abebb58b3b4e7ff54e
2021-11-20 06:55:38 +00:00
Fred Gylys-Colwell
03f8d1b6f7 Guard against double initialize
Merge from Widevine repo of http://go/wvgerrit/139498

If L1 OEMCrypto fails to initialize, we won't try again.

Bug: 206670307
Change-Id: I89084476ae01d9c98291392c2ce703ebc6326322
2021-11-20 05:37:34 +00:00
Fred Gylys-Colwell
057c925d3c Fall back to Level 3 if Keybox not found am: 0e55743d3a
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16300799

Change-Id: I22d4bb59754bc4c7b61b704a1c2181e1685b818a
2021-11-19 01:38:12 +00:00
Fred Gylys-Colwell
7c3e06f46d OEMCrypto Testing: Don't return key data if no keybox
Merge from Widevine repo of http://go/wvgerrit/139336

When pretending we have no keybox, we should also have no system id or
device id. This should reproduce our problem with the test app.

Bug: 206570220
Test: reproduced problem using TestOPK app
Change-Id: I893336ce8e1fd2272f5b511676e1da28654639a7
2021-11-18 23:08:30 +00:00
Fred Gylys-Colwell
0e55743d3a Fall back to Level 3 if Keybox not found
Merge from Widevine repo of http://go/wvgerrit/139333

This is a workaround for devices that don't have a
keybox installed.

Bug: 206570220
Bug: 205896558
Bug: 205041153
Test: verified device falls back to L3 using TestOKP app
Change-Id: Id929b48ddaa7114a81765095aac536705f69e68c
2021-11-18 22:53:51 +00:00
Rahul Frias
d44e6b2ff3 Update Version number am: 0aa9b47b03
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16221418

Change-Id: Ia23642271cbe27a4fd86ec4bb64d313e8acb270a
2021-11-12 04:47:17 +00:00
Rahul Frias
0aa9b47b03 Update Version number
[ Merge of http://go/wvgerrit/138289 and http://go/ag/16210935 ]

Update the android version number test to accept "12" or "12L"

Bug: 205491167
Test: wv unit/integration tests
Change-Id: If11e7c6f3a89263ab78d274aa8d776991d3942e9
2021-11-09 16:41:40 -08:00
Alex Dale
544299db8b Clear OTA keybox flag. am: f5e4c94e26
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16094844

Change-Id: Id8a110c13e2aed574ec1fd7641d4f0fc24ad382d
2021-10-28 17:02:17 +00:00
Alex Dale
90f7296a4e Added debugOtaKeyboxFallbackDuration property. am: 8b12e5acc9
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16096276

Change-Id: Id74a39aabd42272673de9bbd3efa672c0c609015
2021-10-28 17:02:16 +00:00
Alex Dale
596363ef9e Update fallback policy for fast fallback. am: 28b45c4f1b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16096533

Change-Id: Ibf2e7e04c28251bf0918db98093d0a6a5191628e
2021-10-28 17:02:16 +00:00
Fred Gylys-Colwell
cc67284f44 Update OTA Keybox tests am: eb846100d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058124

Change-Id: I9000ab12e582e2b1ec8992b70ab6a9c883f1a836
2021-10-28 17:02:15 +00:00
Fred Gylys-Colwell
017e6dabce Correct build error in non-hidl WVDrmPlugin am: 80463a0eea
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058123

Change-Id: Ibfba7d0ec38fb2ddc9b46b4821f34b9c28f9c9f3
2021-10-28 17:02:15 +00:00
Fred Gylys-Colwell
220f1e750e Use MediaDrm property to ignore installed keybox am: c21b756451
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058122

Change-Id: Icc1025c0e78ffbc677f17621ad028f27cd565bf0
2021-10-28 17:02:15 +00:00
Alex Dale
deb174cef5 Formatted OTA keybox function comments. am: 5975b4e70a
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058121

Change-Id: I4ac7640a58bbb4f3add632759a7b5c59a2c7f3fc
2021-10-28 17:02:14 +00:00
Rahul Frias
2243801d83 Assume Keybox provisioning type if OTA Keybox is supported. am: 581aa1702b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058120

Change-Id: I03925f8ffec8ebb690d49db04d637e2f8f2fb15f
2021-10-28 17:02:13 +00:00
Fred Gylys-Colwell
f114219345 Updates to OTA Keybox Reprovisioning am: a3166eb2ba
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058119

Change-Id: I1eccae55a858fc634b0ee53f79bfda0cbdda134b
2021-10-28 17:02:12 +00:00
Rahul Frias
f19130a23c Wrapped OKP info into several classes. am: 39558526f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058118

Change-Id: I77e2e5023bca6f9b1ff1279d517534e58693b2a2
2021-10-28 17:02:11 +00:00
Rahul Frias
54fc6edf0d Added an OTA keybox provisioner. am: 52bd1d206e
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058117

Change-Id: I2f177ef33d62cadd271262df56c76eed386bb22d
2021-10-28 17:02:11 +00:00
Fred Gylys-Colwell
556940237f Use local provisioning server am: 44ba42f5cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058116

Change-Id: Ib10701963fc4ba89d37f49b95186640244576305
2021-10-28 17:02:10 +00:00
Alex Dale
f5e4c94e26 Clear OTA keybox flag.
[ Cherry-pick of http://ag/16087795 ]
[ Merge of http://go/wvgerrit/136432 ]

Once OTA keybox succeeds, the |needs_keybox_provisioning_| flag is
cleared.  Access to the system fallback policy is allowed after
provisioning to check status.

Bug: 203177668
Test: ExoPlayer test
Change-Id: I2d28c896c554cfbc9b008340bb415d4c7fac62f2
(cherry picked from commit cac2dcaa6c)
2021-10-20 18:22:06 -07:00
Alex Dale
8b12e5acc9 Added debugOtaKeyboxFallbackDuration property.
[ Cherry-pick of http://ag/16064434 ]
[ Merge of http://go/wvgerrit/136330 ]

This changes adds a custom debug property for changing the fallback
policy used for the system.  Depending on the value set, the device
will either use a "fast" fallback (30 seconds) or "default" fallback
(~1 day with exponential backoff).  Setting this property to either
"fast" or "default" will end the current fallback if it has been
triggered.

Bug: 187646550
Test: Android unit tests
Change-Id: I5271f96139c1e468242f7fa742668cc791ffcf91
2021-10-20 17:54:03 -07:00
Alex Dale
28b45c4f1b Update fallback policy for fast fallback.
[ Cherry-pick of http://ag/16064433 ]
[ Merge of http://go/wvgerrit/136329 ]

CDM core has been updated to support very short fallback durations in
the case of failures during OTA keybox provisioning.  This is intended
to be used during testing via specialized developer apps or GTS tests.

Bug: 187646550
Test: Android unit tests
Change-Id: I8a75d2e1c404d6caed535b087e8dd29da5c21b83
2021-10-20 17:53:03 -07:00
Fred Gylys-Colwell
eb846100d4 Update OTA Keybox tests
Merge from Widevine repo of http://go/wvgerrit/135982

The basic test was failing when using the testbed oemcrypto
because the testbed deletes its keybox on each
initialization. The test would terminate and re-initialize
oemcrypto whenever all the crypto sessions are deleted. This
has been fixed by holding a crypto session alive until the
end of the test.

bug: 187646550
Test: test only code
Merged-In: I48a3771bf5fd4aae8d262b8c7bf42f004d9b9f4c
Change-Id: I48a3771bf5fd4aae8d262b8c7bf42f004d9b9f4c
2021-10-20 17:52:12 -07:00
Fred Gylys-Colwell
80463a0eea Correct build error in non-hidl WVDrmPlugin
This fix was missing in the last merge of http://go/wvgerrit/135063

Bug: 187646550
Merged-In: I2b2252f8335c36325fd76d92ac26b9fbfcff5362
Change-Id: I2b2252f8335c36325fd76d92ac26b9fbfcff5362
2021-10-20 17:51:50 -07:00
Fred Gylys-Colwell
c21b756451 Use MediaDrm property to ignore installed keybox
Merge from Widevine repo of http://go/wvgerrit/135984

If the MediaDrm property string debugIgnoreKeyboxCount is set to 1,
then the keybox will be ignored on the next initialization. This will
force an OTA keybox reprovisioning.

Equivalently, a 1 may be written to the file
L1/debug_ignore_keybox_count.txt.

In order to test a failed reprovisioning step, a value of 2 may be
used.

Bug: 187646550
Merged-In: Ie7d34a8b355398855f4ec43dd95dd73c5907bdeb
Change-Id: Ie7d34a8b355398855f4ec43dd95dd73c5907bdeb
2021-10-20 17:50:57 -07:00
Alex Dale
5975b4e70a Formatted OTA keybox function comments.
The API comments for the two new OTA keybox OEMCrypto functions
required formatting to be compatible with the doxygen comment
strings.

Bug: 190505461
Test: Android unit tests and GTS
Merged-In: Ia45dc9d727a2a904170912193709cd9416b8fe27
Change-Id: Ia45dc9d727a2a904170912193709cd9416b8fe27
(cherry picked from commit 9f2364cefd)
2021-10-20 17:50:47 -07:00
Rahul Frias
581aa1702b Assume Keybox provisioning type if OTA Keybox is supported.
[ Merge of http://go/wvgerrit/133943 and http://go/wvgerrit/134043 ]

Certain OEMCrypto implementations will not report their provisioning
method if the keybox is invalid.  If the OEMCrypto implementation
supports OTA keybox provisioning and does not report its provisioning
method, then keybox provisioning is assumed.

Bug: 187646550
Test: unit/integration/GtsMediaTestCases
Merged-In: Ie7753546e53fc73fd59803958e88edf416ee5336
Change-Id: Ie7753546e53fc73fd59803958e88edf416ee5336
2021-10-20 17:50:37 -07:00
Fred Gylys-Colwell
a3166eb2ba Updates to OTA Keybox Reprovisioning
Adjust OTA code to account for some design changes and
add integration tests.

Merge from Widevine repo of http://go/wvgerrit/133775
Change use_test_key to uint32_t type

Merge from Widevine repo of http://go/wvgerrit/133774
Cleanup CDM OKP info before tests.

Merge from Widevine repo of http://go/wvgerrit/133773
Change context for derivation in OTA keybox solution

Merge from Widevine repo of http://go/wvgerrit/133772
Updated OTA keybox key derivation.

Merge from Widevine repo of http://go/wvgerrit/133771
Use double provisioning step in integration tests

Merge from Widevine repo of http://go/wvgerrit/133770
Erase keybox on initialization for OEMCrypto testbed

Merge from Widevine repo of http://go/wvgerrit/133769
Add session id to OEMCrypto OTA functions

Merge from Widevine repo of http://go/wvgerrit/133768
Integration test for OTA Keybox reprovisioning

Merge from Widevine repo of http://go/wvgerrit/133767
Add test x509 cert for testing

Merge from Widevine repo of http://go/wvgerrit/133766
OTA Keybox basic functionality in testbed

Merge from Widevine repo of http://go/wvgerrit/133765
Update OTA test script to use newer build scripts

Merge from Widevine repo of http://go/wvgerrit/133764
Adjust comment stype for doxygen

Test: Test: unit/integration/GtsMediaTestCases

Bug: 190505461
Bug: 190505461
Bug: 190505461
bug: 187646550
Bug: 187646550
Bug: 187646550
Bug: 187646550
Bug: 190505461
Bug: 187646550
Bug: 188228998
Bug: 190505461
Bug: 187646550
Merged-In: I41ff819a1fd8aca2e20adb25127fa0d9c4879b01
Change-Id: I41ff819a1fd8aca2e20adb25127fa0d9c4879b01
2021-10-20 17:50:18 -07:00
Rahul Frias
39558526f6 Wrapped OKP info into several classes.
[ Merge of http://go/wvgerrit/133744 ]

This changes adds several small classes which contain and manage
system and engine information related to OTA keybox provisioning.
These classes closely map to the OKP device file messages.

Bug: 189232882
Test: Linux unit tests
Change-Id: Ia9334c38f9d7ea89b30d9ad05f0595570bb38658

Storing and loading OKP info.

[ Merge of http://go/wvgerrit/133763 and http://go/ag/15645333 ]

This change extends the DeviceFiles module to be able to store and
load OKP info.  Mild data validation is performed when storing and
loading the information.

Bug: 189232882
Test: Android unit tests
Change-Id: I077de3234157252f2255a4389bf82a8d5344a355

System OKP fallback policy.

[ Merge of http://go/wvgerrit/133783 and http://go/ag/15645334 ]

SystemFallbackPolicy provides a thread-safe interface for accessing
and modifying OKP info.

Bug: 189232882
Test: Android unit tests
Change-Id: I4e43e3bc047ed5fb6cb517b53e4094e812b70e1e

Engine OKP provisioner.

[ Merge of http://go/wvgerrit/133803 and http://go/ag/15645335 ]

The OtaKeyboxProvisioner provides a CdmEngine-specific context for
performing OTA keybox provisioning.  Utilizes the system-wide
SystemFallbackPolicy to relay provisioning status between engines.
The provisioner will handle message wrapping and unwrapping of the
raw OTA keybox request / response into the SignedProvisioningMessage
which is sent to/received from the provisioning server.

[ Partial merge of http://go/wvgerrit/125844 ]

Note: Includes partial CryptoSession changes from various CLs.
CryptoSession functionality has been stripped to reduce impact of
this CL.

Bug: 189232882
Test: Android unit tests
Change-Id: I282bf7d1887daefb2250af1bd595c4dc3dfcfb29

Integrated OKP into CDM Engine

[ Merge of http://go/wvgerrit/133804 and http://go/ag/15646376 ]

Extended the functionality of the CdmEngine to check if the device
requires OKP and to initialize OKP resources if required.  The
functionality of OpenSession() and GetProvisioningRequest() have been
the most affected.  If OKP is required, these methods will signal to
the app that provisioning is required and will return an OKP request.

Once a device is provisioned, the OKP data is cleared away and the
CdmEngine will resume normal operation.  Engines created after a
device is provisioned will immediately enter normal operations.
The exception is for CdmEngines which failed to perform OKP for some
reason and are still running.  Those apps will need to restart before
gaining access to L1 operations.

Bug: 187646550
Test: Android integration tests
Merged-In: Ia572a66a7b73479355758aa3d0c682691eaca0fc
Change-Id: Ia572a66a7b73479355758aa3d0c682691eaca0fc
2021-10-20 17:50:08 -07:00
Rahul Frias
52bd1d206e Added an OTA keybox provisioner.
[ Merge of http://go/wvgerrit/133729 ]

The OtaKeyboxProvisioner is a system-wide provisioner for sharing the
provisioning workflow between CDM engines.

Bug: 189232882
Test: GtsMediaTestCases
Change-Id: I873af3087cc05e1831bdd1d2c14fb002b73e6902

Added keybox provisioning proto fields.

[ Merge of http://go/wvgerrit/133730 and http://go/ag/15113032 ]

This CL copies over the required license_protocol.proto changes that
are required for OTA keybox provisioning.  These fields are defined in
the server-side certificate_provisioning.proto, defined in
http://cl/377533774.

Note, changes are slightly different from server proto due to the RVC
version of license_protocol.proto being out of date with SC and newer
changes.

Bug: 189232882
Test: run_x86_64_tests
Change-Id: I55fcf6a7ac2ba4b6026b9acc63e822ff33c431d9

Added OTA keybox provisioning device files.

[ Merge of http://go/wvgerrit/133743 and http://go/ag/15421141 ]

This change adds a new set of proto messages/fields the CDM's device
files for recording device and engine information around OTA keybox
provisioning (OKP).

To make cleanup and thread protection possible, there is a single file
which will contain all the information for the device as a whole and
each CDM engine tied to an app/origin.

Bug: 189232882
Test: Linux unit tests
Change-Id: Iaf80cd6342f32657e04416750d9b278d935821a5

Client ID for OKP requests.

[ Merge of http://go/wvgerrit/133744 and http://go/ag/15645331 ]

Extended the CDM ClientIdentification class to support a subset of
client info used for OKP requests.

Bug: 189232882
Test: Android unit tests
Merged-In: I6aafb4f2164efe69bc733ece0a912f0e91893b91
Change-Id: I6aafb4f2164efe69bc733ece0a912f0e91893b91
2021-10-20 17:50:00 -07:00
Fred Gylys-Colwell
44ba42f5cc Use local provisioning server
Merge from Widevine repo of http://go/wvgerrit/133703 and
http://ag/14707867

In order to use a local provisioning server, we need to use a
different test keybox system id that is in the dev device database
instead of the production database. We also need to use a local
license server that uses the dev license server.

Bug: 187646550
Test: GtsMediaTestCases

Change-Id: Ice89143dd26de22757375a770c6bac716fcbc057

Add Keybox OTA Provisioning functions to OEMCrypto header

Merge from Widevine repo of http://go/wvgerrit/133704 and
http://go/ag/14707868

Bug: 188228998
Change-Id: Iff54bc2870e87bf7239e179e1d02fbcc8df6198f

Stub build changes to support OTA Keybox

Merge from Widevine repo of http://go/wvgerrit/133725 and
http://go/ag/14781459

This CL adds a new unit test file for testing OTA keybox
reprovisioning functionality. This new test is built when running the
dynamic adapter in the linux build, and in the Android build.

Bug: 187646550
Change-Id: I625513840188f95e74831ef2ea399e827e837439

Add OTA Keybox functions to dynamic adapter

Merge from Widevine repo of http://go/wvgerrit/125843
and http://go/ag/14781460

Bug: 187646550
Change-Id: Ief78ed10599c091690e0d7dc488ea71674c763b5

Refactor dynamic adapter keybox verification

Merge from Widevine repo of http://go/wvgerrit/133727
http://go/ag/14812524

The keybox validation needs to be done separately from initializing
the library so that we can support Keybox OTA Reprovisioning.

If L1 loads, but the keybox is missing, the initialization should
succeed. When the keybox is validated, the adapter should try to look
for a keybox on the filesystem. if none is found, it should either
return NEEDS PROVISIONING or an error.

Bug: 187646550
Change-Id: I34a8c365a5a5ca35c379bea827c85c749964744c

Update crypto session to use new OTA keybox functionality

Merge from Widevine repo of http://go/wvgerrit/133728 and
http://go/ag/14812525

This CL stubs out two new CryptoSession functions that call the new
OEMCrypto functions for OTA Keybox Provisioning. It builds!  Yay!

It also adds a boolean needs_keybox_provisioning that is set to true
when OEMCrypto reports that it needs a keybox. This should only happen
if there is no keybox installed and oemcrypto supports provisioning.

Bug: 187646550
Merged-In: Ide9533943125aa13b8899b652b118a0b410c882c
Change-Id: Ide9533943125aa13b8899b652b118a0b410c882c
2021-10-20 17:49:43 -07:00
Jeff Tinker
98301a2ef2 Properly close plugins on SIGTERM and exit am: e28f98cc82 am: b847732abd
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/15888307

Change-Id: I7e5486a8aca5870fef736e28e9644dd6631a51e6
2021-09-25 00:57:08 +00:00