The two major changes in this code drop are: 1. The introduction of WB_License_QueryKeyStatus(). This function makes it possible for the White-box to skip keys in the license and report the usefulness of the key to the CDM. 2. The restructuring of the repo, making it easier to share test BUILD files and set the foundation for the new code drop structure. This change brings the partner repo in sync with the internal repo at commit f3b472a541262ca4d425d2b294de39a99385a3d2.
146 lines
3.8 KiB
Python
146 lines
3.8 KiB
Python
# Copyright 2020 Google LLC. All Rights Reserved.
|
|
|
|
package(default_visibility = [
|
|
"//visibility:private",
|
|
])
|
|
|
|
# ==============================================================================
|
|
# Structure
|
|
# ==============================================================================
|
|
#
|
|
# This BUILD file must expose the following build targets so that the test/BUILD
|
|
# file can link against it:
|
|
#
|
|
# test_aead_whitebox : The target for testing the AEAD white-box.
|
|
#
|
|
# test_license_whitebox : The target for testing the license white-box. The
|
|
# white-box should use the private key provided in
|
|
# "//api/test_license_whitebox_keys.cc".
|
|
|
|
# ==============================================================================
|
|
# Internal Targets
|
|
# ==============================================================================
|
|
|
|
cc_library(
|
|
name = "odk",
|
|
srcs = ["odk.cc"],
|
|
hdrs = ["odk.h"],
|
|
deps = [
|
|
"//api:result",
|
|
"//chromium_deps/base:glog",
|
|
"//external:odk",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "memory_util",
|
|
srcs = ["memory_util.cc"],
|
|
hdrs = ["memory_util.h"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "content_key",
|
|
hdrs = ["content_key.h"],
|
|
deps = [
|
|
"//api:license_whitebox",
|
|
"//chromium_deps/cdm/protos:license_protocol_proto",
|
|
]
|
|
)
|
|
|
|
cc_library(
|
|
name = "renewal_key",
|
|
hdrs = ["renewal_key.h"],
|
|
deps = [
|
|
"//api:license_whitebox",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "license_parser",
|
|
srcs = ["license_parser.cc"],
|
|
hdrs = ["license_parser.h"],
|
|
deps = [
|
|
":content_key",
|
|
":renewal_key",
|
|
":odk",
|
|
"//api:result",
|
|
"//chromium_deps/cdm/protos:license_protocol_proto",
|
|
"//crypto_utils:aes_cbc_decryptor",
|
|
"//crypto_utils:crypto_util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "odk_license_parser",
|
|
srcs = ["odk_license_parser.cc"],
|
|
hdrs = ["odk_license_parser.h"],
|
|
deps = [
|
|
":license_parser",
|
|
"//chromium_deps/base:glog",
|
|
"//crypto_utils:crypto_util",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "protobuf_license_parser",
|
|
srcs = ["protobuf_license_parser.cc"],
|
|
hdrs = ["protobuf_license_parser.h"],
|
|
deps = [
|
|
":license_parser",
|
|
"//chromium_deps/base:glog",
|
|
"//chromium_deps/cdm/protos:license_protocol_proto",
|
|
"//crypto_utils:crypto_util",
|
|
],
|
|
)
|
|
|
|
# ==============================================================================
|
|
# AEAD White-box Targets
|
|
# ==============================================================================
|
|
|
|
cc_library(
|
|
name = "test_aead_whitebox",
|
|
srcs = [
|
|
"aead_test_data.cc",
|
|
"aead_whitebox_impl.cc",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":memory_util",
|
|
"//api:aead_test_data",
|
|
"//api:aead_whitebox",
|
|
"//api:result",
|
|
"//chromium_deps/third_party/boringssl",
|
|
"//crypto_utils:crypto_util",
|
|
],
|
|
)
|
|
|
|
# ==============================================================================
|
|
# License White-box Targets
|
|
# ==============================================================================
|
|
|
|
# This target is shared between both license white-box targets. The only this
|
|
# target lacks is the actual key data.
|
|
cc_library(
|
|
name = "test_license_whitebox",
|
|
srcs = [
|
|
"license_whitebox_impl.cc",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":license_parser",
|
|
":memory_util",
|
|
":odk",
|
|
":odk_license_parser",
|
|
":protobuf_license_parser",
|
|
"//api:license_whitebox",
|
|
"//api:result",
|
|
"//api:test_license_whitebox_keys",
|
|
"//chromium_deps/cdm/keys:dev_certs",
|
|
"//chromium_deps/cdm/protos:license_protocol_proto",
|
|
"//crypto_utils:aes_cbc_decryptor",
|
|
"//crypto_utils:aes_ctr_encryptor",
|
|
"//crypto_utils:crypto_util",
|
|
"//crypto_utils:rsa_key",
|
|
],
|
|
)
|