Source release 17.1.1

This commit is contained in:
John "Juce" Bruce
2022-11-29 12:54:04 -08:00
parent 694cf6fb25
commit f11df1e144
139 changed files with 11266 additions and 771 deletions

View File

@@ -0,0 +1,53 @@
# Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
# source code may only be used and distributed under the Widevine License
# Agreement.
# GYP supports the following environment variables to control the paths to the
# toolchain:
#
# * CC - The C compiler
# * CXX - The C++ compiler
# * AR - The archive tool
# * NM - The symbol name tool
# * READELF - The ELF metadata tool
#
# If any are not specified, they default to the system's installed copy of that
# tool.
#
# Note that overriding the linker is NOT supported. The C or C++ compiler will
# always be used as a front-end to the linker.
#
# Any of these may have "_host" or "_target" appended to indicate that they
# should only be used when compiling for the host or for the target when
# cross-compiling. If GYP is cross-compiling and a specific "_host" or "_target"
# tool is not found, it will fall back to the normal tool. e.g. If there is no
# "CC_host", host builds will use "CC".
#
# It is recommended to always set GYP_CROSSCOMPILE to 1 when cross-compiling.
# |export_variables| is a dictionary containing the variables to set. Relative
# paths are interpreted as being relative to this file.
export_variables = {
# Although we aren't actually cross-compiling in this build, settings.gypi
# relies on the cross-compiler's separation of host and target build
# artifacts. By setting this variable, we force GYP to use cross-compilation
# mode even though both modes use the same compiler binary.
'GYP_CROSSCOMPILE': '1',
# Typically, you will want to set these to the paths to your system's
# toolchain. but for this example, we'll just use the system install of GCC.
'CC': 'gcc',
'CXX': 'g++',
'AR': 'ar',
# Alternatively, here's how you could use the GCC as the "host" toolchain and
# Clang as the "target" toolchain:
# 'CC_target': 'clang',
# 'CXX_target': 'clang++',
# 'AR_target': 'llvm-ar',
#
# 'CC_host': 'gcc',
# 'CXX_host': 'g++',
# 'AR_host': 'ar',
}

View File

@@ -0,0 +1,28 @@
// Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine License
// Agreement.
#include "read_client_info.h"
namespace widevine {
bool ReadClientInformation(std::string* company_name, std::string* model_name,
std::string* model_year, std::string* product_name,
std::string* device_name, std::string* arch_name,
std::string* platform, std::string* form_factor,
std::string* version) {
// A real implementation would read these fields from a file or system API,
// but for this example implementation, hardcoded values are fine.
*company_name = "KubrickTech";
*model_name = "HAL 9000 with runtime client info";
*model_year = "2001";
*product_name = "clarke";
*device_name = "HAL";
*arch_name = "ARMv7";
*platform = "Linux";
*form_factor = "TV";
*version = "1.0.0";
return true;
}
} // namespace widevine

View File

@@ -0,0 +1,13 @@
# Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
# source code may only be used and distributed under the Widevine License
# Agreement.
{
'targets': [
{
'target_name': 'read_client_info',
'type': 'static_library',
'include_dirs': ['../../cdm/include'],
'sources': ['read_client_info.cpp'],
},
],
}

View File

