Adding WB_License_QueryKeyStatus()
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.
This commit is contained in:
107
whitebox-impl/WORKSPACE
Normal file
107
whitebox-impl/WORKSPACE
Normal file
@@ -0,0 +1,107 @@
|
||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
local_repository(
|
||||
name = "whitebox_api",
|
||||
path = "../whitebox",
|
||||
)
|
||||
|
||||
git_repository(
|
||||
name = "glog_repo",
|
||||
commit = "3ba8976592274bc1f907c402ce22558011d6fc5e", # 2020-02-16
|
||||
remote = "https://github.com/google/glog.git",
|
||||
)
|
||||
|
||||
git_repository(
|
||||
name = "com_github_gflags_gflags",
|
||||
commit = "2e227c3daae2ea8899f49858a23f3d318ea39b57", # 2020-01-15
|
||||
remote = "https://github.com/gflags/gflags.git",
|
||||
)
|
||||
|
||||
git_repository(
|
||||
name = "abseil_repo",
|
||||
commit = "fcb104594b0bb4b8ac306cb2f55ecdad40974683", # 2018-12-04
|
||||
remote = "https://github.com/abseil/abseil-cpp.git",
|
||||
)
|
||||
|
||||
git_repository(
|
||||
name = "boringssl_repo",
|
||||
commit = "14164f6fef47b7ebd97cdb0cea1624eabd6fe6b8", # 2018-11-26
|
||||
remote = "https://github.com/google/boringssl.git",
|
||||
)
|
||||
|
||||
git_repository(
|
||||
name = "googletest_repo",
|
||||
commit = "b6cd405286ed8635ece71c72f118e659f4ade3fb", # 2019-01-04
|
||||
remote = "https://github.com/google/googletest.git",
|
||||
)
|
||||
|
||||
# We use "com_google_protobuf" instead of "protobuf_repo" because Bazel's proto
|
||||
# rules implicitly depend on @com_google_protobuf. See
|
||||
# https://bazel.build/blog/2017/02/27/protocol-buffers.html.
|
||||
git_repository(
|
||||
name = "com_google_protobuf",
|
||||
remote = "https://github.com/google/protobuf.git",
|
||||
tag = "v3.8.0",
|
||||
)
|
||||
|
||||
# bazel_skylib is required by google protobuf.
|
||||
git_repository(
|
||||
name = "bazel_skylib",
|
||||
remote = "https://github.com/bazelbuild/bazel-skylib.git",
|
||||
tag = "1.0.2",
|
||||
)
|
||||
|
||||
# Protobuf library support. Not included in the recent protobuf release.
|
||||
http_archive(
|
||||
name = "zlib",
|
||||
build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
|
||||
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
|
||||
strip_prefix = "zlib-1.2.11",
|
||||
urls = ["https://zlib.net/zlib-1.2.11.tar.gz"],
|
||||
)
|
||||
|
||||
# ODK
|
||||
new_git_repository(
|
||||
name = "odk_repo",
|
||||
build_file = "@whitebox_api//external:odk.BUILD",
|
||||
commit = "c1401c6a1cc6a4378b6aa3d1c3d3f1f58278616e",
|
||||
remote = "https://widevine-partner.googlesource.com/oemcrypto_core_message.git",
|
||||
repo_mapping = {"@whitebox" : "@whitebox_api"}
|
||||
)
|
||||
|
||||
bind(
|
||||
name = "glog",
|
||||
actual = "@glog_repo//:glog",
|
||||
)
|
||||
|
||||
bind(
|
||||
name = "gflags",
|
||||
actual = "@com_github_gflags_gflags//:gflags",
|
||||
)
|
||||
|
||||
bind(
|
||||
name = "boringssl",
|
||||
actual = "@boringssl_repo//:crypto",
|
||||
)
|
||||
|
||||
bind(
|
||||
name = "gtest",
|
||||
actual = "@googletest_repo//:gtest",
|
||||
)
|
||||
|
||||
bind(
|
||||
name = "gtest_main",
|
||||
actual = "@googletest_repo//:gtest_main",
|
||||
)
|
||||
|
||||
bind(
|
||||
name = "protobuf",
|
||||
actual = "@com_google_protobuf//:protobuf",
|
||||
)
|
||||
|
||||
bind(
|
||||
name = "odk",
|
||||
actual = "@odk_repo//:odk",
|
||||
)
|
||||
26
whitebox-impl/impl/BUILD
Normal file
26
whitebox-impl/impl/BUILD
Normal file
@@ -0,0 +1,26 @@
|
||||
# ==============================================================================
|
||||
# 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".
|
||||
|
||||
package(default_visibility = [
|
||||
"//visibility:private",
|
||||
])
|
||||
|
||||
cc_library(
|
||||
name = "test_aead_whitebox",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "test_license_whitebox",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
80
whitebox-impl/tests/BUILD
Normal file
80
whitebox-impl/tests/BUILD
Normal file
@@ -0,0 +1,80 @@
|
||||
# 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.
|
||||
#
|
||||
# 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".
|
||||
|
||||
# ==============================================================================
|
||||
# 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:test_license_whitebox",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "remote_attestation_and_verification_test",
|
||||
size = "small",
|
||||
deps = [
|
||||
"@whitebox_api//api:remote_attestation_and_verification_test",
|
||||
"//impl:test_license_whitebox",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "license_whitebox_benchmark",
|
||||
size = "small",
|
||||
deps = [
|
||||
"@whitebox_api//api:license_whitebox_benchmark",
|
||||
"//impl:test_license_whitebox",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "license_whitebox_uat_test",
|
||||
size = "small",
|
||||
deps = [
|
||||
"@whitebox_api//api:license_whitebox_uat_test",
|
||||
"//impl:test_license_whitebox",
|
||||
],
|
||||
)
|
||||
2
whitebox-impl/tools/PLACEHOLDER
Normal file
2
whitebox-impl/tools/PLACEHOLDER
Normal file
@@ -0,0 +1,2 @@
|
||||
This is a placeholder file to ensure that the "tools" directory appears in the
|
||||
git repo.
|
||||
Reference in New Issue
Block a user