Add support for Widevine ECM v3

Widevine ECM v3 is redesigned mainly based on protobuf, and supports new features including carrying fingerprinting and service blocking information. Existing clients must upgrade the Widevine CAS plugin to use the new ECM v3.
This commit is contained in:
Lu Chen
2020-12-14 09:49:52 -08:00
parent ad81d517a5
commit 79e39b482d
46 changed files with 3096 additions and 1035 deletions

View File

@@ -16,7 +16,7 @@ filegroup(
name = "binary_release_files",
srcs = [
"certificate_type.h",
"default_device_security_profile_list.h",
"hash_algorithm.h",
"security_profile_list.h",
"status.h",
],
@@ -96,6 +96,11 @@ cc_library(
deps = [
":client_id_util",
":device_status_list",
":error_space",
":hash_algorithm",
":hash_algorithm_util",
":rsa_key",
":status",
"//base",
"//external:protobuf",
"@abseil_repo//absl/synchronization",
@@ -103,6 +108,8 @@ cc_library(
"//protos/public:device_certificate_status_cc_proto",
"//protos/public:device_common_cc_proto",
"//protos/public:device_security_profile_data_cc_proto",
"//protos/public:device_security_profile_list_cc_proto",
"//protos/public:errors_cc_proto",
"//protos/public:provisioned_device_info_cc_proto",
"//protos/public:security_profile_cc_proto",
],
@@ -114,47 +121,21 @@ cc_test(
srcs = ["security_profile_list_test.cc"],
deps = [
":client_id_util",
":error_space",
":hash_algorithm",
":hash_algorithm_util",
":rsa_key",
":rsa_test_keys",
":security_profile_list",
":status",
"//base",
"//external: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",
"//external: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",
"//external:protobuf",
"//testing:gunit_main",
"@abseil_repo//absl/memory",
"//protos/public:device_common_cc_proto",
"//protos/public:device_security_profile_list_cc_proto",
"//protos/public:errors_cc_proto",
"//protos/public:security_profile_cc_proto",
],
)
@@ -189,8 +170,6 @@ cc_library(
"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 = [
@@ -426,7 +405,6 @@ cc_library(
":sha_util",
"//base",
"@abseil_repo//absl/base:core_headers",
"@abseil_repo//absl/strings",
"//external:openssl",
],
)
@@ -494,7 +472,7 @@ cc_test(
"//base",
"//testing:gunit",
"//testing:gunit_main",
"@abseil_repo//absl/strings",
"//external:openssl",
],
)
@@ -871,6 +849,7 @@ cc_library(
"@abseil_repo//absl/base:core_headers",
"@abseil_repo//absl/strings",
"@abseil_repo//absl/synchronization",
"//external:openssl",
"//protos/public:client_identification_cc_proto",
"//protos/public:errors_cc_proto",
"//protos/public:remote_attestation_cc_proto",
@@ -944,11 +923,13 @@ cc_library(
srcs = ["x509_cert.cc"],
hdrs = ["x509_cert.h"],
deps = [
":ec_key",
":openssl_util",
":rsa_key",
":status",
"//base",
"@abseil_repo//absl/base:core_headers",
"@abseil_repo//absl/memory",
"@abseil_repo//absl/strings",
"@abseil_repo//absl/synchronization",
"//external:openssl",
@@ -973,6 +954,7 @@ cc_test(
srcs = ["x509_cert_test.cc"],
deps = [
":rsa_key",
":status",
":test_utils",
":x509_cert",
"//testing:gunit_main",
@@ -1174,6 +1156,16 @@ cc_library(
],
)
cc_library(
name = "raw_ec_key_util",
srcs = ["raw_ec_key_util.cc"],
hdrs = ["raw_ec_key_util.h"],
deps = [
":x509_cert",
"//base",
],
)
cc_test(
name = "hash_algorithm_util_test",
srcs = ["hash_algorithm_util_test.cc"],
@@ -1183,3 +1175,46 @@ cc_test(
"//testing:gunit_main",
],
)
cc_test(
name = "raw_ec_key_util_test",
srcs = ["raw_ec_key_util_test.cc"],
deps = [
":ec_key",
":ec_test_keys",
":raw_ec_key_util",
":rsa_test_keys",
":x509_test_certificates",
"//base",
"//testing:gunit_main",
"@abseil_repo//absl/strings",
],
)
cc_library(
name = "x509_test_certificates",
testonly = 1,
srcs = ["x509_test_certificates.cc"],
hdrs = ["x509_test_certificates.h"],
deps = [
"//base",
"@abseil_repo//absl/strings",
],
)
cc_test(
name = "remote_attestation_verifier_test",
srcs = ["remote_attestation_verifier_test.cc"],
deps = [
":drm_service_certificate",
":remote_attestation_verifier",
":status",
":x509_test_certificates",
"//testing:gunit_main",
"@abseil_repo//absl/memory",
"@abseil_repo//absl/strings",
"//protos/public:client_identification_cc_proto",
"//protos/public:errors_cc_proto",
"//protos/public:remote_attestation_cc_proto",
],
)