@@ -0,0 +1,122 @@
# Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
# source code may only be used and distributed under the Widevine License
# Agreement.
{
# Here you can override global gyp variables with platform-specific values.
# See cdm/platform_properties.gyp for a complete list of settings you can
# override.
'variables': {
'oemcrypto_lib': 'target',
'oemcrypto_gyp_path': '../example/oemcrypto.gyp:oemcrypto',
'client_info_source': 'runtime',
'read_client_info_path': 'read_client_info.gyp:read_client_info',
'asm_target_arch': 'x86-64',
}, # end variables
# Here you can set platform-specific compiler settings.
'target_defaults': {
# These are flags passed to the compiler for all C & C++ files.
'cflags': [
'-fPIC',
'-fvisibility=hidden',
'-fno-common',
'-Wno-error',
# This flag is not supported on GCC, but Widevine strongly encourages
# using it if you are building with Clang.
# '-ftrivial-auto-var-init=pattern',
],
# These are flags passed to the compiler for plain C only.
'cflags_c': [
# Compile using the C11 standard with POSIX extensions
'-std=c11',
'-D_POSIX_C_SOURCE=200809L',
],
# These are flags passed to the compiler for C++ only.
'cflags_cc': [
# Compile using the C++11 standard.
'-std=c++11',
# CE CDM does not use exceptions or RTTI.
'-fno-exceptions',
'-fno-rtti',
],
# These are flags passed to the linker.
'ldflags': [
#'-static-libstdc++',
],
# These are macros set by the compiler.
'defines': [
#'EXAMPLE_MACRO_WITH_NO_VALUE',
#'EXAMPLE_KEY=EXAMPLE_VALUE',
],
# These are additional include paths to search for headers.
'include_dirs': [
#'/toolchain/include',
],
'target_conditions': [
# Most of the build output is compiled for the target device, but the
# build may also sometimes compile files for the host device. For
# instance, if you compile Protobuf from source, the "protoc" compiler
# will be compiled for your host machine and used as part of the build
# process.
#
# These conditional blocks let you set compiler flags and other settings
# that should only apply on the target or host platforms.
['_toolset == "target"', {
# These are additional settings specifically for the target toolchain.
'cflags': [],
'cflags_c': [],
'cflags_cc': [],
'ldflags': [],
'defines': [],
'include_dirs': [],
}], # end _toolset == "target"
['_toolset == "host"', {
# These are additional settings specifically for the host toolchain.
'cflags': [],
'cflags_c': [],
'cflags_cc': [],
'ldflags': [],
'defines': [],
'include_dirs': [],
}], # end _toolset == "host"
], # end target_conditions
'configurations': {
# These are additional settings per build configuration.
# You may specify any of the keys above in this section
# (cflags, cflags_c, cflags_cc, ldflags, defines, include_dirs).
#
# You are also not limited to the names "debug" and "release". You may use
# any names you like. The configuration will be used if you pass its name
# to build.py's "--config" or "-c" flag. However, "debug" and "release"
# have convenient shorthand flags. ("--debug"/"-d" and "--release"/"-r")
'debug': {
'cflags': [
'-g3',
'-Og',
],
'defines': [
# Widevine strongly recommends defining _DEBUG on debug builds
'_DEBUG',
'_GLIBCXX_DEBUG',
],
},
'release': {
'cflags': [
'-O2',
'-g0',
],
'defines': [
# Widevine strongly recommends defining NDEBUG on release builds
'NDEBUG',
],
'ldflags': [
'-flto',
'-s',
],
},
}, # end configurations
}, # end target_defaults
}

View File

