Restructure Project
To make it easier to have separate implementations, we have structured the repo so that there are three Bazel workspaces: - The API (and reference) - The vendor implementation for dev - The vendor implementation for prod This allows the vendor implementation to be separated from the API, while it makes little difference in this repo. While it makes little difference for this repo, it makes managing versions much easier internally. We do it here to better reflect our internal structure to partners. A vendor implementation has been stubbed in (BUILD file and directory structure) to provide vendors with some scaffolding to organize their implementation.
This commit is contained in:
214
whitebox/crypto_utils/BUILD
Normal file
214
whitebox/crypto_utils/BUILD
Normal file
@@ -0,0 +1,214 @@
|
||||
################################################################################
|
||||
# Copyright 2017 Google LLC.
|
||||
#
|
||||
# This software is licensed under the terms defined in the Widevine Master
|
||||
# License Agreement. For a copy of this agreement, please contact
|
||||
# widevine-licensing@google.com.
|
||||
################################################################################
|
||||
#
|
||||
# Constants, data structures, util classes for Widevine libraries.
|
||||
|
||||
cc_library(
|
||||
name = "aes_cbc_decryptor",
|
||||
srcs = ["aes_cbc_decryptor.cc"],
|
||||
hdrs = ["aes_cbc_decryptor.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//chromium_deps/base:glog",
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "aes_cbc_decryptor_test",
|
||||
size = "small",
|
||||
srcs = ["aes_cbc_decryptor_test.cc"],
|
||||
deps = [
|
||||
":aes_cbc_decryptor",
|
||||
"//chromium_deps/testing",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "aes_cbc_encryptor",
|
||||
srcs = ["aes_cbc_encryptor.cc"],
|
||||
hdrs = ["aes_cbc_encryptor.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//chromium_deps/base:glog",
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "aes_cbc_encryptor_test",
|
||||
size = "small",
|
||||
srcs = ["aes_cbc_encryptor_test.cc"],
|
||||
deps = [
|
||||
":aes_cbc_encryptor",
|
||||
"//chromium_deps/base:glog",
|
||||
"//chromium_deps/testing",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "aes_ctr_encryptor",
|
||||
srcs = ["aes_ctr_encryptor.cc"],
|
||||
hdrs = ["aes_ctr_encryptor.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//chromium_deps/base:glog",
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "aes_ctr_encryptor_test",
|
||||
size = "small",
|
||||
srcs = ["aes_ctr_encryptor_test.cc"],
|
||||
deps = [
|
||||
":aes_ctr_encryptor",
|
||||
"//chromium_deps/testing",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "crypto_util",
|
||||
srcs = ["crypto_util.cc"],
|
||||
hdrs = ["crypto_util.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//chromium_deps/base:glog",
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "crypto_util_test",
|
||||
size = "small",
|
||||
srcs = ["crypto_util_test.cc"],
|
||||
deps = [
|
||||
":crypto_util",
|
||||
"//chromium_deps/testing",
|
||||
"@abseil_repo//absl/strings",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "private_key_util",
|
||||
hdrs = ["private_key_util.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "rsa_util",
|
||||
srcs = ["rsa_util.cc"],
|
||||
hdrs = ["rsa_util.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":private_key_util",
|
||||
"//chromium_deps/base:glog",
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "rsa_util_test",
|
||||
size = "medium",
|
||||
timeout = "short",
|
||||
srcs = ["rsa_util_test.cc"],
|
||||
deps = [
|
||||
":rsa_test_keys",
|
||||
":rsa_util",
|
||||
"//chromium_deps/testing",
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "openssl_util",
|
||||
hdrs = ["openssl_util.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "random_util",
|
||||
srcs = ["random_util.cc"],
|
||||
hdrs = ["random_util.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//chromium_deps/base:glog",
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "random_util_test",
|
||||
size = "small",
|
||||
srcs = ["random_util_test.cc"],
|
||||
deps = [
|
||||
":random_util",
|
||||
"//chromium_deps/testing",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "rsa_key",
|
||||
srcs = ["rsa_key.cc"],
|
||||
hdrs = ["rsa_key.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":rsa_util",
|
||||
":sha_util",
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "rsa_key_test",
|
||||
size = "medium",
|
||||
timeout = "short",
|
||||
srcs = ["rsa_key_test.cc"],
|
||||
deps = [
|
||||
":rsa_key",
|
||||
":rsa_test_keys",
|
||||
":rsa_util",
|
||||
"//chromium_deps/testing",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "rsa_test_keys",
|
||||
testonly = 1,
|
||||
srcs = ["rsa_test_keys.cc"],
|
||||
hdrs = ["rsa_test_keys.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "sha_util",
|
||||
srcs = ["sha_util.cc"],
|
||||
hdrs = ["sha_util.h"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//chromium_deps/third_party/boringssl",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "sha_util_test",
|
||||
srcs = ["sha_util_test.cc"],
|
||||
deps = [
|
||||
":sha_util",
|
||||
"//chromium_deps/testing",
|
||||
"@abseil_repo//absl/strings",
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user