In this code drop we introduce the ODK dependency. The reference implementation has been updated to make use of the ODK and the related tests have been included. In addition, we have included an example of how a shared libraries can be created. This will allow make it easier to test and verify different implementations of the API. Most other changes introduce by this code drop were made to clean-up the reference implementation and limit dependencies.
189 lines
4.5 KiB
Python
189 lines
4.5 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 = "export",
|
|
hdrs = ["export.h"],
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "aead_whitebox",
|
|
hdrs = [
|
|
"aead_whitebox.h",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":export",
|
|
":result",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "license_whitebox",
|
|
hdrs = [
|
|
"license_whitebox.h",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":export",
|
|
":result",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "test_data",
|
|
testonly = True,
|
|
hdrs = [
|
|
"test_data.h",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "golden_data",
|
|
testonly = True,
|
|
srcs = [
|
|
"golden_data.cc",
|
|
],
|
|
hdrs = [
|
|
"golden_data.h",
|
|
],
|
|
deps = [
|
|
"//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 = [
|
|
"//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_whitebox",
|
|
":test_data",
|
|
"//chromium_deps/testing",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "aead_whitebox_benchmark",
|
|
testonly = True,
|
|
srcs = [
|
|
"aead_whitebox_benchmark.cc",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":aead_whitebox",
|
|
":test_data",
|
|
"//benchmarking:data_source",
|
|
"//benchmarking:measurements",
|
|
"//chromium_deps/base:glog",
|
|
"//chromium_deps/testing",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "license_whitebox_test",
|
|
testonly = True,
|
|
srcs = [
|
|
"license_whitebox_chromeos_test.cc",
|
|
"license_whitebox_create_test.cc",
|
|
"license_whitebox_decrypt_test.cc",
|
|
"license_whitebox_get_secret_string_test.cc",
|
|
"license_whitebox_masked_decrypt_test.cc",
|
|
"license_whitebox_process_license_response_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",
|
|
],
|
|
hdrs = [
|
|
"license_whitebox_test_base.h",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":golden_data",
|
|
":license_whitebox",
|
|
":test_data",
|
|
":test_license_builder",
|
|
"//chromium_deps/cdm/keys:api",
|
|
"//chromium_deps/cdm/protos:license_protocol_proto",
|
|
"//chromium_deps/testing",
|
|
"//crypto_utils:rsa_key",
|
|
],
|
|
)
|
|
|
|
# TODO(jrummell): Move sources into "license_whitebox_test" once all
|
|
# implementations support core_message.
|
|
cc_library(
|
|
name = "license_whitebox_core_message_test",
|
|
testonly = True,
|
|
srcs = [
|
|
"license_whitebox_process_license_response_core_message_test.cc",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":license_whitebox",
|
|
":license_whitebox_test",
|
|
":test_license_builder",
|
|
"//chromium_deps/testing",
|
|
],
|
|
)
|
|
|
|
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_data",
|
|
":test_license_builder",
|
|
"//benchmarking:data_source",
|
|
"//benchmarking:measurements",
|
|
"//chromium_deps/base:glog",
|
|
"//chromium_deps/testing",
|
|
"//crypto_utils:crypto_util",
|
|
],
|
|
)
|