Make change and version bump to AV1A.240515.001

Snap for 11830041 from d926fb31ec to vic-widevine-partner-release

Change-Id: Id850f9b967fd599eca001b3c4339198f0330bdec
This commit is contained in:
Android Build Coastguard Worker
2024-05-16 00:00:22 +00:00
16 changed files with 66 additions and 34 deletions

View File

@@ -98,7 +98,11 @@ fi
# If that fails, an error message will be printed. # If that fails, an error message will be printed.
try_adb_push() { try_adb_push() {
# android-tests.zip requires /data/nativetest, we should use the same # android-tests.zip requires /data/nativetest, we should use the same
if [ -f $OUT/data/nativetest/$1 ]; then if [ -f $OUT/data/nativetest64/$1 ]; then
test_file=$OUT/data/nativetest64/$1
elif [ -f $OUT/data/nativetest64/vendor/$1/$1 ]; then
test_file=$OUT/data/nativetest64/vendor/$1/$1
elif [ -f $OUT/data/nativetest/$1 ]; then
test_file=$OUT/data/nativetest/$1 test_file=$OUT/data/nativetest/$1
elif [ -f $OUT/data/nativetest/vendor/$1/$1 ]; then elif [ -f $OUT/data/nativetest/vendor/$1/$1 ]; then
test_file=$OUT/data/nativetest/vendor/$1/$1 test_file=$OUT/data/nativetest/vendor/$1/$1

View File

@@ -83,7 +83,7 @@ void LicenseHolder::FailReloadLicense() {
} }
void LicenseHolder::GenerateAndPostRenewalRequest( void LicenseHolder::GenerateAndPostRenewalRequest(
const std::string& policy_id) { const std::string& renewal_policy_id) {
event_listener_.set_renewal_needed(false); event_listener_.set_renewal_needed(false);
CdmKeyRequest request; CdmKeyRequest request;
const CdmResponseType result = const CdmResponseType result =
@@ -92,7 +92,7 @@ void LicenseHolder::GenerateAndPostRenewalRequest(
if (config_.dump_golden_data()) { if (config_.dump_golden_data()) {
MessageDumper::DumpRenewalRequest(request); MessageDumper::DumpRenewalRequest(request);
} }
const std::string url = MakeUrl(config_.renewal_server(), policy_id); const std::string url = MakeUrl(config_.renewal_server(), renewal_policy_id);
request_in_flight_.reset(new UrlRequest(url)); request_in_flight_.reset(new UrlRequest(url));
ASSERT_TRUE(request_in_flight_->is_connected()) ASSERT_TRUE(request_in_flight_->is_connected())
<< "Failed for " << content_id(); << "Failed for " << content_id();
@@ -117,7 +117,7 @@ void LicenseHolder::LoadRenewal() {
} }
void LicenseHolder::GenerateAndPostReleaseRequest( void LicenseHolder::GenerateAndPostReleaseRequest(
const std::string& policy_id) { const std::string& release_policy_id) {
event_listener_.set_renewal_needed(false); event_listener_.set_renewal_needed(false);
CdmKeyRequest request; CdmKeyRequest request;
CdmAppParameterMap empty_app_parameters; CdmAppParameterMap empty_app_parameters;
@@ -134,7 +134,7 @@ void LicenseHolder::GenerateAndPostReleaseRequest(
// TODO (b/295956275) vickymin: write DumpReleaseRequest function // TODO (b/295956275) vickymin: write DumpReleaseRequest function
// MessageDumper::DumpReleaseRequest(request); // MessageDumper::DumpReleaseRequest(request);
} }
const std::string url = MakeUrl(config_.renewal_server(), policy_id); const std::string url = MakeUrl(config_.renewal_server(), release_policy_id);
request_in_flight_.reset(new UrlRequest(url)); request_in_flight_.reset(new UrlRequest(url));
ASSERT_TRUE(request_in_flight_->is_connected()) ASSERT_TRUE(request_in_flight_->is_connected())
<< "Failed for " << content_id(); << "Failed for " << content_id();
@@ -262,22 +262,16 @@ void LicenseHolder::GenerateKeyRequest(const InitializationData& init_data,
} }
std::string LicenseHolder::MakeUrl(const std::string& server_url, std::string LicenseHolder::MakeUrl(const std::string& server_url,
const std::string& policy_id) { const std::string& renewal_policy_id) {
// For tests, we want to specify the policy, but the UAT server only allows us // For tests, we want to specify the policy, but the UAT server only allows us
// to set the content id as the video_id. So each policy is matched to a // to set the content id as the video_id. So each policy is matched to a
// single license with the same name. The local license server, on the other // single license with the same name. The local license server, on the other
// hand, wants to see the policy id in the url. So we have to guess which // hand, wants to see the policy id in the url. So we have to guess which
// format to use based on the name of the server. // format to use based on the name of the server.
const std::string path = server_url + config_.client_auth(); const std::string path = server_url + config_.client_auth();
std::string video_query; if (!renewal_policy_id.empty()) {
if (!policy_id.empty()) { const std::string video_query =
if (path.find("proxy.uat") != std::string::npos) { "video_id=" + content_id() + "&renewal_policy=" + renewal_policy_id;
// This is uat or uat-nightly. Set the video_id.
video_query = "video_id=" + policy_id;
} else {
// This is probably a local license server. Set the policy.
video_query = "policy=" + policy_id;
}
// If there is already a parameter, then we don't need to add another // If there is already a parameter, then we don't need to add another
// question mark. // question mark.
return path + ((path.find('?') == std::string::npos) ? '?' : '&') + return path + ((path.find('?') == std::string::npos) ? '?' : '&') +

View File

@@ -69,13 +69,13 @@ class LicenseHolder {
// Attempt to reload a license, but expect a failure. // Attempt to reload a license, but expect a failure.
void FailReloadLicense(); void FailReloadLicense();
// Generate the renewal request, and send it to the server. // Generate the renewal request, and send it to the server.
void GenerateAndPostRenewalRequest(const std::string& policy_id); void GenerateAndPostRenewalRequest(const std::string& renewal_policy_id);
// Fetch the renewal response. This can add a few seconds of latency. // Fetch the renewal response. This can add a few seconds of latency.
void FetchRenewal(); void FetchRenewal();
// Load the renewal response that was fetched in FetchRenewal(). // Load the renewal response that was fetched in FetchRenewal().
void LoadRenewal(); void LoadRenewal();
// Generate the release request, and send it to the server. // Generate the release request, and send it to the server.
void GenerateAndPostReleaseRequest(const std::string& policy_id); void GenerateAndPostReleaseRequest(const std::string& release_policy_id);
// Fetch the release response. This can add a few seconds of latency. // Fetch the release response. This can add a few seconds of latency.
void FetchRelease(); void FetchRelease();
// Load the release response that was fetched in FetchRelease(). // Load the release response that was fetched in FetchRelease().
@@ -137,7 +137,7 @@ class LicenseHolder {
// Generate a URL for the specified policy. The license request should be sent // Generate a URL for the specified policy. The license request should be sent
// to this url. // to this url.
std::string MakeUrl(const std::string& server_url, std::string MakeUrl(const std::string& server_url,
const std::string& policy_id); const std::string& renewal_policy_id);
// Fetch the key response from the server. // Fetch the key response from the server.
void GetKeyResponse(const CdmKeyRequest& key_request); void GetKeyResponse(const CdmKeyRequest& key_request);
}; };

View File

@@ -25,11 +25,15 @@ LOCAL_STATIC_LIBRARIES := \
libcdm_protos \ libcdm_protos \
libcdm_utils \ libcdm_utils \
libjsmn \ libjsmn \
libjsoncpp \
libgmock \ libgmock \
libgmock_main \ libgmock_main \
libgtest \ libgtest \
libwvaidl \
libwvdrmcryptoplugin_aidl \
libwvlevel3 \ libwvlevel3 \
libwv_odk \ libwv_odk \
libPlatformProperties \
LOCAL_SHARED_LIBRARIES := \ LOCAL_SHARED_LIBRARIES := \
android.hardware.drm-V1-ndk \ android.hardware.drm-V1-ndk \
@@ -41,7 +45,6 @@ LOCAL_SHARED_LIBRARIES := \
liblog \ liblog \
libprotobuf-cpp-lite \ libprotobuf-cpp-lite \
libutils \ libutils \
libwvaidl \
wv_media_drm_flags_c_lib \ wv_media_drm_flags_c_lib \
LOCAL_HEADER_LIBRARIES := \ LOCAL_HEADER_LIBRARIES := \

View File

@@ -22,14 +22,20 @@ LOCAL_C_INCLUDES := \
LOCAL_STATIC_LIBRARIES := \ LOCAL_STATIC_LIBRARIES := \
libcdm \ libcdm \
libcdm_utils \
libcutils \
libcdm_protos \ libcdm_protos \
libcdm_utils \ libcdm_utils \
libjsmn \ libjsmn \
libjsoncpp \
libgmock \ libgmock \
libgmock_main \ libgmock_main \
libgtest \ libgtest \
libwvaidl \
libwvdrmdrmplugin_aidl \
libwvlevel3 \ libwvlevel3 \
libwv_odk \ libwv_odk \
libPlatformProperties \
LOCAL_SHARED_LIBRARIES := \ LOCAL_SHARED_LIBRARIES := \
android.hardware.drm-V1-ndk \ android.hardware.drm-V1-ndk \
@@ -40,7 +46,6 @@ LOCAL_SHARED_LIBRARIES := \
liblog \ liblog \
libprotobuf-cpp-lite \ libprotobuf-cpp-lite \
libutils \ libutils \
libwvaidl \
wv_media_drm_flags_c_lib \ wv_media_drm_flags_c_lib \
LOCAL_HEADER_LIBRARIES := \ LOCAL_HEADER_LIBRARIES := \
@@ -92,6 +97,8 @@ LOCAL_STATIC_LIBRARIES := \
libgtest \ libgtest \
libgtest_main \ libgtest_main \
libjsmn \ libjsmn \
libwvaidl \
libwvdrmdrmplugin_aidl \
libwvlevel3 \ libwvlevel3 \
libwv_odk \ libwv_odk \
@@ -101,7 +108,6 @@ LOCAL_SHARED_LIBRARIES := \
liblog \ liblog \
libprotobuf-cpp-lite \ libprotobuf-cpp-lite \
libutils \ libutils \
libwvaidl \
LOCAL_C_INCLUDES += \ LOCAL_C_INCLUDES += \
external/protobuf/src \ external/protobuf/src \

View File

@@ -26,9 +26,9 @@ struct CoreMessageFeatures {
// This is the published version of the ODK Core Message library. The default // This is the published version of the ODK Core Message library. The default
// behavior is for the server to restrict messages to at most this version // behavior is for the server to restrict messages to at most this version
// number. The default is 19.0. // number. The default is 19.1.
uint32_t maximum_major_version = 19; uint32_t maximum_major_version = 19;
uint32_t maximum_minor_version = 0; uint32_t maximum_minor_version = 1;
bool operator==(const CoreMessageFeatures &other) const; bool operator==(const CoreMessageFeatures &other) const;
bool operator!=(const CoreMessageFeatures &other) const { bool operator!=(const CoreMessageFeatures &other) const {

View File

@@ -16,10 +16,10 @@ extern "C" {
/* The version of this library. */ /* The version of this library. */
#define ODK_MAJOR_VERSION 19 #define ODK_MAJOR_VERSION 19
#define ODK_MINOR_VERSION 0 #define ODK_MINOR_VERSION 1
/* ODK Version string. Date changed automatically on each release. */ /* ODK Version string. Date changed automatically on each release. */
#define ODK_RELEASE_DATE "ODK v19.0 2024-03-22" #define ODK_RELEASE_DATE "ODK v19.1 2024-03-25"
/* The lowest version number for an ODK message. */ /* The lowest version number for an ODK message. */
#define ODK_FIRST_VERSION 16 #define ODK_FIRST_VERSION 16

View File

@@ -33,7 +33,7 @@ CoreMessageFeatures CoreMessageFeatures::DefaultFeatures(
features.maximum_minor_version = 4; // 18.4 features.maximum_minor_version = 4; // 18.4
break; break;
case 19: case 19:
features.maximum_minor_version = 0; // 19.0 features.maximum_minor_version = 1; // 19.1
break; break;
default: default:
features.maximum_minor_version = 0; features.maximum_minor_version = 0;

View File

@@ -276,6 +276,9 @@ OEMCryptoResult ODK_InitializeSessionValues(ODK_TimerLimits* timer_limits,
case 18: case 18:
nonce_values->api_minor_version = 4; nonce_values->api_minor_version = 4;
break; break;
case 19:
nonce_values->api_minor_version = 1;
break;
default: default:
nonce_values->api_minor_version = 0; nonce_values->api_minor_version = 0;
break; break;

View File

@@ -1275,7 +1275,7 @@ std::vector<VersionParameters> TestCases() {
{16, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 16, 5}, {16, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 16, 5},
{17, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 17, 2}, {17, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 17, 2},
{18, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 18, 4}, {18, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 18, 4},
{19, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 19, 0}, {19, ODK_MAJOR_VERSION, ODK_MINOR_VERSION, 19, 1},
// Here are some known good versions. Make extra sure they work. // Here are some known good versions. Make extra sure they work.
{ODK_MAJOR_VERSION, 16, 3, 16, 3}, {ODK_MAJOR_VERSION, 16, 3, 16, 3},
{ODK_MAJOR_VERSION, 16, 4, 16, 4}, {ODK_MAJOR_VERSION, 16, 4, 16, 4},
@@ -1287,13 +1287,16 @@ std::vector<VersionParameters> TestCases() {
{ODK_MAJOR_VERSION, 18, 3, 18, 3}, {ODK_MAJOR_VERSION, 18, 3, 18, 3},
{ODK_MAJOR_VERSION, 18, 4, 18, 4}, {ODK_MAJOR_VERSION, 18, 4, 18, 4},
{ODK_MAJOR_VERSION, 19, 0, 19, 0}, {ODK_MAJOR_VERSION, 19, 0, 19, 0},
{ODK_MAJOR_VERSION, 19, 1, 19, 1},
{0, 16, 3, 16, 3}, {0, 16, 3, 16, 3},
{0, 16, 4, 16, 4}, {0, 16, 4, 16, 4},
{0, 16, 5, 16, 5}, {0, 16, 5, 16, 5},
{0, 17, 1, 17, 1}, {0, 17, 1, 17, 1},
{0, 17, 2, 17, 2}, {0, 17, 2, 17, 2},
{0, 18, 3, 18, 3}, // Change to 19 when the default version is updated. {0, 18, 3, 18, 3},
{0, 18, 4, 18, 4}, {0, 18, 4, 18, 4},
{0, 19, 0, 19, 0},
{0, 19, 1, 19, 1},
}; };
return test_cases; return test_cases;
} }

View File

@@ -49,6 +49,7 @@ LOCAL_C_INCLUDES += \
LOCAL_STATIC_LIBRARIES := \ LOCAL_STATIC_LIBRARIES := \
libcdm \ libcdm \
libcppbor \
libjsmn \ libjsmn \
libgmock \ libgmock \
libgtest \ libgtest \
@@ -62,7 +63,6 @@ LOCAL_STATIC_LIBRARIES := \
LOCAL_SHARED_LIBRARIES := \ LOCAL_SHARED_LIBRARIES := \
libbase \ libbase \
libcppbor \
libcrypto \ libcrypto \
libdl \ libdl \
libbinder_ndk \ libbinder_ndk \

View File

@@ -544,7 +544,7 @@ TEST_P(OEMCryptoSessionTestsDecryptTests, DecryptZeroSizeSubSample) {
ASSERT_NO_FATAL_FAILURE(LoadLicense()); ASSERT_NO_FATAL_FAILURE(LoadLicense());
ASSERT_NO_FATAL_FAILURE(MakeBuffers()); ASSERT_NO_FATAL_FAILURE(MakeBuffers());
ASSERT_NO_FATAL_FAILURE(EncryptData()); ASSERT_NO_FATAL_FAILURE(EncryptData());
ASSERT_NO_FATAL_FAILURE(TestDecryptCENC()); ASSERT_NO_FATAL_FAILURE(DecryptCENC());
} }
// There are probably no frames this small, but we should handle them anyway. // There are probably no frames this small, but we should handle them anyway.

View File

@@ -635,6 +635,9 @@ TEST_P(OEMCryptoLicenseTest, EntitledKeySessionsAPI17) {
if (wvoec::global_features.api_version < 17) { if (wvoec::global_features.api_version < 17) {
GTEST_SKIP() << "Test for versions 17 and up only."; GTEST_SKIP() << "Test for versions 17 and up only.";
} }
if (!global_features.supports_cas) {
GTEST_SKIP() << "OEMCrypto does not support CAS";
}
license_messages_.set_license_type(OEMCrypto_EntitlementLicense); license_messages_.set_license_type(OEMCrypto_EntitlementLicense);
ASSERT_NO_FATAL_FAILURE(license_messages_.SignAndVerifyRequest()); ASSERT_NO_FATAL_FAILURE(license_messages_.SignAndVerifyRequest());
ASSERT_NO_FATAL_FAILURE(license_messages_.CreateDefaultResponse()); ASSERT_NO_FATAL_FAILURE(license_messages_.CreateDefaultResponse());

View File

@@ -27,7 +27,8 @@ elif [ 0 -eq `expr index "$GTEST_FILTER" "-"` ]; then
fi fi
# The Android supplement allows for installation in these paths: # The Android supplement allows for installation in these paths:
OEC_PATHS=/system/lib64:/system/lib/:/vendor/lib64:/vendor/lib:/system/lib64/vndk-R:/system/lib/vndk-R OEC_PATHS=/apex/com.google.android.widevine/lib64:/apex/com.google.android.widevine/lib:
OEC_PATHS+=/system/lib64:/system/lib/:/vendor/lib64:/vendor/lib:/system/lib64/vndk-R:/system/lib/vndk-R
# Execute a command in "adb shell" and capture the result. # Execute a command in "adb shell" and capture the result.
adb_shell_run() { adb_shell_run() {
@@ -49,7 +50,8 @@ adb_shell_run() {
# to load. We must reverse the library path in this case so we don't attempt # to load. We must reverse the library path in this case so we don't attempt
# to load 64-bit libraries with the 32-bit liboemcrypto.so. # to load 64-bit libraries with the 32-bit liboemcrypto.so.
if ! adb $SERIAL_NUM shell ls /vendor/lib64/liboemcrypto.so &> /dev/null; then if ! adb $SERIAL_NUM shell ls /vendor/lib64/liboemcrypto.so &> /dev/null; then
OEC_PATHS=/system/lib:/system/lib64/:/vendor/lib:/vendor/lib64:/system/lib/vndk-R:/system/lib64/vndk-R OEC_PATHS=/apex/com.google.android.widevine/lib:/apex/com.google.android.widevine/lib64:
OEC_PATHS+=/system/lib:/system/lib64/:/vendor/lib:/vendor/lib64:/system/lib/vndk-R:/system/lib64/vndk-R
fi fi
adb $SERIAL_NUM shell "LD_LIBRARY_PATH=$OEC_PATHS GTEST_FILTER=$GTEST_FILTER $@ $test_file" \|\| echo "$adb_error" | tee "$tmp_log" adb $SERIAL_NUM shell "LD_LIBRARY_PATH=$OEC_PATHS GTEST_FILTER=$GTEST_FILTER $@ $test_file" \|\| echo "$adb_error" | tee "$tmp_log"
! grep -Fq "$adb_error" "$tmp_log" ! grep -Fq "$adb_error" "$tmp_log"

View File

@@ -19,18 +19,32 @@ LOCAL_C_INCLUDES := \
vendor/widevine/libwvdrmengine/oemcrypto/include \ vendor/widevine/libwvdrmengine/oemcrypto/include \
LOCAL_STATIC_LIBRARIES := \ LOCAL_STATIC_LIBRARIES := \
libaidlcommonsupport \
libgtest \ libgtest \
libgtest_main \ libgtest_main \
libjsmn \
libjsoncpp \
libcdm \
libcdm_protos \
libcdm_utils \
libwvdrmcryptoplugin_aidl \
libwvdrmdrmplugin_aidl \
libwvlevel3 \
libwv_odk \
libwvaidl \
libPlatformProperties \
LOCAL_SHARED_LIBRARIES := \ LOCAL_SHARED_LIBRARIES := \
android.hardware.drm-V1-ndk \ android.hardware.drm-V1-ndk \
libbase \ libbase \
libbinder_ndk \ libbinder_ndk \
libcrypto \ libcrypto \
libcutils \
libdl \ libdl \
liblog \ liblog \
libprotobuf-cpp-lite \
libutils \ libutils \
libwvaidl \ wv_media_drm_flags_c_lib \
LOCAL_HEADER_LIBRARIES := \ LOCAL_HEADER_LIBRARIES := \
libstagefright_foundation_headers \ libstagefright_foundation_headers \

View File

@@ -1 +1 @@
AV1A.240428.001 AV1A.240515.001