Correct stability issues for SPOIDs for provisioning 4.0

[ Merge of http://go/wvgerrit/183472 ]

For provisioning 4.0 devices, the DRM certificate serial number
was changing on a reprovisioning attempt or factory reset. The
app parameters sent up in the client identification name-value
pair field were being filtered out in provisioning requests.
This has been corrected for provisioning 4.0 stage 2
(DRM certificate request). There is no need to include them for
stage 1 (OEM certificate request).

The test case WvCdmRequestLicenseTest.ProvisioningSpoidTest
was created earlier to ensure that SPOIDs and DRM certificates are
stable. Unfortunately due to another bug b/250099615, the RKP service
was holding a connection to the Widevine TA for provisioning 4.0
devices. When native tests ran as their own process, L1 would fail
to load due to a connection failure and the test would run as L3.
The tests passed for provisioning 4.0 devices Pixel 7 and 8 when
they should have failed. This gave us a false sense of confidence
that the SPOIDs were stable.

For now a workaround is to run a shell command to kill the widevine
TA before running native tests.

$ adb shell pkill -f -9 widevine

New tests have been introduced to provide integration coverage
WVPluginTest at the WV plugin level and CoreIntegrationTest
for core. GTS tests are also being written in b/295538002.

Bug: 294451432
Bug: 293950895
Test: WVPluginTest.ProvisioningStableSpoidTestL1, WVTS tests
Change-Id: Ib9ace4387866ea38bb1840feb69cea78d2d2c09c
This commit is contained in:
Rahul Frias
2023-08-24 02:00:56 -07:00
parent be8b64a4e6
commit 2f83cd0e49
11 changed files with 669 additions and 24 deletions

View File

@@ -0,0 +1,76 @@
// Copyright 2020 Google LLC. All rights reserved. This file and proprietary
// source code may only be used and distributed under the Widevine
// License Agreement.
// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
// DEPENDING ON IT IN YOUR PROJECT. ***
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "vendor_widevine_license"
// to get the below license kinds:
// legacy_by_exception_only (by exception only)
// legacy_proprietary (by exception only)
default_applicable_licenses: ["vendor_widevine_license"],
}
cc_test {
name: "wv_plugin_test",
test_suites: ["device-tests"],
gtest: true,
srcs: [
"WVPlugin_test.cpp",
":libwvdrmengine_src",
":vts_cdm_core_test_srcs",
],
include_dirs: [
"frameworks/av/include",
"frameworks/native/include",
"vendor/widevine/libwvdrmengine/cdm/core/include",
"vendor/widevine/libwvdrmengine/cdm/core/test",
"vendor/widevine/libwvdrmengine/cdm/include",
"vendor/widevine/libwvdrmengine/cdm/metrics/include/",
"vendor/widevine/libwvdrmengine/cdm/util/include",
"vendor/widevine/libwvdrmengine/include",
"vendor/widevine/libwvdrmengine/mediadrm/include",
"vendor/widevine/libwvdrmengine/oemcrypto/include",
],
header_libs: [
"libstagefright_foundation_headers",
"libutils_headers",
],
static_libs: [
"libcdm",
"libcdm_protos",
"libcdm_utils",
"libgmock",
"libgtest",
"libgtest_main",
"libjsmn",
"libjsoncpp",
"libprotobuf-cpp-lite",
"libutils",
"libwv_odk",
"libwvdrmdrmplugin_aidl",
"libwvlevel3",
],
shared_libs: [
"android.hardware.drm-V1-ndk",
"libbase",
"libbinder_ndk",
"libcrypto",
"libdl",
"liblog",
"libssl",
],
cflags: [
"-Wall",
"-Werror",
"-Wextra",
],
proprietary: true,
owner: "widevine",
}