# Copyright 2020 Google LLC. All Rights Reserved. package(default_visibility = [ "//visibility:private", ]) cc_library( name = "aead_whitebox", srcs = [ "aead_whitebox_impl.cc", ], visibility = ["//visibility:public"], deps = [ ":memory_util", "//api:aead_whitebox", "//api:result", "//chromium_deps/third_party/boringssl", "//crypto_utils:crypto_util", ], ) cc_library( name = "license_whitebox", srcs = [ "license_whitebox_impl.cc", ], deps = [ ":memory_util", "//api:license_whitebox", "//api:result", "//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", "//external:odk", ], ) # Create a shared library of the whole api. The library will appear in the # target specific directory under "//bazel-bin". # # In order for this to work, the white-box source needs to be in `srcs`. If it # was included via `deps`, when the library is loaded, the symbols will be # missing. cc_binary( name = "whiteboxapi", srcs = [ "aead_whitebox_impl.cc", "license_whitebox_impl.cc", ], linkshared = True, deps = [ ":memory_util", "//api:aead_whitebox", "//api:license_whitebox", "//api:result", "//chromium_deps/cdm/keys:dev_certs", "//chromium_deps/cdm/protos:license_protocol_proto", "//chromium_deps/third_party/boringssl", "//crypto_utils:aes_cbc_decryptor", "//crypto_utils:aes_ctr_encryptor", "//crypto_utils:crypto_util", "//crypto_utils:rsa_key", "//external:odk", ], ) cc_library( name = "test_data", testonly = True, srcs = [ "test_data.cc", ], deps = [ "//api:test_data", "//crypto_utils:rsa_test_keys", ], ) cc_test( name = "aead_whitebox_test", size = "small", deps = [ ":aead_whitebox", ":test_data", "//api:aead_whitebox_test", ], ) cc_test( name = "aead_whitebox_benchmark", size = "small", deps = [ ":aead_whitebox", ":test_data", "//api:aead_whitebox_benchmark", ], ) cc_test( name = "license_whitebox_test", size = "small", deps = [ ":license_whitebox", ":test_data", "//api:license_whitebox_core_message_test", "//api:license_whitebox_test", ], ) cc_test( name = "license_whitebox_benchmark", size = "small", deps = [ ":license_whitebox", ":test_data", "//api:license_whitebox_benchmark", ], ) cc_library( name = "memory_util", srcs = ["memory_util.cc"], hdrs = ["memory_util.h"], )