Files
whitebox/whitebox/api/BUILD
Aaron Vaage cff64dd7df Update VMP/RA Tests
Before the VMP/RA tests only tested that decryption was successful
(checking the return code) but did not test the actual success of the
decryption (checking the decrypted plaintext against golden
plaintext).

This brings this repo in sync with the internal repo's commit
58d85cf6b19ecfb932f8edc2eaa8e907a1d21489.
2021-02-17 11:08:25 -08:00

205 lines
4.8 KiB
Python

# Copyright 2020 Google LLC. All Rights Reserved.
package(default_visibility = ["//visibility:private"])
cc_library(
name = "result",
hdrs = [
"result.h",
],
visibility = ["//visibility:public"],
)
cc_library(
name = "aead_whitebox",
hdrs = [
"aead_whitebox.h",
],
visibility = ["//visibility:public"],
deps = [
":result",
],
)
cc_library(
name = "license_whitebox",
hdrs = [
"license_whitebox.h",
],
visibility = ["//visibility:public"],
deps = [
":result",
],
)
cc_library(
name = "test_key_types",
testonly = True,
hdrs = [
"test_key_types.h",
],
)
cc_library(
name = "test_public_key",
testonly = True,
hdrs = [
"test_public_key.h",
],
visibility = ["//visibility:public"],
)
cc_library(
name = "aead_test_data",
testonly = True,
hdrs = [
"aead_test_data.h",
],
visibility = ["//visibility:public"],
)
cc_library(
name = "golden_data",
testonly = True,
srcs = [
"golden_data.cc",
],
hdrs = [
"golden_data.h",
],
deps = [
":test_key_types",
"//chromium_deps/cdm/protos:license_protocol_proto",
],
)
cc_library(
name = "test_license_builder",
testonly = True,
srcs = ["test_license_builder.cc"],
hdrs = ["test_license_builder.h"],
visibility = ["//visibility:public"],
deps = [
":test_key_types",
"//chromium_deps/cdm/keys:dev_certs",
"//chromium_deps/cdm/protos:license_protocol_proto",
"//crypto_utils:aes_cbc_encryptor",
"//crypto_utils:crypto_util",
"//crypto_utils:rsa_key",
"//external:odk",
],
)
cc_library(
name = "aead_whitebox_test",
testonly = True,
srcs = [
"aead_whitebox_create_test.cc",
"aead_whitebox_cross_instance_test.cc",
"aead_whitebox_decrypt_test.cc",
"aead_whitebox_encrypt_test.cc",
],
visibility = ["//visibility:public"],
deps = [
":aead_test_data",
":aead_whitebox",
"//chromium_deps/testing",
],
alwayslink = True,
)
cc_library(
name = "aead_whitebox_benchmark",
testonly = True,
srcs = [
"aead_whitebox_benchmark.cc",
],
visibility = ["//visibility:public"],
deps = [
":aead_test_data",
":aead_whitebox",
"//benchmarking:data_source",
"//benchmarking:measurements",
"//chromium_deps/base:glog",
"//chromium_deps/testing",
],
alwayslink = True,
)
cc_library(
name = "license_whitebox_test",
testonly = True,
srcs = [
"license_whitebox_create_test.cc",
"license_whitebox_decrypt_test.cc",
"license_whitebox_get_secret_string_test.cc",
"license_whitebox_key_control_block_test.cc",
"license_whitebox_masked_decrypt_test.cc",
"license_whitebox_process_license_response_core_message_test.cc",
"license_whitebox_process_license_response_test.cc",
"license_whitebox_security_level_test.cc",
"license_whitebox_sign_license_request_test.cc",
"license_whitebox_sign_renewal_request_test.cc",
"license_whitebox_test_base.cc",
"license_whitebox_verify_renewal_response_test.cc",
"remote_attestation_and_verification_test.cc",
],
hdrs = [
"license_whitebox_test_base.h",
],
visibility = ["//visibility:public"],
deps = [
":golden_data",
":license_whitebox",
":test_license_builder",
":test_public_key",
"//chromium_deps/cdm/keys:api",
"//chromium_deps/cdm/protos:license_protocol_proto",
"//chromium_deps/testing",
"//crypto_utils:rsa_key",
],
alwayslink = True,
)
cc_library(
name = "license_whitebox_benchmark",
testonly = True,
srcs = [
"license_whitebox_benchmark.cc",
"license_whitebox_decrypt_benchmark.cc",
"license_whitebox_process_license_response_benchmark.cc",
"license_whitebox_sign_benchmark.cc",
"license_whitebox_verify_benchmark.cc",
],
hdrs = [
"license_whitebox_benchmark.h",
],
visibility = ["//visibility:public"],
deps = [
":license_whitebox",
":test_key_types",
":test_license_builder",
":test_public_key",
"//benchmarking:data_source",
"//benchmarking:measurements",
"//chromium_deps/base:glog",
"//chromium_deps/testing",
"//crypto_utils:crypto_util",
],
alwayslink = True,
)
cc_library(
name = "license_whitebox_golden_data",
testonly = True,
srcs = [
"license_whitebox_golden_data_test.cc",
],
visibility = ["//visibility:public"],
deps = [
":license_whitebox",
"//chromium_deps/testing",
],
alwayslink = True,
)