Commit Graph

3678 Commits

Author SHA1 Message Date
Rahul Frias
d926fb31ec Address missing dependencies or executables
[ Merge of http://go/wvgerrit/195850 ]

Since Widevine device builds now include APEX prebuilts,
shared library dependencies for the prebuilts are in
are in /apex/com.google.android.widevine/lib[64] rather
than /system/lib[64] or /vendor/lib[64]. When tests are
run not all the dependencies are present.

These changes include
* Statically linking missing dependencies
* Adding /apex/com.google.android.widevine/lib[64] to
  the shared library path
* Searching for some of the test executables in
  /data/nativetest[64]/vendor/

Bug: 329888778
Bug: 329891889
Bug: 329891175
Bug: 329891049

Test: ./build_and_run_all_unit_tests.sh
Change-Id: I067685cedc7701c4e6502bdac98b53e22b61ad1e
2024-05-10 18:17:10 -07:00
Vicky Min
d53caaade2 Skip entitlement session test that is only supported on CAS devices
Bug: 335398236
Merged from https://widevine-internal-review.googlesource.com/197432
(cherry picked from commit a35129440254c91a261903e499e3f2417425cfb0)
(cherry picked from commit 87d58f48d62dbc4cdbb6c2af1c5a7bda2e209efa)

Change-Id: I7f67dfbc8725cbe0a67d8eda082fa184286d2e84
2024-05-10 18:15:16 -07:00
Fred Gylys-Colwell
1f3c38d6a3 Update request url
The test server for UAT and for the SDKs now accept the same
url format for renewals.

Bug: 328763985
Change-Id: I1a58412047735efa26da7986bf19fa9a7fbaf374
2024-05-10 15:03:17 -07:00
Vicky Min
1c6ec56725 Update DecryptZeroSizeSubSample test to accept success or error
Bug: 338010108
Merged from https://widevine-internal-review.googlesource.com/198002

Change-Id: I52c72a5c1a287e8556a243b6072faf23ce4bbdad
(cherry picked from commit 8b806d128e450ab0bf9cba17e21b5ed5ff97c277)
2024-05-10 17:24:37 +00:00
Rahul Frias
c4bb374653 Merge "Update ODK version to 19.1" into vic-widevine-dev 2024-04-26 23:50:25 +00:00
Treehugger Robot
874fbfff5f Merge "Revert "Add SCP support for Android files"" into vic-widevine-dev 2024-04-22 20:04:16 +00:00
Spandan Das
1caf26737b Use prefer for source vs prebuilts selection of widevine
widevine currenty uses `use_source_config_var` and product variables to
ensure that products gets the correct selection of source or prebuilts
of widevine apex.

`use_source_config_var` is being deprecated from Soong to unfiy the
mechanisms for source vs prebuilt selection. This CL transitions
widevine to a different mechanism `prefer` for prebuilt selection to aid
the deprecation.

Test: lunch cf_x86_64_phone-trunk_staging-userdebug; m nothing; aninja
-t path droid
vendor/widevine/libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks;
// no path exists, i.e. uses source

Test: lunch osprey-trunk_staging-userdebug; m nothing; aninja -t path
droid vendor/widevine/libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks;
// path exists; i.e. uses prebuilts

Bug: 332379718

Change-Id: I78800aee49f1de83ea2ce8160923362871806d87
2024-04-18 18:25:20 +00:00
Rahul Frias
c5a48e1cf3 Merge "Fix default cipher mode for CAS unit test" into vic-widevine-dev 2024-04-18 07:18:38 +00:00
Rahul Frias
e24c8dcb86 Revert "Add SCP support for Android files"
This reverts commit 95b50d39ba.

Reason for revert: Rikers changes should go on main. We can decide that partner OEMs can pick up this feature for V once it has been well tested on main.

Change-Id: I129303cbc86e267aba013a7c314724e51477dc82
2024-04-17 01:41:01 +00:00
Jacob Trimble
95b50d39ba Add SCP support for Android files
SCP uses the JNI headers in generated code, so several targets need
the include path; this will have no effect on non-SCP builds.  Also,
in "protected" builds, there is a generated library that needs to be
linked in the final binary, but this doesn't exist in the "analysis"
step; we create an empty static library if it doesn't exist so it works
on all cases.

Merged from https://widevine-internal-review.googlesource.com/169850

Merged from https://widevine-internal-review.googlesource.com/176177

Bug: 262635528
Change-Id: Ib676d55efbcbec81de9c3123bc70afb570d6caa5
(cherry picked from commit b9482eb23c261788a4432de7566f1b1de1cf9379)
2024-04-16 20:48:35 +00:00
Matt Feddersen
985eaacfb9 Update ODK version to 19.1
[ Merge of http://go/wvgerrit/195352 ]

PiperOrigin-RevId: 618915151
Merged from https://widevine-internal-review.googlesource.com/195050

Change-Id: Ieff901a961c3f965497b62a655c3ddb536e112a0
2024-04-16 10:59:48 -07:00
Cong Lin
c33960cb7c Fix default cipher mode for CAS unit test
[ Merge of http://go/wvgerrit/194571 ]

Default to OEMCrypto_CipherMode_CBC instead of OEMCrypto_CipherMode_CENC
which is not used by CAS.

Test: CAS unit tests
Bug: 325639114
Bug: 322928572
Merged from https://widevine-internal-review.googlesource.com/193650

Change-Id: I8876d5262643015fb6a322eae6444ef4001d146d
2024-04-16 10:25:38 -07:00
Android Build Coastguard Worker
b30452a3f6 Make change and version bump to ZV1A.240402.001
Snap for 11660751 from 670a481e6f to trunk-widevine-release

Change-Id: Ia5bcb9382fc5d2d15af4a7593c108e699b9fa176
2024-04-02 23:02:03 +00:00
Treehugger Robot
670a481e6f Merge "Remove unnecessary "_external" suffix from libcppbor" into main 2024-04-01 18:50:02 +00:00
Kalesh Singh
b95370a746 Merge "widevine_generic: Set max page size 16k" into main 2024-04-01 18:05:08 +00:00
Kalesh Singh
d9079fb300 widevine_generic: Set max page size 16k
Bug: 322391670
Change-Id: Ic5a9c6e33e675d33138127915c6ab9910742f6d7
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2024-04-01 18:04:59 +00:00
Shawn Willden
688a572357 Remove unnecessary "_external" suffix from libcppbor
Test: Build
Change-Id: I8e4d65bafe9d4b4bbc576c8c9c995bddf0a957a2
2024-04-01 10:24:45 -06:00
Kyle Zhang
6033e52b3d Merge "Integration tests to verify clear lead content plays successfully" into main 2024-03-29 04:39:46 +00:00
Treehugger Robot
c482048f00 Merge "Bump version to 19.1.0 and update OPK changelog" into main 2024-03-28 23:50:08 +00:00
Kyle Zhang
3c3e7cdb47 Merge "Label unused parameters in ODK" into main 2024-03-28 23:37:50 +00:00
Kyle Zhang
85223cf29a Merge "Lock v19.1 API" into main 2024-03-28 23:26:55 +00:00
Treehugger Robot
2b80494f57 Merge "Add BCC extract tool for BCC uploading test" into main 2024-03-28 23:04:05 +00:00
Matt Feddersen
daa6f5f738 Bump version to 19.1.0 and update OPK changelog
Merged from https://widevine-internal-review.googlesource.com/194911

Change-Id: I366df6f46622d6333e7f77cbef3cb5dc9b1d2710
2024-03-28 14:26:50 -07:00
Vicky Min
d05d3738b4 Integration tests to verify clear lead content plays successfully
Also added a unit test to verify that decryption without a license fails
with the correct error code. Also changed comment types for policy
integration tests and core integration tests to be picked up by Doxygen.

Bug: 320785945
Merged from https://widevine-internal-review.googlesource.com/194910

Change-Id: Ibdb70683003bb430dde9b4a1bd9fc9839bace342
2024-03-28 14:09:01 -07:00
Matt Feddersen
fb1554a10b Lock v19.1 API
Merged from https://widevine-internal-review.googlesource.com/195130

Change-Id: I44760c19bc1457017ffacdda5f3c40f4a66edccb
2024-03-28 14:04:35 -07:00
John Bruce
53d0f5cd6a Label unused parameters in ODK
This is necessary so we can remove `-Wno-unused-parameter` in the CDM and OPK builds.

PiperOrigin-RevId: 618255022
Merged from https://widevine-internal-review.googlesource.com/194110

Change-Id: I67b9b8cd27422c4b62d361d627fd1c05ed0cbdef
2024-03-28 13:57:46 -07:00
Android Build Coastguard Worker
44437eb40f Make change and version bump to ZV1A.240326.001
Snap for 11630212 from ee77a96d74 to trunk-widevine-release

Change-Id: I883796fc638ca2f52102d9b636b2ec1c7d1964bb
2024-03-26 23:31:34 +00:00
Treehugger Robot
24027c5ebf Merge "Quit test setup when test is skipped" into main 2024-03-26 23:00:40 +00:00
Rahul Frias
ee77a96d74 Merge changes I55b1eb04,I839db69a,I43e845b8,I56b6d301,Ia59bfacf, ... into main
* changes:
  Unit tests for forbidden RSA key usage
  Add DRM reprovisioning request generation
  Correct copyright header
  Fix bcc length for printing
  Update ODK version to 18.4
  Adjust skipping tests when provisioning skipped
  Change test storage to use protobuf
  Remove WvCdmEnginePreProvTestStaging
  Rename and clarify Drm Reprovisioning token types
2024-03-26 06:09:26 +00:00
Treehugger Robot
284b6bef68 Merge "Skip License Release tests when there is no usage table" into main 2024-03-25 20:04:28 +00:00
Fred Gylys-Colwell
202350959d Quit test setup when test is skipped
The SetUp for child classes do not automatically quit when
the parent SetUp is skipped.

Bug: 305093063
Change-Id: I606a949ef0e94fa87a97268856b7f2d8b9135ebe
2024-03-21 16:58:05 -07:00
Alex Dale
f7944b4dac Merge "Update support for HDCP levels on Android and CE CDM." into main 2024-03-21 21:00:59 +00:00
Cong Lin
1fd5a8bf37 Add BCC extract tool for BCC uploading test
Extract BCC and build info from oemcrypto, construct BCC uploading
record and dumps it out a JSON file.

The BCC uploader will pick up the output file later.

Bug: 312787974
Change-Id: Ie8ef6a75408e8ef8355b1c0de14532de0ae83732
2024-03-21 13:35:46 -07:00
Vicky Min
c001e2f5a4 Skip License Release tests when there is no usage table
Bug: 330364107
Merged from https://widevine-internal-review.googlesource.com/194574

Change-Id: I25db60e239b157d736d89506280c3d218215fb6f
2024-03-21 11:46:42 -07:00
Rahul Frias
a798692e4e Unit tests for forbidden RSA key usage
[ Partial merge of http://go/wvgerrit/188279 ]

This CL adds unit tests to verify that the following
forbidden uses of an RSA private key do not work:

- ForbidPrepAndSign -- A cast cert key cannot sign a license
  request.
- ForbidUseAsDRMCert -- A cast cert cannot be used with the
  DRM cert's padding scheme and it cannot be used to derive
  keys from a session key.
- *ForbidRSASignatureForDRMKey* -- A DRM cert key cannot be
  used with GenerateRSASignature.
- *OEMCertForbidGenerateRSASignature* -- An OEM cert key
  cannot be used with GenerateRSASignature.

Bug: 251875110
Test: WVTS
Change-Id: I55b1eb04465023352edea55ba4ef532d1cd07231
2024-03-20 23:59:55 -07:00
Rahul Frias
b3157f2328 Add DRM reprovisioning request generation
[ Merge of http://go/wvgerrit/192010 ]

Adding files not merged in ag/26501922

Updates the CDM to add support for DRM reprovisioning request creation.
- Load the baked-in certificate for use as the client token.
- Add functions to build and sign a drm reprovisioning request.
- Update the Rikers L3 OEMCrypto implementation to support signing
  provisioning requests and getting embedded certificate.
- Update client id token to handle DRM reprovisioning.
- Add OEMCrypto function to load the baked-in device certificate in
  Rikers CDMs and stubs for non-Rikers CDMs.
- Add dynamic adapter support for getting embedded device certificate
  only on L3.

Bug: 305093063
Test: WVTS
Change-Id: I839db69a48c1add196f9b56e6ee3812f549f814d
2024-03-20 23:30:26 -07:00
Rahul Frias
8046719c10 Correct copyright header
[ Merge of http://go/wvgerrit/186825 ]

Remove the words ` All rights reserved.` from Widevine's
existing copyright headers.

For context, see cl/578224540

Bug: 330655176
Test: WVTS

PiperOrigin-RevId: 580020267
Change-Id: I43e845b83f438e4ef7f0f542c2f4e427a188ab06
2024-03-20 23:24:17 -07:00
Cong Lin
5e186dcfa6 Fix bcc length for printing
[ Merge of http://go/wvgerrit/194310 ]

Resize bcc to the correct length to eliminate the trailing zeros.

Bug: 330645490
Test: core unit tests

Change-Id: I56b6d30120735a4d7a0f39f29a9f255bd2d2d18c
2024-03-20 21:41:15 -07:00
Vicky Min
882c80783b Update ODK version to 18.4
[ Merge of http://go/wvgerrit/192493 ]

Bug: 311951236
Test: WVTS

Change-Id: Ia59bfacf91d812f36f7a198632f7fa3462d0b8df
2024-03-20 20:45:43 -07:00
Fred Gylys-Colwell
38243aca4c Adjust skipping tests when provisioning skipped
[ Merge of http://go/wvgerrit/194254 ]

For some platforms, we cannot provision. In this case, any
test that needs provisioning is skipped. However, when a
test is skipped in a subroutine, the rest of SetUp is still
run. Any failures in SetUp will cause the test to be marked
as a failure.

This CL duplicates the check for skipping the test in SetUp
and in TearDown.

Bug: 329467151
Test: WV and unit/integration tests

Change-Id: I0087b12a3f26b52ecf62bf7b0e7bcf4fa2c6c763
2024-03-20 14:55:42 -07:00
Jacob Trimble
428586b0eb Change test storage to use protobuf
[ Merge of http://go/wvgerrit/193190 ]

This changes the persistent test storage to use protobufs instead of
manual parsing.  This simplifies the code but makes the files less
"human readable".  Files can be read using 'gqui' if needed.

Bug: 312529037
Test: unit/integration tests
Change-Id: I1b025eac96458c0061e0883e1e4fd05484842ff2
2024-03-20 13:59:14 -07:00
Fred Gylys-Colwell
d3b869c0ab Remove WvCdmEnginePreProvTestStaging
[ Merge of http://go/wvgerrit/194370 ]

This test explicitly provisions against the staging server,
which we do not require from partners.

Bug: 329293570
Test: WV unit/integration tests

Change-Id: Id88840f188ec99b386837d83f69844b0990594a9
2024-03-20 13:30:23 -07:00
Geoffrey Alexander
e9e4b76817 Rename and clarify Drm Reprovisioning token types
[ Merge of http://go/wvgerrit/194374 ]

Renames and adds clarifying comments to Drm Reprovisioning token types.
All provisioning methods can be forced to reprovision by apps which can
cause reprovisioning to be an overloaded term. Renaming token types
used by the Drm Reprovisioning method to more clearly state they are
used for Drm Certificate Reprovisioning should help to avoid confusion.
This change also adds comments to help clarify when and where Drm
Reprovisioning is used as a provisioning type.

Bug: b/305093063
Test: WVTS

* Added dependency to dynamic perf tests to fix missing header build
  error.

Change-Id: I158eb5672ad9e655a60bc68e0f4f2f7a0d464b4e
2024-03-20 11:15:58 -07:00
Rahul Frias
7cc19077ca Merge "Add DRM reprovisioning request generation" into main 2024-03-20 17:24:36 +00:00
Rahul Frias
fb795b7946 Merge "Call CopyBuffer in Decrypt if key handle is empty" into main 2024-03-19 21:22:30 +00:00
Android Build Coastguard Worker
a3b869c5c7 Make change and version bump to ZV1A.240319.001
Snap for 11596472 from f6b1fb288a to trunk-widevine-release

Change-Id: I2823562afba6096ceb6f65bbf9a2a83356dc09cd
2024-03-19 19:19:53 +00:00
Alex Dale
a5393206b1 Merge "Reset crypto session pointers on RemoveKeys." into main 2024-03-19 19:07:28 +00:00
Robert Shih
f6b1fb288a WVCdm version stamping
First, version.txt will be stamped by Android CI with a release
candidate name like "ZV1A.240307.001".

Next, a genrule will read version.txt and embed the release candidate
name inside the Widevine CDM binary.

See also:
- go/wv-trunk "Versioning"
- cl/616721723

Bug: 327241925
Test: Coastguard
Change-Id: I892ee957c058ac5f624912a38a048781af5f3487
2024-03-18 21:32:04 -07:00
Vicky Min
6577f6f212 Call CopyBuffer in Decrypt if key handle is empty
(Merged from go/wvgerrit/193672)

Bug: 320785945
Test: GTS + unit tests
Change-Id: I4a0c7568bf8323187f1156874ea98718511120f4
2024-03-15 14:50:02 -07:00
Rahul Frias
af2ffca5fa Add DRM reprovisioning request generation
[ Merge of http://go/wvgerrit/192010 ]

Updates the CDM to add support for DRM reprovisioning request creation.
- Load the baked-in certificate for use as the client token.
- Add functions to build and sign a drm reprovisioning request.
- Update the Rikers L3 OEMCrypto implementation to support signing
  provisioning requests and getting embedded certificate.
- Update client id token to handle DRM reprovisioning.
- Add OEMCrypto function to load the baked-in device certificate in
  Rikers CDMs and stubs for non-Rikers CDMs.
- Add dynamic adapter support for getting embedded device certificate
  only on L3.

Bug: 305093063
Test: WVTS
Change-Id: I9a0ecf95e27213b046f03baa0781fb164179323b
2024-03-15 10:22:35 -07:00