Files
whitebox/whitebox-impl/tests/BUILD
KongQun Yang d6ef4e1133 Update the test to support license protocol 2.2
- Add a flag ENABLE_LICENSE_PROTOCOL_2_2, when the flag is enabled
  - Hash the license request in WB_License_ProcessLicenseResponse, i.e.
    the request used for the key derivation, which ensures the key
    derivation message to be a string of constant size 64 bytes.
  - Hash the license request in WB_License_SignLicenseRequest. Note that
    the function takes license request (or hashed) + odk message as
    parameter for odk v17 or above.
- Enable the flag just for Chrome and ChromeOS for now.

We may change the implementation to hash inside the white-box in the
future.

Also included a few other misc changes, e.g. updating the DEPS of
boringssl and googletest which are already in the white-box directory,
adding a test main etc.
2023-03-29 19:20:23 +00:00

96 lines
2.6 KiB
Python

# Copyright 2021 Google LLC. All Rights Reserved.
package(default_visibility = [
"//visibility:private",
])
# ==============================================================================
# Requirements
# ==============================================================================
#
# This BUILD file expects the implementation BUILD file to expose the following
# build targets so that it can link against them:
#
# test_aead_whitebox : The target for testing the AEAD white-box.
#
# general_license_whitebox: The target for testing the license white-box.
#
# uat_license_whitebox : The target for testing the license white-box against
# licenses from Widevine's UAT server.
# ==============================================================================
# AEAD Test Targets
# ==============================================================================
cc_test(
name = "aead_whitebox_test",
size = "small",
deps = [
"@whitebox_api//api:aead_whitebox_test",
"//impl:test_aead_whitebox",
],
)
cc_test(
name = "aead_whitebox_benchmark",
size = "small",
deps = [
"@whitebox_api//api:aead_whitebox_benchmark",
"//impl:test_aead_whitebox",
],
)
# ==============================================================================
# License Whitebox Test Targets
# ==============================================================================
cc_test(
name = "license_whitebox_test",
size = "small",
deps = [
"@whitebox_api//api:license_whitebox_test",
"//impl:general_license_whitebox",
],
)
cc_test(
name = "remote_attestation_and_verification_test",
size = "small",
deps = [
"@whitebox_api//api:remote_attestation_and_verification_test",
"//impl:general_license_whitebox",
],
)
cc_test(
name = "license_whitebox_benchmark",
size = "small",
deps = [
"@whitebox_api//api:license_whitebox_benchmark",
"//impl:general_license_whitebox",
],
)
cc_test(
name = "license_whitebox_uat_test",
size = "small",
deps = [
"@whitebox_api//api:license_whitebox_uat_test",
"//impl:uat_license_whitebox",
],
)
# ==============================================================================
# Test Binaries
# ==============================================================================
cc_binary(
name = "license_whitebox_main",
testonly = True,
deps = [
"@whitebox_api//api:license_whitebox_main",
"//impl:test_license_whitebox",
"//impl:license_whitebox_provider_keys_test_data"
],
)