1186 lines
27 KiB
Python
1186 lines
27 KiB
Python
################################################################################
|
|
# 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.
|
|
|
|
package(
|
|
default_visibility = ["//visibility:public"],
|
|
)
|
|
|
|
filegroup(
|
|
name = "binary_release_files",
|
|
srcs = [
|
|
"certificate_type.h",
|
|
"default_device_security_profile_list.h",
|
|
"security_profile_list.h",
|
|
"status.h",
|
|
],
|
|
)
|
|
|
|
filegroup(
|
|
name = "provisioning_sdk_binary_release_files",
|
|
srcs = [
|
|
"certificate_type.h",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "playready_interface",
|
|
hdrs = ["playready_interface.h"],
|
|
deps = [
|
|
"//util:error_space",
|
|
"//protos/public:license_protocol_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "playready_sdk_impl",
|
|
hdrs = ["playready_sdk_impl.h"],
|
|
deps = [
|
|
":playready_interface",
|
|
"//protos/public:license_protocol_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "content_id_util",
|
|
srcs = ["content_id_util.cc"],
|
|
hdrs = ["content_id_util.h"],
|
|
deps = [
|
|
":error_space",
|
|
":status",
|
|
"//base",
|
|
"//license_server_sdk/internal:sdk",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:external_license_cc_proto",
|
|
"//protos/public:license_protocol_cc_proto",
|
|
"//protos/public:license_server_sdk_cc_proto",
|
|
"//protos/public:widevine_pssh_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "content_id_util_test",
|
|
srcs = ["content_id_util_test.cc"],
|
|
deps = [
|
|
":content_id_util",
|
|
"//testing:gunit_main",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:external_license_cc_proto",
|
|
"//protos/public:license_protocol_cc_proto",
|
|
"//protos/public:widevine_pssh_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "widevine_system_id",
|
|
srcs = ["widevine_system_id.cc"],
|
|
hdrs = ["widevine_system_id.h"],
|
|
deps = ["//base"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "certificate_type",
|
|
hdrs = ["certificate_type.h"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "security_profile_list",
|
|
srcs = ["security_profile_list.cc"],
|
|
hdrs = ["security_profile_list.h"],
|
|
deps = [
|
|
":client_id_util",
|
|
":device_status_list",
|
|
"//base",
|
|
"@com_google_protobuf//:protobuf",
|
|
"@abseil_repo//absl/synchronization",
|
|
"//protos/public:client_identification_cc_proto",
|
|
"//protos/public:device_certificate_status_cc_proto",
|
|
"//protos/public:device_common_cc_proto",
|
|
"//protos/public:device_security_profile_data_cc_proto",
|
|
"//protos/public:provisioned_device_info_cc_proto",
|
|
"//protos/public:security_profile_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "security_profile_list_test",
|
|
timeout = "short",
|
|
srcs = ["security_profile_list_test.cc"],
|
|
deps = [
|
|
":client_id_util",
|
|
":security_profile_list",
|
|
"//base",
|
|
"@com_google_protobuf//:protobuf",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/memory",
|
|
"//protos/public:device_common_cc_proto",
|
|
"//protos/public:device_security_profile_data_cc_proto",
|
|
"//protos/public:security_profile_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "default_device_security_profile_list",
|
|
srcs = ["default_device_security_profile_list.cc"],
|
|
hdrs = ["default_device_security_profile_list.h"],
|
|
deps = [
|
|
":client_id_util",
|
|
":device_status_list",
|
|
":security_profile_list",
|
|
"//base",
|
|
"@com_google_protobuf//:protobuf",
|
|
"//protos/public:client_identification_cc_proto",
|
|
"//protos/public:device_certificate_status_cc_proto",
|
|
"//protos/public:device_common_cc_proto",
|
|
"//protos/public:provisioned_device_info_cc_proto",
|
|
"//protos/public:security_profile_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "default_device_security_profile_list_test",
|
|
timeout = "short",
|
|
srcs = ["default_device_security_profile_list_test.cc"],
|
|
deps = [
|
|
":client_id_util",
|
|
":default_device_security_profile_list",
|
|
"//base",
|
|
"@com_google_protobuf//:protobuf",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/memory",
|
|
"//protos/public:device_common_cc_proto",
|
|
"//protos/public:security_profile_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "status",
|
|
srcs = ["status.cc"],
|
|
hdrs = ["status.h"],
|
|
copts = ["-fvisibility=default"],
|
|
deps = [
|
|
"@abseil_repo//absl/base:core_headers",
|
|
"@abseil_repo//absl/strings",
|
|
"//util:error_space",
|
|
],
|
|
# Make sure SDKs links in symbols defined in this
|
|
# target.
|
|
alwayslink = 1,
|
|
)
|
|
|
|
cc_test(
|
|
name = "status_test",
|
|
srcs = ["status_test.cc"],
|
|
deps = [
|
|
":status",
|
|
"//testing:gunit_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "client_cert",
|
|
srcs = [
|
|
"certificate_client_cert.cc",
|
|
"certificate_client_cert.h",
|
|
"client_cert.cc",
|
|
"dual_certificate_client_cert.cc",
|
|
"dual_certificate_client_cert.h",
|
|
"keybox_client_cert.cc",
|
|
],
|
|
hdrs = [
|
|
"client_cert.h",
|
|
"keybox_client_cert.h",
|
|
],
|
|
deps = [
|
|
":crypto_util",
|
|
":drm_root_certificate",
|
|
":ec_key",
|
|
":ec_util",
|
|
":error_space",
|
|
":hash_algorithm",
|
|
":openssl_util",
|
|
":random_util",
|
|
":rsa_key",
|
|
":sha_util",
|
|
":signing_key_util",
|
|
":status",
|
|
":wvm_token_handler",
|
|
"//base",
|
|
"@abseil_repo//absl/memory",
|
|
"@abseil_repo//absl/strings",
|
|
"//protos/public:client_identification_cc_proto",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:license_protocol_cc_proto",
|
|
"//protos/public:signed_drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "client_cert_test",
|
|
srcs = ["client_cert_test.cc"],
|
|
deps = [
|
|
":client_cert",
|
|
":ec_key",
|
|
":ec_test_keys",
|
|
":error_space",
|
|
":hash_algorithm",
|
|
":hash_algorithm_util",
|
|
":rsa_key",
|
|
":rsa_test_keys",
|
|
":sha_util",
|
|
":status",
|
|
":test_drm_certificates",
|
|
":wvm_test_keys",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:signed_drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "device_status_list",
|
|
srcs = ["device_status_list.cc"],
|
|
hdrs = ["device_status_list.h"],
|
|
deps = [
|
|
":client_cert",
|
|
":drm_service_certificate",
|
|
":error_space",
|
|
":hash_algorithm",
|
|
":hash_algorithm_util",
|
|
":rsa_key",
|
|
":status",
|
|
"//base",
|
|
"@abseil_repo//absl/strings",
|
|
"@abseil_repo//absl/synchronization",
|
|
"//util/gtl:map_util",
|
|
"//protos/public:client_identification_cc_proto",
|
|
"//protos/public:device_certificate_status_cc_proto",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:provisioned_device_info_cc_proto",
|
|
"//protos/public:signed_device_info_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "device_info_util",
|
|
srcs = ["device_info_util.cc"],
|
|
hdrs = ["device_info_util.h"],
|
|
deps = [
|
|
"@abseil_repo//absl/strings",
|
|
"//protos/public:device_common_cc_proto",
|
|
"//protos/public:provisioned_device_info_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "device_status_list_test",
|
|
timeout = "short",
|
|
srcs = ["device_status_list_test.cc"],
|
|
deps = [
|
|
":client_cert",
|
|
":device_status_list",
|
|
":hash_algorithm",
|
|
":hash_algorithm_util",
|
|
":rsa_key",
|
|
":rsa_test_keys",
|
|
":status",
|
|
"//base",
|
|
"@com_google_protobuf//:protobuf",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
"//protos/public:client_identification_cc_proto",
|
|
"//protos/public:device_certificate_status_cc_proto",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:provisioned_device_info_cc_proto",
|
|
"//protos/public:signed_device_info_cc_proto",
|
|
"//protos/public:signed_drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "drm_root_certificate",
|
|
srcs = ["drm_root_certificate.cc"],
|
|
hdrs = ["drm_root_certificate.h"],
|
|
deps = [
|
|
":certificate_type",
|
|
":ec_key",
|
|
":error_space",
|
|
":hash_algorithm",
|
|
":hash_algorithm_util",
|
|
":rsa_key",
|
|
":sha_util",
|
|
":signer_public_key",
|
|
":status",
|
|
"//base",
|
|
"@abseil_repo//absl/memory",
|
|
"@abseil_repo//absl/strings",
|
|
"@abseil_repo//absl/synchronization",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:signed_drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "drm_root_certificate_test",
|
|
timeout = "short",
|
|
srcs = ["drm_root_certificate_test.cc"],
|
|
deps = [
|
|
":drm_root_certificate",
|
|
":ec_key",
|
|
":ec_test_keys",
|
|
":error_space",
|
|
":hash_algorithm",
|
|
":hash_algorithm_util",
|
|
":rsa_key",
|
|
":rsa_test_keys",
|
|
":test_drm_certificates",
|
|
"//base",
|
|
"@com_google_protobuf//:protobuf",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/memory",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:signed_drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "client_id_util",
|
|
srcs = ["client_id_util.cc"],
|
|
hdrs = ["client_id_util.h"],
|
|
deps = [
|
|
":aes_cbc_util",
|
|
":client_cert",
|
|
":drm_service_certificate",
|
|
":error_space",
|
|
":status",
|
|
"//base",
|
|
"@abseil_repo//absl/strings",
|
|
"//protos/public:client_identification_cc_proto",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:signed_drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "private_key_util",
|
|
hdrs = ["private_key_util.h"],
|
|
deps = [
|
|
"//base",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "rsa_util",
|
|
srcs = ["rsa_util.cc"],
|
|
hdrs = ["rsa_util.h"],
|
|
deps = [
|
|
":private_key_util",
|
|
"//base",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "rsa_util_test",
|
|
size = "medium",
|
|
timeout = "short",
|
|
srcs = ["rsa_util_test.cc"],
|
|
deps = [
|
|
":rsa_test_keys",
|
|
":rsa_util",
|
|
"//base",
|
|
"//testing:gunit",
|
|
"//testing:gunit_main",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "openssl_util",
|
|
hdrs = ["openssl_util.h"],
|
|
deps = [
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "rsa_key",
|
|
srcs = ["rsa_key.cc"],
|
|
hdrs = ["rsa_key.h"],
|
|
deps = [
|
|
":hash_algorithm",
|
|
":rsa_util",
|
|
":sha_util",
|
|
"//base",
|
|
"@abseil_repo//absl/base:core_headers",
|
|
"@abseil_repo//absl/strings",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "rsa_key_test",
|
|
size = "medium",
|
|
timeout = "short",
|
|
srcs = ["rsa_key_test.cc"],
|
|
deps = [
|
|
":hash_algorithm",
|
|
":rsa_key",
|
|
":rsa_test_keys",
|
|
":rsa_util",
|
|
"//testing:gunit",
|
|
"//testing:gunit_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "rsa_test_keys",
|
|
testonly = 1,
|
|
srcs = ["rsa_test_keys.cc"],
|
|
hdrs = ["rsa_test_keys.h"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "mock_rsa_key",
|
|
testonly = 1,
|
|
hdrs = ["mock_rsa_key.h"],
|
|
deps = [
|
|
":hash_algorithm",
|
|
":rsa_key",
|
|
"//testing:gunit",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "ec_util",
|
|
srcs = ["ec_util.cc"],
|
|
hdrs = [
|
|
"ec_key.h",
|
|
"ec_util.h",
|
|
],
|
|
deps = [
|
|
":hash_algorithm",
|
|
":openssl_util",
|
|
":private_key_util",
|
|
"//base",
|
|
"@abseil_repo//absl/base:core_headers",
|
|
"@abseil_repo//absl/memory",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "ec_util_test",
|
|
size = "medium",
|
|
timeout = "short",
|
|
srcs = ["ec_util_test.cc"],
|
|
deps = [
|
|
":ec_test_keys",
|
|
":ec_util",
|
|
":openssl_util",
|
|
"//base",
|
|
"//testing:gunit",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "ec_key",
|
|
srcs = ["ec_key.cc"],
|
|
hdrs = ["ec_key.h"],
|
|
deps = [
|
|
":aes_cbc_util",
|
|
":ec_util",
|
|
":hash_algorithm",
|
|
":openssl_util",
|
|
":sha_util",
|
|
"//base",
|
|
"@abseil_repo//absl/base:core_headers",
|
|
"@abseil_repo//absl/memory",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "ec_key_test",
|
|
size = "medium",
|
|
timeout = "short",
|
|
srcs = ["ec_key_test.cc"],
|
|
deps = [
|
|
":ec_key",
|
|
":ec_test_keys",
|
|
":ec_util",
|
|
":hash_algorithm",
|
|
":random_util",
|
|
"//testing:gunit",
|
|
"//testing:gunit_main",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "ec_key_source",
|
|
hdrs = ["ec_key_source.h"],
|
|
deps = [
|
|
":ec_key",
|
|
"//base",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "local_ec_key_source",
|
|
srcs = ["local_ec_key_source.cc"],
|
|
hdrs = [
|
|
"local_ec_key_source.h",
|
|
],
|
|
deps = [
|
|
":ec_key",
|
|
":ec_key_source",
|
|
":ec_util",
|
|
"//base",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "local_ec_key_source_test",
|
|
size = "medium",
|
|
timeout = "short",
|
|
srcs = ["local_ec_key_source_test.cc"],
|
|
deps = [
|
|
":ec_key",
|
|
":ec_test_keys",
|
|
":ec_util",
|
|
":local_ec_key_source",
|
|
":random_util",
|
|
"//testing:gunit",
|
|
"//testing:gunit_main",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "fake_ec_key_source",
|
|
testonly = 1,
|
|
srcs = ["fake_ec_key_source.cc"],
|
|
hdrs = ["fake_ec_key_source.h"],
|
|
deps = [
|
|
":ec_key",
|
|
":ec_key_source",
|
|
":ec_test_keys",
|
|
"//base",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "ecies_crypto",
|
|
srcs = ["ecies_crypto.cc"],
|
|
hdrs = ["ecies_crypto.h"],
|
|
deps = [
|
|
":aes_cbc_util",
|
|
":crypto_util",
|
|
":ec_key",
|
|
":ec_key_source",
|
|
":ec_util",
|
|
":openssl_util",
|
|
":status",
|
|
"//base",
|
|
"@abseil_repo//absl/memory",
|
|
"@abseil_repo//absl/strings",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "ecies_crypto_test",
|
|
size = "medium",
|
|
timeout = "short",
|
|
srcs = ["ecies_crypto_test.cc"],
|
|
deps = [
|
|
":ec_key",
|
|
":ec_key_source",
|
|
":ec_test_keys",
|
|
":ec_util",
|
|
":ecies_crypto",
|
|
":fake_ec_key_source",
|
|
"//testing:gunit",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "ec_test_keys",
|
|
testonly = 1,
|
|
srcs = ["ec_test_keys.cc"],
|
|
hdrs = ["ec_test_keys.h"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "aes_cbc_util",
|
|
srcs = ["aes_cbc_util.cc"],
|
|
hdrs = ["aes_cbc_util.h"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//base",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "aes_cbc_util_test",
|
|
srcs = ["aes_cbc_util_test.cc"],
|
|
deps = [
|
|
":aes_cbc_util",
|
|
"//testing:gunit_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "crypto_util",
|
|
srcs = ["crypto_util.cc"],
|
|
hdrs = ["crypto_util.h"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//base",
|
|
"@abseil_repo//absl/strings",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "crypto_util_test",
|
|
size = "medium",
|
|
srcs = ["crypto_util_test.cc"],
|
|
deps = [
|
|
":crypto_util",
|
|
"//testing:gunit",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "ecb_util",
|
|
srcs = ["ecb_util.cc"],
|
|
hdrs = ["ecb_util.h"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//base",
|
|
"@abseil_repo//absl/strings",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "ecb_util_test",
|
|
size = "small",
|
|
srcs = ["ecb_util_test.cc"],
|
|
deps = [
|
|
":ecb_util",
|
|
"//testing:gunit",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "file_util",
|
|
srcs = ["file_util.cc"],
|
|
hdrs = ["file_util.h"],
|
|
deps = [
|
|
"//base",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "file_util_test",
|
|
srcs = ["file_util_test.cc"],
|
|
deps = [
|
|
":file_util",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "random_util",
|
|
srcs = ["random_util.cc"],
|
|
hdrs = ["random_util.h"],
|
|
deps = [
|
|
"//base",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "random_util_test",
|
|
srcs = ["random_util_test.cc"],
|
|
deps = [
|
|
":random_util",
|
|
"//testing:gunit_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "sha_util",
|
|
srcs = ["sha_util.cc"],
|
|
hdrs = ["sha_util.h"],
|
|
deps = [
|
|
"//base",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "sha_util_test",
|
|
srcs = ["sha_util_test.cc"],
|
|
deps = [
|
|
":sha_util",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "signature_util",
|
|
srcs = ["signature_util.cc"],
|
|
hdrs = ["signature_util.h"],
|
|
deps = [
|
|
":aes_cbc_util",
|
|
":hash_algorithm",
|
|
":rsa_key",
|
|
":sha_util",
|
|
":status",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "signing_key_util",
|
|
srcs = ["signing_key_util.cc"],
|
|
hdrs = ["signing_key_util.h"],
|
|
deps = [
|
|
":crypto_util",
|
|
"//base",
|
|
"//protos/public:license_protocol_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "signing_key_util_test",
|
|
size = "small",
|
|
srcs = ["signing_key_util_test.cc"],
|
|
deps = [
|
|
":crypto_util",
|
|
":signing_key_util",
|
|
"//testing:gunit",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
"//protos/public:license_protocol_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "test_drm_certificates",
|
|
testonly = 1,
|
|
srcs = ["test_drm_certificates.cc"],
|
|
hdrs = ["test_drm_certificates.h"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "wvm_token_handler",
|
|
srcs = ["wvm_token_handler.cc"],
|
|
hdrs = ["wvm_token_handler.h"],
|
|
deps = [
|
|
":aes_cbc_util",
|
|
":ecb_util",
|
|
":sha_util",
|
|
":status",
|
|
"//base",
|
|
"@abseil_repo//absl/strings",
|
|
"@abseil_repo//absl/synchronization",
|
|
"//util/endian",
|
|
"//util/gtl:map_util",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "wvm_token_handler_test",
|
|
size = "small",
|
|
srcs = ["wvm_token_handler_test.cc"],
|
|
deps = [
|
|
":wvm_test_keys",
|
|
":wvm_token_handler",
|
|
"//testing:gunit",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "wvm_test_keys",
|
|
testonly = 1,
|
|
srcs = ["wvm_test_keys.cc"],
|
|
hdrs = ["wvm_test_keys.h"],
|
|
deps = [
|
|
":wvm_token_handler",
|
|
"//base",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "error_space",
|
|
srcs = ["error_space.cc"],
|
|
hdrs = ["error_space.h"],
|
|
deps = [
|
|
"//util:error_space",
|
|
"//util:proto_status",
|
|
"//protos/public:errors_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "remote_attestation_verifier",
|
|
srcs = ["remote_attestation_verifier.cc"],
|
|
hdrs = ["remote_attestation_verifier.h"],
|
|
deps = [
|
|
":client_id_util",
|
|
":drm_service_certificate",
|
|
":error_space",
|
|
":rsa_key",
|
|
":status",
|
|
":x509_cert",
|
|
"//base",
|
|
"@abseil_repo//absl/base:core_headers",
|
|
"@abseil_repo//absl/strings",
|
|
"@abseil_repo//absl/synchronization",
|
|
"//protos/public:client_identification_cc_proto",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:remote_attestation_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "drm_service_certificate",
|
|
srcs = ["drm_service_certificate.cc"],
|
|
hdrs = ["drm_service_certificate.h"],
|
|
deps = [
|
|
":aes_cbc_util",
|
|
":certificate_type",
|
|
":drm_root_certificate",
|
|
":error_space",
|
|
":rsa_key",
|
|
":rsa_util",
|
|
":status",
|
|
"//base",
|
|
"@abseil_repo//absl/base:core_headers",
|
|
"@abseil_repo//absl/strings",
|
|
"@abseil_repo//absl/synchronization",
|
|
"//util/gtl:map_util",
|
|
"//protos/public:client_identification_cc_proto",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:external_license_cc_proto",
|
|
"//protos/public:signed_drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "drm_service_certificate_test",
|
|
timeout = "short",
|
|
srcs = ["drm_service_certificate_test.cc"],
|
|
deps = [
|
|
":aes_cbc_util",
|
|
":drm_root_certificate",
|
|
":drm_service_certificate",
|
|
":hash_algorithm_util",
|
|
":rsa_key",
|
|
":rsa_test_keys",
|
|
":rsa_util",
|
|
":test_drm_certificates",
|
|
"//base",
|
|
"@com_google_protobuf//:protobuf",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
"//protos/public:client_identification_cc_proto",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:external_license_cc_proto",
|
|
"//protos/public:license_server_sdk_cc_proto",
|
|
"//protos/public:signed_drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "verified_media_pipeline",
|
|
srcs = ["verified_media_pipeline.cc"],
|
|
hdrs = ["verified_media_pipeline.h"],
|
|
deps = [
|
|
":status",
|
|
":vmp_checker",
|
|
"//protos/public:license_protocol_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "x509_cert",
|
|
srcs = ["x509_cert.cc"],
|
|
hdrs = ["x509_cert.h"],
|
|
deps = [
|
|
":openssl_util",
|
|
":rsa_key",
|
|
":status",
|
|
"//base",
|
|
"@abseil_repo//absl/base:core_headers",
|
|
"@abseil_repo//absl/strings",
|
|
"@abseil_repo//absl/synchronization",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "test_utils",
|
|
testonly = 1,
|
|
srcs = ["test_utils.cc"],
|
|
hdrs = ["test_utils.h"],
|
|
deps = [
|
|
":status",
|
|
"//base",
|
|
"//external:openssl",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "x509_cert_test",
|
|
timeout = "short",
|
|
srcs = ["x509_cert_test.cc"],
|
|
deps = [
|
|
":rsa_key",
|
|
":test_utils",
|
|
":x509_cert",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "vmp_checker",
|
|
srcs = ["vmp_checker.cc"],
|
|
hdrs = ["vmp_checker.h"],
|
|
deps = [
|
|
":certificate_type",
|
|
":error_space",
|
|
":hash_algorithm_util",
|
|
":rsa_key",
|
|
":status",
|
|
":x509_cert",
|
|
"//base",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:verified_media_pipeline_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "vmp_checker_test",
|
|
timeout = "short",
|
|
srcs = ["vmp_checker_test.cc"],
|
|
deps = [
|
|
":hash_algorithm_util",
|
|
":rsa_key",
|
|
":vmp_checker",
|
|
"//base",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
"//protos/public:errors_cc_proto",
|
|
"//protos/public:verified_media_pipeline_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "string_util",
|
|
srcs = ["string_util.cc"],
|
|
hdrs = ["string_util.h"],
|
|
deps = [":status"],
|
|
)
|
|
|
|
cc_test(
|
|
name = "string_util_test",
|
|
srcs = ["string_util_test.cc"],
|
|
deps = [
|
|
":string_util",
|
|
"//testing:gunit_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "output_protection_util",
|
|
srcs = ["output_protection_util.cc"],
|
|
hdrs = ["output_protection_util.h"],
|
|
deps = [
|
|
":status",
|
|
"//protos/public:client_identification_cc_proto",
|
|
"//protos/public:license_protocol_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "output_protection_util_test",
|
|
srcs = ["output_protection_util_test.cc"],
|
|
deps = [
|
|
":output_protection_util",
|
|
"//testing:gunit_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "rot_id_util",
|
|
srcs = ["rot_id_util.cc"],
|
|
hdrs = ["rot_id_util.h"],
|
|
deps = [
|
|
":crypto_util",
|
|
":ec_key",
|
|
":local_ec_key_source",
|
|
":sha_util",
|
|
"//base",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "rot_id_util_test",
|
|
srcs = ["rot_id_util_test.cc"],
|
|
deps = [
|
|
":rot_id_util",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "rot_id_generator",
|
|
srcs = ["rot_id_generator.cc"],
|
|
hdrs = ["rot_id_generator.h"],
|
|
deps = [
|
|
":crypto_util",
|
|
":ec_key",
|
|
":ecies_crypto",
|
|
":rot_id_util",
|
|
":sha_util",
|
|
":status",
|
|
"//base",
|
|
"@abseil_repo//absl/strings",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "rot_id_generator_test",
|
|
srcs = ["rot_id_generator_test.cc"],
|
|
deps = [
|
|
":ec_key",
|
|
":ec_test_keys",
|
|
":ecies_crypto",
|
|
":fake_ec_key_source",
|
|
":rot_id_generator",
|
|
":rot_id_util",
|
|
":status",
|
|
"@com_google_protobuf//:protobuf",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "signer_public_key",
|
|
srcs = ["signer_public_key.cc"],
|
|
hdrs = ["signer_public_key.h"],
|
|
deps = [
|
|
":ec_key",
|
|
":hash_algorithm",
|
|
":rsa_key",
|
|
"@abseil_repo//absl/memory",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "signer_public_key_test",
|
|
srcs = ["signer_public_key_test.cc"],
|
|
deps = [
|
|
":ec_key",
|
|
":ec_test_keys",
|
|
":hash_algorithm",
|
|
":rsa_key",
|
|
":rsa_test_keys",
|
|
":signer_public_key",
|
|
"//testing:gunit_main",
|
|
"//protos/public:drm_certificate_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "core_message_util",
|
|
srcs = ["core_message_util.cc"],
|
|
hdrs = ["core_message_util.h"],
|
|
deps = [
|
|
":sha_util",
|
|
"//base",
|
|
"@abseil_repo//absl/strings",
|
|
"//common/oemcrypto_core_message/odk:kdo",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "core_message_util_test",
|
|
srcs = ["core_message_util_test.cc"],
|
|
deps = [
|
|
":core_message_util",
|
|
"//testing:gunit_main",
|
|
"@abseil_repo//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "hash_algorithm",
|
|
hdrs = ["hash_algorithm.h"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "hash_algorithm_util",
|
|
srcs = ["hash_algorithm_util.cc"],
|
|
hdrs = ["hash_algorithm_util.h"],
|
|
deps = [
|
|
":hash_algorithm",
|
|
"//base",
|
|
"//protos/public:hash_algorithm_cc_proto",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "hash_algorithm_util_test",
|
|
srcs = ["hash_algorithm_util_test.cc"],
|
|
deps = [
|
|
":hash_algorithm",
|
|
":hash_algorithm_util",
|
|
"//testing:gunit_main",
|
|
],
|
|
)
|