@@ -0,0 +1,495 @@
// Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine License
// Agreement.
#include "OEMCryptoCENC.h"
#include "wv_attributes.h"
#pragma message( \
"Warning: The Widevine CE CDM does not include an implementation of \
OEMCrypto. You must provide your own implementation. If you have access to the \
OEMCrypto repository, you can use an implementation from there. Otherwise, you \
will need to acquire an implementation from your SoC vendor. This build should \
successfully compile and link, but the resulting binary will fail the unit \
tests.")
OEMCryptoResult OEMCrypto_SetSandbox(const uint8_t* sandbox_id UNUSED,
size_t sandbox_id_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_Initialize(void) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_Terminate(void) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_Idle(OEMCrypto_IdleState state UNUSED,
uint32_t os_specific_code UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_Wake(void) { return OEMCrypto_ERROR_NOT_IMPLEMENTED; }
OEMCryptoResult OEMCrypto_OpenSession(OEMCrypto_SESSION* session UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_CloseSession(OEMCrypto_SESSION session UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_CreateEntitledKeySession(
OEMCrypto_SESSION oec_session UNUSED,
OEMCrypto_SESSION* key_session UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_RemoveEntitledKeySession(
OEMCrypto_SESSION key_session UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GenerateDerivedKeys(
OEMCrypto_SESSION session UNUSED,
const OEMCrypto_SharedMemory* mac_key_context UNUSED,
size_t mac_key_context_length UNUSED,
const OEMCrypto_SharedMemory* enc_key_context UNUSED,
size_t enc_key_context_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_DeriveKeysFromSessionKey(
OEMCrypto_SESSION session UNUSED, const uint8_t* derivation_key UNUSED,
size_t derivation_key_length UNUSED,
const OEMCrypto_SharedMemory* mac_key_context UNUSED,
size_t mac_key_context_length UNUSED,
const OEMCrypto_SharedMemory* enc_key_context UNUSED,
size_t enc_key_context_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GenerateNonce(OEMCrypto_SESSION session UNUSED,
uint32_t* nonce UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_PrepAndSignLicenseRequest(
OEMCrypto_SESSION session UNUSED, uint8_t* message UNUSED,
size_t message_length UNUSED, size_t* core_message_size UNUSED,
uint8_t* signature UNUSED, size_t* signature_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_PrepAndSignRenewalRequest(
OEMCrypto_SESSION session UNUSED, uint8_t* message UNUSED,
size_t message_length UNUSED, size_t* core_message_size UNUSED,
uint8_t* signature UNUSED, size_t* signature_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadKeys(
OEMCrypto_SESSION session UNUSED, const uint8_t* message UNUSED,
size_t message_length UNUSED, const uint8_t* signature UNUSED,
size_t signature_length UNUSED, OEMCrypto_Substring enc_mac_keys_iv UNUSED,
OEMCrypto_Substring enc_mac_keys UNUSED, size_t key_array_length UNUSED,
const OEMCrypto_KeyObject* key_array UNUSED, OEMCrypto_Substring pst UNUSED,
OEMCrypto_Substring srm_restriction_data UNUSED,
OEMCrypto_LicenseType license_type UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadLicense(OEMCrypto_SESSION session UNUSED,
const uint8_t* message UNUSED,
size_t message_length UNUSED,
size_t core_message_length UNUSED,
const uint8_t* signature UNUSED,
size_t signature_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadEntitledContentKeys(
OEMCrypto_SESSION session UNUSED, const uint8_t* message UNUSED,
size_t message_length UNUSED, size_t key_array_length UNUSED,
const OEMCrypto_EntitledContentKeyObject* key_array UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_RefreshKeys(
OEMCrypto_SESSION session UNUSED, const uint8_t* message UNUSED,
size_t message_length UNUSED, const uint8_t* signature UNUSED,
size_t signature_length UNUSED, size_t num_keys UNUSED,
const OEMCrypto_KeyRefreshObject* key_array UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadRenewal(OEMCrypto_SESSION session UNUSED,
const uint8_t* message UNUSED,
size_t message_length UNUSED,
size_t core_message_length UNUSED,
const uint8_t* signature UNUSED,
size_t signature_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_QueryKeyControl(
OEMCrypto_SESSION session UNUSED, const uint8_t* content_key_id UNUSED,
size_t content_key_id_length UNUSED, uint8_t* key_control_block UNUSED,
size_t* key_control_block_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_SelectKey(OEMCrypto_SESSION session UNUSED,
const uint8_t* content_key_id UNUSED,
size_t content_key_id_length UNUSED,
OEMCryptoCipherMode cipher_mode UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_DecryptCENC(
OEMCrypto_SESSION session UNUSED,
const OEMCrypto_SampleDescription* samples UNUSED,
size_t samples_length UNUSED,
const OEMCrypto_CENCEncryptPatternDesc* pattern UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_CopyBuffer(
OEMCrypto_SESSION session UNUSED,
const OEMCrypto_SharedMemory* data_addr UNUSED,
size_t data_addr_length UNUSED,
const OEMCrypto_DestBufferDesc* out_buffer_descriptor UNUSED,
uint8_t subsample_flags UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_Generic_Encrypt(
OEMCrypto_SESSION session UNUSED,
const OEMCrypto_SharedMemory* in_buffer UNUSED,
size_t in_buffer_length UNUSED, const uint8_t* iv UNUSED,
OEMCrypto_Algorithm algorithm UNUSED,
OEMCrypto_SharedMemory* out_buffer UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_Generic_Decrypt(
OEMCrypto_SESSION session UNUSED,
const OEMCrypto_SharedMemory* in_buffer UNUSED,
size_t in_buffer_length UNUSED, const uint8_t* iv UNUSED,
OEMCrypto_Algorithm algorithm UNUSED,
OEMCrypto_SharedMemory* out_buffer UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_Generic_Sign(
OEMCrypto_SESSION session UNUSED,
const OEMCrypto_SharedMemory* buffer UNUSED, size_t buffer_length UNUSED,
OEMCrypto_Algorithm algorithm UNUSED,
OEMCrypto_SharedMemory* signature UNUSED, size_t* signature_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_Generic_Verify(
OEMCrypto_SESSION session UNUSED,
const OEMCrypto_SharedMemory* buffer UNUSED, size_t buffer_length UNUSED,
OEMCrypto_Algorithm algorithm UNUSED,
const OEMCrypto_SharedMemory* signature UNUSED,
size_t signature_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_WrapKeyboxOrOEMCert(
const uint8_t* keybox_or_cert UNUSED, size_t keybox_or_cert_length UNUSED,
uint8_t* wrapped_keybox_or_cert UNUSED,
size_t* wrapped_keybox_or_cert_length UNUSED,
const uint8_t* transport_key UNUSED, size_t transport_key_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_InstallKeyboxOrOEMCert(
const uint8_t* keybox_or_cert UNUSED, size_t keybox_or_cert_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCrypto_ProvisioningMethod OEMCrypto_GetProvisioningMethod(void) {
return OEMCrypto_ProvisioningError;
}
OEMCryptoResult OEMCrypto_IsKeyboxOrOEMCertValid(void) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GetDeviceID(uint8_t* device_id UNUSED,
size_t* device_id_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GetKeyData(uint8_t* key_data UNUSED,
size_t* key_data_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadTestKeybox(const uint8_t* buffer UNUSED,
size_t buffer_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadOEMPrivateKey(OEMCrypto_SESSION session UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GetOEMPublicCertificate(
uint8_t* public_cert UNUSED, size_t* public_cert_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GetRandom(uint8_t* random_data UNUSED,
size_t random_data_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
uint32_t OEMCrypto_APIVersion(void) { return 0; }
uint32_t OEMCrypto_MinorAPIVersion(void) { return 0; }
OEMCryptoResult OEMCrypto_BuildInformation(char* buffer UNUSED,
size_t* buffer_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
uint8_t OEMCrypto_Security_Patch_Level(void) { return 0; }
OEMCrypto_Security_Level OEMCrypto_SecurityLevel(void) {
return OEMCrypto_Level_Unknown;
}
OEMCryptoResult OEMCrypto_GetHDCPCapability(
OEMCrypto_HDCP_Capability* current UNUSED,
OEMCrypto_HDCP_Capability* maximum UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GetDTCP2Capability(
OEMCrypto_DTCP2_Capability* capability UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
bool OEMCrypto_SupportsUsageTable(void) { return false; }
size_t OEMCrypto_MaximumUsageTableHeaderSize(void) { return 0; }
bool OEMCrypto_IsAntiRollbackHwPresent(void) { return false; }
OEMCryptoResult OEMCrypto_GetNumberOfOpenSessions(size_t* count UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GetMaxNumberOfSessions(size_t* max UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
uint32_t OEMCrypto_SupportedCertificates(void) { return 0; }
OEMCryptoResult OEMCrypto_GetCurrentSRMVersion(uint16_t* version UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
uint32_t OEMCrypto_GetAnalogOutputFlags(void) { return 0; }
uint32_t OEMCrypto_ResourceRatingTier(void) { return 0; }
OEMCryptoResult OEMCrypto_ProductionReady(void) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCrypto_WatermarkingSupport OEMCrypto_GetWatermarkingSupport(void) {
return OEMCrypto_WatermarkingError;
}
OEMCryptoResult OEMCrypto_LoadProvisioning(
OEMCrypto_SESSION session UNUSED, const uint8_t* message UNUSED,
size_t message_length UNUSED, size_t core_message_length UNUSED,
const uint8_t* signature UNUSED, size_t signature_length UNUSED,
uint8_t* wrapped_private_key UNUSED,
size_t* wrapped_private_key_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadDRMPrivateKey(
OEMCrypto_SESSION session UNUSED, OEMCrypto_PrivateKeyType key_type UNUSED,
const uint8_t* wrapped_private_key UNUSED,
size_t wrapped_private_key_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadTestRSAKey(void) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GenerateRSASignature(
OEMCrypto_SESSION session UNUSED, const uint8_t* message UNUSED,
size_t message_length UNUSED, uint8_t* signature UNUSED,
size_t* signature_length UNUSED, RSA_Padding_Scheme padding_scheme UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_PrepAndSignProvisioningRequest(
OEMCrypto_SESSION session UNUSED, uint8_t* message UNUSED,
size_t message_length UNUSED, size_t* core_message_size UNUSED,
uint8_t* signature UNUSED, size_t* signature_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_CreateUsageTableHeader(
uint8_t* header_buffer UNUSED, size_t* header_buffer_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadUsageTableHeader(const uint8_t* buffer UNUSED,
size_t buffer_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_CreateNewUsageEntry(
OEMCrypto_SESSION session UNUSED, uint32_t* usage_entry_number UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_ReuseUsageEntry(OEMCrypto_SESSION session UNUSED,
uint32_t usage_entry_number UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadUsageEntry(OEMCrypto_SESSION session UNUSED,
uint32_t usage_entry_number UNUSED,
const uint8_t* buffer UNUSED,
size_t buffer_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_UpdateUsageEntry(
OEMCrypto_SESSION session UNUSED,
OEMCrypto_SharedMemory* header_buffer UNUSED,
size_t* header_buffer_length UNUSED,
OEMCrypto_SharedMemory* entry_buffer UNUSED,
size_t* entry_buffer_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_DeactivateUsageEntry(OEMCrypto_SESSION session UNUSED,
const uint8_t* pst UNUSED,
size_t pst_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_ReportUsage(OEMCrypto_SESSION session UNUSED,
const uint8_t* pst UNUSED,
size_t pst_length UNUSED,
uint8_t* buffer UNUSED,
size_t* buffer_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_MoveEntry(OEMCrypto_SESSION session UNUSED,
uint32_t new_index UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_ShrinkUsageTableHeader(
uint32_t new_entry_count UNUSED, uint8_t* header_buffer UNUSED,
size_t* header_buffer_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GetBootCertificateChain(
uint8_t* bcc UNUSED, size_t* bcc_length UNUSED,
uint8_t* additional_signature UNUSED,
size_t* additional_signature_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GenerateCertificateKeyPair(
OEMCrypto_SESSION session UNUSED, uint8_t* public_key UNUSED,
size_t* public_key_length UNUSED, uint8_t* public_key_signature UNUSED,
size_t* public_key_signature_length UNUSED,
uint8_t* wrapped_private_key UNUSED,
size_t* wrapped_private_key_length UNUSED,
OEMCrypto_PrivateKeyType* key_type UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
uint32_t OEMCrypto_SupportsDecryptHash(void) { return 0; }
OEMCryptoResult OEMCrypto_SetDecryptHash(OEMCrypto_SESSION session UNUSED,
uint32_t frame_number UNUSED,
const uint8_t* hash UNUSED,
size_t hash_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GetHashErrorCode(
OEMCrypto_SESSION session UNUSED, uint32_t* failed_frame_number UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_AllocateSecureBuffer(
OEMCrypto_SESSION session UNUSED, size_t buffer_size UNUSED,
OEMCrypto_DestBufferDesc* output_descriptor UNUSED, int* secure_fd UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_FreeSecureBuffer(
OEMCrypto_SESSION session UNUSED,
OEMCrypto_DestBufferDesc* output_descriptor UNUSED, int secure_fd UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_InstallOemPrivateKey(
OEMCrypto_SESSION session UNUSED, OEMCrypto_PrivateKeyType key_type UNUSED,
const uint8_t* wrapped_private_key UNUSED,
size_t wrapped_private_key_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_ReassociateEntitledKeySession(
OEMCrypto_SESSION key_session UNUSED,
OEMCrypto_SESSION oec_session UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_LoadCasECMKeys(
OEMCrypto_SESSION session UNUSED, const uint8_t* message UNUSED,
size_t message_length UNUSED,
const OEMCrypto_EntitledContentKeyObject* even_key UNUSED,
const OEMCrypto_EntitledContentKeyObject* odd_key UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_OPK_SerializationVersion(uint32_t* ree_major UNUSED,
uint32_t* ree_minor UNUSED,
uint32_t* tee_major UNUSED,
uint32_t* tee_minor UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GenerateOTARequest(OEMCrypto_SESSION session UNUSED,
uint8_t* buffer UNUSED,
size_t* buffer_length UNUSED,
uint32_t use_test_key UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_ProcessOTAKeybox(OEMCrypto_SESSION session UNUSED,
const uint8_t* buffer UNUSED,
size_t buffer_length UNUSED,
uint32_t use_test_key UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}
OEMCryptoResult OEMCrypto_GetOEMKeyToken(OEMCrypto_SESSION key_session UNUSED,
uint8_t* key_token UNUSED,
size_t* key_token_length UNUSED) {
return OEMCrypto_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -0,0 +1,20 @@
# Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
# source code may only be used and distributed under the Widevine License
# Agreement.
{
'targets': [
{
'target_name': 'oemcrypto',
'type': 'static_library',
# For a real device, this GYP target should include the files necessary to
# implement OEMCrypto. However, since the CE CDM repository does not
# include an OEMCrypto implementation, we have to include a dummy file
# here.
'include_dirs': [
'../../oemcrypto/include',
'../../util/include',
],
'sources': ['no_oemcrypto.cpp'],
},
],
}

View File

@@ -16,6 +16,9 @@
'client_form_factor': 'TV',
'client_version': '1.0.0',
'oemcrypto_lib': 'target',
'oemcrypto_gyp_path': 'oemcrypto.gyp:oemcrypto',
'asm_target_arch': 'x86-64',
}, # end variables