Update to support OEMCrypto v16 with ODK

This commit is contained in:
KongQun Yang
2020-09-21 15:54:04 -07:00
parent 93265ab9d1
commit 69d813f0f1
203 changed files with 16337 additions and 2290 deletions

View File

@@ -6,100 +6,10 @@
# widevine-licensing@google.com.
################################################################################
#
# Description:
# Build file for CLIF wrappers of Widevine common modules.
package(default_visibility = ["//visibility:public"])
load("//devtools/clif/python:clif_build_rule.bzl", "py_clif_cc")
py_clif_cc(
name = "aes_cbc_util",
srcs = ["aes_cbc_util.clif"],
deps = [
"//common:aes_cbc_util",
],
)
py_clif_cc(
name = "certificate_type",
filegroup(
name = "provisioning_sdk_binary_release_files",
srcs = ["certificate_type.clif"],
deps = [
"//common:certificate_type",
],
)
py_clif_cc(
name = "crypto_util",
srcs = ["crypto_util.clif"],
deps = [
"//common:crypto_util",
],
)
py_clif_cc(
name = "drm_root_certificate",
srcs = ["drm_root_certificate.clif"],
clif_deps = [
":certificate_type",
],
pyclif_deps = [
"//protos/public:drm_certificate_pyclif",
"//protos/public:signed_drm_certificate_pyclif",
],
deps = [
"//util/task/python:status_clif",
"//common:drm_root_certificate",
],
)
py_clif_cc(
name = "rsa_test_keys",
testonly = 1,
srcs = ["rsa_test_keys.clif"],
deps = [
"//common:rsa_test_keys",
],
)
py_clif_cc(
name = "rsa_key",
srcs = ["rsa_key.clif"],
deps = [
"//common:rsa_key",
],
)
py_clif_cc(
name = "drm_service_certificate",
srcs = ["drm_service_certificate.clif"],
clif_deps = [
":certificate_type",
":drm_root_certificate",
],
deps = [
"//util/task/python:status_clif",
"//common:drm_service_certificate",
],
)
py_clif_cc(
name = "signing_key_util",
srcs = ["signing_key_util.clif"],
pyclif_deps = [
"//protos/public:license_protocol_pyclif",
],
deps = [
"//common:signing_key_util",
],
)
py_clif_cc(
name = "test_drm_certificates",
testonly = 1,
srcs = ["test_drm_certificates.clif"],
deps = [
"//common:test_drm_certificates",
],
)

View File

@@ -1,23 +0,0 @@
################################################################################
# Copyright 2018 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.
################################################################################
from "util/task/python/clif.h" import *
from "common/python/certificate_type.h" import *
from "protos/public/drm_certificate_pyclif.h" import *
from "protos/public/signed_drm_certificate_pyclif.h" import *
from "common/drm_root_certificate.h":
namespace `widevine`:
class DrmRootCertificate:
def VerifyCertificate(self,
serialized_certificate: bytes) -> (status: Status,
signed_certificate: SignedDrmCertificate,
certificate: DrmCertificate)
staticmethods from `DrmRootCertificate`:
def CreateByType(cert_type: CertificateType) -> (new_root_cert: DrmRootCertificate,
status: Status)

View File

@@ -0,0 +1,11 @@
################################################################################
# Copyright 2020 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.
################################################################################
from "common/hash_algorithm.h":
namespace `widevine`:
enum HashAlgorithm

View File

@@ -0,0 +1,16 @@
################################################################################
# Copyright 2020 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.
################################################################################
from "common/python/hash_algorithm.h" import *
from "protos/public/hash_algorithm_pyclif.h" import *
from "common/hash_algorithm_util.h":
namespace `widevine`:
def HashAlgorithmProtoToEnum(
hash_algorithm_proto: HashAlgorithmProto
) -> HashAlgorithm

View File

@@ -6,10 +6,12 @@
# widevine-licensing@google.com.
################################################################################
from "common/python/hash_algorithm.h" import *
from "common/rsa_key.h":
namespace `widevine`:
class RsaPublicKey:
def VerifySignature(self, message: bytes, signature: bytes) -> bool
def VerifySignature(self, message: bytes, hash_algorithm: HashAlgorithm, signature: bytes) -> bool
staticmethods from `RsaPublicKey`:
def Create(serialized_key: bytes) -> RsaPublicKey

View File

@@ -12,4 +12,4 @@ from "common/test_drm_certificates.h":
def test_root_certificate(self) -> bytes
def test_intermediate_certificate(self) -> bytes
def test_user_device_certificate(self) -> bytes
def test_service_certificate(self) -> bytes
def test_service_certificate_no_type(self) -> bytes