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:
@@ -622,6 +622,8 @@ typedef enum OEMCrypto_ProvisioningMethod {
|
|||||||
#define OEMCrypto_DecryptCENC _oecc105
|
#define OEMCrypto_DecryptCENC _oecc105
|
||||||
#define OEMCrypto_LoadDRMPrivateKey _oecc107
|
#define OEMCrypto_LoadDRMPrivateKey _oecc107
|
||||||
#define OEMCrypto_MinorAPIVersion _oecc108
|
#define OEMCrypto_MinorAPIVersion _oecc108
|
||||||
|
#define OEMCrypto_AllocateSecureBuffer _oecc109
|
||||||
|
#define OEMCrypto_FreeSecureBuffer _oecc110
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
/// @addtogroup initcontrol
|
/// @addtogroup initcontrol
|
||||||
@@ -956,7 +958,7 @@ OEMCryptoResult OEMCrypto_GenerateNonce(OEMCrypto_SESSION session,
|
|||||||
/**
|
/**
|
||||||
* OEMCrypto will use ODK_PrepareCoreLicenseRequest to prepare the core
|
* OEMCrypto will use ODK_PrepareCoreLicenseRequest to prepare the core
|
||||||
* message. If it returns OEMCrypto_SUCCESS, then OEMCrypto shall sign the
|
* 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.
|
* error, the error should be returned by OEMCrypto to the CDM layer.
|
||||||
* ODK_PrepareCoreLicenseRequest is described in the document "Widevine Core
|
* ODK_PrepareCoreLicenseRequest is described in the document "Widevine Core
|
||||||
* Message Serialization".
|
* Message Serialization".
|
||||||
@@ -1667,6 +1669,7 @@ OEMCryptoResult OEMCrypto_LoadKeys(
|
|||||||
* @param[in] signature: pointer to memory containing the signature.
|
* @param[in] signature: pointer to memory containing the signature.
|
||||||
* @param[in] signature_length: length of the signature, in bytes.
|
* @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_SUCCESS success
|
||||||
* @retval OEMCrypto_ERROR_NO_DEVICE_KEY
|
* @retval OEMCrypto_ERROR_NO_DEVICE_KEY
|
||||||
* @retval OEMCrypto_ERROR_INVALID_SESSION
|
* @retval OEMCrypto_ERROR_INVALID_SESSION
|
||||||
@@ -3011,10 +3014,10 @@ OEMCryptoResult OEMCrypto_GetDeviceID(uint8_t* device_id,
|
|||||||
/**
|
/**
|
||||||
* Return the Key Data field from the Keybox.
|
* 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
|
* the Keybox
|
||||||
* @param[in,out] keyDataLength: on input, the allocated buffer size. On output,
|
* @param[in,out] key_data_length: on input, the allocated buffer size. On
|
||||||
* the number of bytes in Key Data
|
* output, the number of bytes in Key Data
|
||||||
*
|
*
|
||||||
* @retval OEMCrypto_SUCCESS success
|
* @retval OEMCrypto_SUCCESS success
|
||||||
* @retval OEMCrypto_ERROR_SHORT_BUFFER if the buffer is too small to return
|
* @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
|
* current version of OEMCrypto. They are being declared here to help with
|
||||||
* backwards compatibility.
|
* 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,
|
OEMCryptoResult OEMCrypto_GenerateSignature(OEMCrypto_SESSION session,
|
||||||
const uint8_t* message,
|
const uint8_t* message,
|
||||||
size_t message_length,
|
size_t message_length,
|
||||||
uint8_t* signature,
|
uint8_t* signature,
|
||||||
size_t* signature_length);
|
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(
|
OEMCryptoResult OEMCrypto_RewrapDeviceRSAKey30(
|
||||||
OEMCrypto_SESSION session, const uint32_t* unaligned_nonce,
|
OEMCrypto_SESSION session, const uint32_t* unaligned_nonce,
|
||||||
const uint8_t* encrypted_message_key, size_t encrypted_message_key_length,
|
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,
|
const uint8_t* enc_rsa_key_iv, uint8_t* wrapped_rsa_key,
|
||||||
size_t* wrapped_rsa_key_length);
|
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(
|
OEMCryptoResult OEMCrypto_RewrapDeviceRSAKey(
|
||||||
OEMCrypto_SESSION session, const uint8_t* message, size_t message_length,
|
OEMCrypto_SESSION session, const uint8_t* message, size_t message_length,
|
||||||
const uint8_t* signature, size_t signature_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,
|
size_t enc_rsa_key_length, const uint8_t* enc_rsa_key_iv,
|
||||||
uint8_t* wrapped_rsa_key, size_t* wrapped_rsa_key_length);
|
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_UpdateUsageTable(void);
|
||||||
|
|
||||||
OEMCryptoResult OEMCrypto_DeleteUsageEntry(OEMCrypto_SESSION, const uint8_t*,
|
/*
|
||||||
size_t, const uint8_t*, size_t,
|
* OEMCrypto_DeleteUsageEntry
|
||||||
const uint8_t*, size_t);
|
* @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,
|
OEMCryptoResult OEMCrypto_CopyOldUsageEntry(OEMCrypto_SESSION session,
|
||||||
const uint8_t* pst,
|
const uint8_t* pst,
|
||||||
size_t pst_length);
|
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);
|
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(
|
OEMCryptoResult OEMCrypto_CreateOldUsageEntry(
|
||||||
uint64_t time_since_license_received, uint64_t time_since_first_decrypt,
|
uint64_t time_since_license_received, uint64_t time_since_first_decrypt,
|
||||||
uint64_t time_since_last_decrypt, OEMCrypto_Usage_Entry_Status status,
|
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,
|
uint8_t* server_mac_key, uint8_t* client_mac_key, const uint8_t* pst,
|
||||||
size_t pst_length);
|
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(
|
OEMCryptoResult OEMCrypto_GenerateDerivedKeys_V15(
|
||||||
OEMCrypto_SESSION session, const uint8_t* mac_key_context,
|
OEMCrypto_SESSION session, const uint8_t* mac_key_context,
|
||||||
uint32_t mac_key_context_length, const uint8_t* enc_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.
|
size_t offset; // offset into the pattern in blocks for this call.
|
||||||
} OEMCrypto_CENCEncryptPatternDesc_V15;
|
} 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(
|
OEMCryptoResult OEMCrypto_DecryptCENC_V15(
|
||||||
OEMCrypto_SESSION session, const uint8_t* data_addr, size_t data_length,
|
OEMCrypto_SESSION session, const uint8_t* data_addr,
|
||||||
bool is_encrypted, const uint8_t* iv,
|
size_t data_addr_length, bool is_encrypted, const uint8_t* iv,
|
||||||
size_t block_offset, // used for CTR "cenc" mode only.
|
size_t block_offset, // used for CTR "cenc" mode only.
|
||||||
OEMCrypto_DestBufferDesc* out_buffer_descriptor,
|
OEMCrypto_DestBufferDesc* out_buffer,
|
||||||
const OEMCrypto_CENCEncryptPatternDesc_V15* pattern,
|
const OEMCrypto_CENCEncryptPatternDesc_V15* pattern,
|
||||||
uint8_t subsample_flags);
|
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(
|
OEMCryptoResult OEMCrypto_GetOEMPublicCertificate_V15(
|
||||||
OEMCrypto_SESSION session, uint8_t* public_cert,
|
OEMCrypto_SESSION session, uint8_t* public_cert,
|
||||||
size_t* public_cert_length);
|
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,
|
OEMCryptoResult OEMCrypto_LoadDeviceRSAKey(OEMCrypto_SESSION session,
|
||||||
const uint8_t* wrapped_rsa_key,
|
const uint8_t* wrapped_rsa_key,
|
||||||
size_t wrapped_rsa_key_length);
|
size_t wrapped_rsa_key_length);
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ namespace wvoec3 {
|
|||||||
#define Level3_AllocateSecureBuffer _lcc111
|
#define Level3_AllocateSecureBuffer _lcc111
|
||||||
#define Level3_FreeSecureBuffer _lcc112
|
#define Level3_FreeSecureBuffer _lcc112
|
||||||
#else
|
#else
|
||||||
#define Level3_IsInApp _oecc00
|
|
||||||
#define Level3_Initialize _oecc01
|
#define Level3_Initialize _oecc01
|
||||||
#define Level3_Terminate _oecc02
|
#define Level3_Terminate _oecc02
|
||||||
#define Level3_InstallKeyboxOrOEMCert _oecc03
|
#define Level3_InstallKeyboxOrOEMCert _oecc03
|
||||||
|
|||||||
Reference in New Issue
Block a user