Commit Graph

8061 Commits

Author SHA1 Message Date
Rahul Frias
c5a48e1cf3 Merge "Fix default cipher mode for CAS unit test" into vic-widevine-dev 2024-04-18 07:18:38 +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
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
Rahul Frias
6499e7063d Merge "Re-generate Android L3 after merging oemcrypto-v19 to master" into main 2024-03-14 22:24:42 +00:00
Alex Dale
b1fad7f4cb Reset crypto session pointers on RemoveKeys.
[ Merge of http://go/wvgerrit/189590 ]
[ Cherry-pick of http://ag/26541307 ]

The CDM session shares its CryptoSession instance with a few additional
member objects (CdmLicense and PolicyEngine).  When the CDM session's
crypto session is reset, it must also reset the CdmLicense and
PolicyEngine otherwise, a potential stale pointer reference may occur.

Test: request_license_test on Oriole
Test: run_x86_64_tests
Bug: 311239278
Change-Id: Ie175513ae652dcd96e12e5e1def574a8a56d5863
2024-03-14 00:19:25 -07:00
Alex Dale
67393a2cb6 Update support for HDCP levels on Android and CE CDM.
[ Merge of http://go/wvgerrit/194050 ]

OEMCrypto v17 introduced higher granularity in the device's HDCP V1
levels.  Previously, all HDCP v1.x were group together.  The change
was aimed towards server policy enforcement, not device enforcement.

Core code was updated, and could then be reflected in license
requests; however, reporting the new v1.x subversions was never
exposed to the higher app layers.

It is likely that devices which attempted to use specific 1.x versions
encountered test failures (for both CE CDM and Android CDM) as neither
implementations could handle such versions when communicating with
the app.

This change updates both CE CDM and Android CDM:
1) The CE CDM now uses the same subversion version comparisons as
   performed by the core code.
2) The Android CDM will now recognize new HDCP levels, and not return
   unexpected values.

Bug: 329155501
Test: run_x86_64_tests
Test: request_license_test on Oriole
Change-Id: I61fc0f11808f594456bd00210fd9b2bb5ed16c0e
2024-03-13 23:02:26 -07:00
Kyle Zhang
5c175ad151 Merge "Add new dev apex set 11546836" into main 2024-03-13 17:21:17 +00:00
Rahul Frias
72077acec6 Re-generate Android L3 after merging oemcrypto-v19 to master
[ Merge of http://go/wvgerrit/192271 ]

Test: L3 unit tests and GTS on pixel 7
Bug: 324147162
Test: WVTS
Change-Id: I5d94b0c9b3f681774e32623463b0d689f5bacc8c
2024-03-11 22:48:46 +00:00
Kyle Zhang
1324d5954b Add new dev apex set 11546836
Bug: 324294223
Change-Id: If74e9cffebb5b2aa05824973449dbebd8de269f1
2024-03-11 18:33:30 +00:00
Kyle Zhang
cbc38ca085 Drop Widevine apex prebuilt files for dev 11546836
The following files have been updated as part of this change:

libwvdrmengine/apex/prebuilt/dev/com.google.android.widevine.lazy-11546836.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.lazy
versionCode=11546836
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:10000

libwvdrmengine/apex/prebuilt/dev/com.google.android.widevine.lazy-11546836.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.lazy
versionCode=11546836
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:10000

libwvdrmengine/apex/prebuilt/dev/com.google.android.widevine.lazy-11546836.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.lazy
versionCode=11546836
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:10000

libwvdrmengine/apex/prebuilt/dev/com.google.android.widevine.lazy-11546836.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.lazy
versionCode=11546836
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:10000

libwvdrmengine/apex/prebuilt/dev/com.google.android.widevine.nonupdatable-11546836.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=11546836
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:10000

libwvdrmengine/apex/prebuilt/dev/com.google.android.widevine.nonupdatable-11546836.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=11546836
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:10000

libwvdrmengine/apex/prebuilt/dev/com.google.android.widevine.nonupdatable-11546836.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=11546836
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:10000

libwvdrmengine/apex/prebuilt/dev/com.google.android.widevine.nonupdatable-11546836.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=11546836
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:10000

Built here: ab/11546836

The change is generated with prebuilt drop tool.

Change-Id: I646e410011c4168987e7ced0101a3ae7c442ab8f
2024-03-11 18:17:15 +00:00
Rahul Frias
e7a96ec47a Merge "Run unit tests if verity has already been disabled" into main 2024-03-08 22:30:45 +00:00
Rahul Frias
925b52e133 Merge "Add a flag to enable Rikers" into main 2024-03-08 05:20:06 +00:00