Update OEMCryptoCENC.h header to obfuscate missing functions
This CL adds AllocateSecureBuffer and FreeSecureBuffer to the list of function names that are obfuscated. It also corrects some spelling and formatting in OEMCrypto headers. This is still version 16.4. Merge from Widevine repo of http://go/wvgerrit/115803 http://go/wvgerrit/111104 http://go/wvgerrit/108703 http://go/wvgerrit/108703 Bug: 139814713 Bug: 141202789 bug: 168634557 bug: 168635928 bug: 168637230 bug: 168639188 Change-Id: I6f06549b2cf104c6751b2947964569e974fcdcd2
This commit is contained in:
@@ -480,8 +480,8 @@ typedef enum OEMCrypto_ProvisioningMethod {
|
||||
OEMCrypto_ProvisioningError = 0, // Device cannot be provisioned.
|
||||
OEMCrypto_DrmCertificate = 1, // Device has baked in DRM certificate
|
||||
// (level 3 only)
|
||||
OEMCrypto_Keybox = 2, // Device has factory installed unique keybox.
|
||||
OEMCrypto_OEMCertificate = 3 // Device has factory installed OEM certificate.
|
||||
OEMCrypto_Keybox = 2, // Device has factory installed unique keybox.
|
||||
OEMCrypto_OEMCertificate = 3 // Device has factory installed OEM certificate.
|
||||
} OEMCrypto_ProvisioningMethod;
|
||||
|
||||
/**
|
||||
@@ -489,7 +489,7 @@ typedef enum OEMCrypto_ProvisioningMethod {
|
||||
*/
|
||||
#define OEMCrypto_Supports_RSA_2048bit 0x1
|
||||
#define OEMCrypto_Supports_RSA_3072bit 0x2
|
||||
#define OEMCrypto_Supports_RSA_CAST 0x10
|
||||
#define OEMCrypto_Supports_RSA_CAST 0x10
|
||||
#define OEMCrypto_Supports_ECC_secp256r1 0x100
|
||||
#define OEMCrypto_Supports_ECC_secp384r1 0x200
|
||||
#define OEMCrypto_Supports_ECC_secp521r1 0x400
|
||||
@@ -504,12 +504,12 @@ typedef enum OEMCrypto_ProvisioningMethod {
|
||||
/**
|
||||
* Return values from OEMCrypto_GetAnalogOutputFlags.
|
||||
*/
|
||||
#define OEMCrypto_No_Analog_Output 0x0
|
||||
#define OEMCrypto_Supports_Analog_Output 0x1
|
||||
#define OEMCrypto_Can_Disable_Analog_Ouptput 0x2
|
||||
#define OEMCrypto_Supports_CGMS_A 0x4
|
||||
#define OEMCrypto_No_Analog_Output 0x0
|
||||
#define OEMCrypto_Supports_Analog_Output 0x1
|
||||
#define OEMCrypto_Can_Disable_Analog_Ouptput 0x2
|
||||
#define OEMCrypto_Supports_CGMS_A 0x4
|
||||
// Unknown_Analog_Output is used only for backwards compatibility.
|
||||
#define OEMCrypto_Unknown_Analog_Output (1<<31)
|
||||
#define OEMCrypto_Unknown_Analog_Output (1 << 31)
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -622,6 +622,8 @@ typedef enum OEMCrypto_ProvisioningMethod {
|
||||
#define OEMCrypto_DecryptCENC _oecc105
|
||||
#define OEMCrypto_LoadDRMPrivateKey _oecc107
|
||||
#define OEMCrypto_MinorAPIVersion _oecc108
|
||||
#define OEMCrypto_AllocateSecureBuffer _oecc109
|
||||
#define OEMCrypto_FreeSecureBuffer _oecc110
|
||||
// clang-format on
|
||||
|
||||
/// @addtogroup initcontrol
|
||||
@@ -956,7 +958,7 @@ OEMCryptoResult OEMCrypto_GenerateNonce(OEMCrypto_SESSION session,
|
||||
/**
|
||||
* OEMCrypto will use ODK_PrepareCoreLicenseRequest to prepare the core
|
||||
* message. If it returns OEMCrypto_SUCCESS, then OEMCrypto shall sign the
|
||||
* the message body using the DRM certificate's private key. If it returns an
|
||||
* message body using the DRM certificate's private key. If it returns an
|
||||
* error, the error should be returned by OEMCrypto to the CDM layer.
|
||||
* ODK_PrepareCoreLicenseRequest is described in the document "Widevine Core
|
||||
* Message Serialization".
|
||||
@@ -1667,6 +1669,7 @@ OEMCryptoResult OEMCrypto_LoadKeys(
|
||||
* @param[in] signature: pointer to memory containing the signature.
|
||||
* @param[in] signature_length: length of the signature, in bytes.
|
||||
*
|
||||
* @retval OEMCrypto_SUCCESS success OEMCrypto_ERROR_NO_DEVICE_KEY
|
||||
* @retval OEMCrypto_SUCCESS success
|
||||
* @retval OEMCrypto_ERROR_NO_DEVICE_KEY
|
||||
* @retval OEMCrypto_ERROR_INVALID_SESSION
|
||||
@@ -3011,10 +3014,10 @@ OEMCryptoResult OEMCrypto_GetDeviceID(uint8_t* device_id,
|
||||
/**
|
||||
* Return the Key Data field from the Keybox.
|
||||
*
|
||||
* @param[out] keyData: pointer to the buffer to hold the Key Data field from
|
||||
* @param[out] key_data: pointer to the buffer to hold the Key Data field from
|
||||
* the Keybox
|
||||
* @param[in,out] keyDataLength: on input, the allocated buffer size. On output,
|
||||
* the number of bytes in Key Data
|
||||
* @param[in,out] key_data_length: on input, the allocated buffer size. On
|
||||
* output, the number of bytes in Key Data
|
||||
*
|
||||
* @retval OEMCrypto_SUCCESS success
|
||||
* @retval OEMCrypto_ERROR_SHORT_BUFFER if the buffer is too small to return
|
||||
@@ -4722,12 +4725,25 @@ OEMCryptoResult OEMCrypto_FreeSecureBuffer(
|
||||
* current version of OEMCrypto. They are being declared here to help with
|
||||
* backwards compatibility.
|
||||
*/
|
||||
|
||||
/*
|
||||
* OEMCrypto_GenerateSignature
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_GenerateSignature(OEMCrypto_SESSION session,
|
||||
const uint8_t* message,
|
||||
size_t message_length,
|
||||
uint8_t* signature,
|
||||
size_t* signature_length);
|
||||
|
||||
/*
|
||||
* OEMCrypto_RewrapDeviceRSAKey30
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_RewrapDeviceRSAKey30(
|
||||
OEMCrypto_SESSION session, const uint32_t* unaligned_nonce,
|
||||
const uint8_t* encrypted_message_key, size_t encrypted_message_key_length,
|
||||
@@ -4735,6 +4751,12 @@ OEMCryptoResult OEMCrypto_RewrapDeviceRSAKey30(
|
||||
const uint8_t* enc_rsa_key_iv, uint8_t* wrapped_rsa_key,
|
||||
size_t* wrapped_rsa_key_length);
|
||||
|
||||
/*
|
||||
* OEMCrypto_RewrapDeviceRSAKey
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_RewrapDeviceRSAKey(
|
||||
OEMCrypto_SESSION session, const uint8_t* message, size_t message_length,
|
||||
const uint8_t* signature, size_t signature_length,
|
||||
@@ -4742,26 +4764,70 @@ OEMCryptoResult OEMCrypto_RewrapDeviceRSAKey(
|
||||
size_t enc_rsa_key_length, const uint8_t* enc_rsa_key_iv,
|
||||
uint8_t* wrapped_rsa_key, size_t* wrapped_rsa_key_length);
|
||||
|
||||
/*
|
||||
* OEMCrypto_UpdateUsageTable
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_UpdateUsageTable(void);
|
||||
|
||||
OEMCryptoResult OEMCrypto_DeleteUsageEntry(OEMCrypto_SESSION, const uint8_t*,
|
||||
size_t, const uint8_t*, size_t,
|
||||
const uint8_t*, size_t);
|
||||
/*
|
||||
* OEMCrypto_DeleteUsageEntry
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_DeleteUsageEntry(
|
||||
OEMCrypto_SESSION session, const uint8_t* pst, size_t pst_length,
|
||||
const uint8_t* message, size_t message_length, const uint8_t* signature,
|
||||
size_t signature_length);
|
||||
|
||||
OEMCryptoResult OEMCrypto_ForceDeleteUsageEntry(const uint8_t*, size_t);
|
||||
/*
|
||||
* OEMCrypto_ForceDeleteUsageEntry
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_ForceDeleteUsageEntry(const uint8_t* pst,
|
||||
size_t pst_length);
|
||||
|
||||
/*
|
||||
* OEMCrypto_CopyOldUsageEntry
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_CopyOldUsageEntry(OEMCrypto_SESSION session,
|
||||
const uint8_t* pst,
|
||||
size_t pst_length);
|
||||
|
||||
/*
|
||||
* OEMCrypto_DeleteOldUsageTable
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_DeleteOldUsageTable(void);
|
||||
|
||||
/*
|
||||
* OEMCrypto_CreateOldUsageEntry
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_CreateOldUsageEntry(
|
||||
uint64_t time_since_license_received, uint64_t time_since_first_decrypt,
|
||||
uint64_t time_since_last_decrypt, OEMCrypto_Usage_Entry_Status status,
|
||||
uint8_t* server_mac_key, uint8_t* client_mac_key, const uint8_t* pst,
|
||||
size_t pst_length);
|
||||
|
||||
/*
|
||||
* OEMCrypto_GenerateDerivedKeys_V15
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_GenerateDerivedKeys_V15(
|
||||
OEMCrypto_SESSION session, const uint8_t* mac_key_context,
|
||||
uint32_t mac_key_context_length, const uint8_t* enc_key_context,
|
||||
@@ -4773,18 +4839,36 @@ typedef struct {
|
||||
size_t offset; // offset into the pattern in blocks for this call.
|
||||
} OEMCrypto_CENCEncryptPatternDesc_V15;
|
||||
|
||||
/*
|
||||
* OEMCrypto_DecryptCENC_V15
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_DecryptCENC_V15(
|
||||
OEMCrypto_SESSION session, const uint8_t* data_addr, size_t data_length,
|
||||
bool is_encrypted, const uint8_t* iv,
|
||||
OEMCrypto_SESSION session, const uint8_t* data_addr,
|
||||
size_t data_addr_length, bool is_encrypted, const uint8_t* iv,
|
||||
size_t block_offset, // used for CTR "cenc" mode only.
|
||||
OEMCrypto_DestBufferDesc* out_buffer_descriptor,
|
||||
OEMCrypto_DestBufferDesc* out_buffer,
|
||||
const OEMCrypto_CENCEncryptPatternDesc_V15* pattern,
|
||||
uint8_t subsample_flags);
|
||||
|
||||
/*
|
||||
* OEMCrypto_GetOEMPublicCertificate_V15
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_GetOEMPublicCertificate_V15(
|
||||
OEMCrypto_SESSION session, uint8_t* public_cert,
|
||||
size_t* public_cert_length);
|
||||
|
||||
/*
|
||||
* OEMCrypto_LoadDeviceRSAKey
|
||||
* @deprecated
|
||||
* Not required for the current version of OEMCrypto. Declared here to
|
||||
* help with backward compatibility.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_LoadDeviceRSAKey(OEMCrypto_SESSION session,
|
||||
const uint8_t* wrapped_rsa_key,
|
||||
size_t wrapped_rsa_key_length);
|
||||
|
||||
Reference in New Issue
Block a user