Merge cdm changes to android repo
Bug: 251924225 Test: GtsMediaTestCases Change-Id: I1b4e64c0abf701fe1f5017f14dc72b72c3ea6770
This commit is contained in:
@@ -702,6 +702,7 @@ typedef enum OEMCrypto_WatermarkingSupport {
|
||||
#define OEMCrypto_ReuseUsageEntry _oecc127
|
||||
#define OEMCrypto_GetDTCP2Capability _oecc128
|
||||
#define OEMCrypto_GetWatermarkingSupport _oecc129
|
||||
#define OEMCrypto_GetOEMKeyToken _oecc130
|
||||
// clang-format on
|
||||
|
||||
/// @addtogroup initcontrol
|
||||
@@ -926,6 +927,13 @@ OEMCryptoResult OEMCrypto_CloseSession(OEMCrypto_SESSION session);
|
||||
* @retval OEMCrypto_ERROR_NOT_IMPLEMENTED
|
||||
* @retval OEMCrypto_ERROR_INVALID_SESSION
|
||||
*
|
||||
* @threading
|
||||
* This is a "Session Function" and may be called simultaneously with session
|
||||
* functions for other sessions but not simultaneously with other functions
|
||||
* for this oec_session. It will not be called simultaneously with
|
||||
* initialization or usage table functions. It is as if the CDM holds a write
|
||||
* lock for this session, and a read lock on the OEMCrypto system.
|
||||
*
|
||||
* @version
|
||||
* This method is new in API version 17.
|
||||
*/
|
||||
@@ -942,6 +950,13 @@ OEMCryptoResult OEMCrypto_CreateEntitledKeySession(
|
||||
* @retval OEMCrypto_ERROR_NOT_IMPLEMENTED
|
||||
* @retval OEMCrypto_ERROR_INVALID_ENTITLED_KEY_SESSION
|
||||
*
|
||||
* @threading
|
||||
* This is a "Session Function" and may be called simultaneously with session
|
||||
* functions for other sessions but not simultaneously with other functions
|
||||
* for this session. It will not be called simultaneously with initialization
|
||||
* or usage table functions. It is as if the CDM holds a write lock for this
|
||||
* session, and a read lock on the OEMCrypto system.
|
||||
*
|
||||
* @version
|
||||
* This method is new in API version 17.
|
||||
*/
|
||||
@@ -1796,18 +1811,18 @@ OEMCryptoResult OEMCrypto_LoadLicense(OEMCrypto_SESSION session,
|
||||
size_t signature_length);
|
||||
|
||||
/**
|
||||
* Load content keys into a session which already has entitlement keys
|
||||
* loaded. This function will only be called for a session after a call to
|
||||
* OEMCrypto_LoadKeys() with the parameter type license_type equal to
|
||||
* OEMCrypto_EntitlementLicense. This function may be called multiple times
|
||||
* Load content keys into an entitled session which is associated with an
|
||||
* entitlement sessions. This function will only be called for an entitled
|
||||
* session after a call to OEMCrypto_LoadLicense() has been called on the
|
||||
* associated entitlement session. This function may be called multiple times
|
||||
* for the same session.
|
||||
*
|
||||
* If the session does not have license_type equal to
|
||||
* OEMCrypto_EntitlementLicense, return OEMCrypto_ERROR_INVALID_CONTEXT and
|
||||
* perform no work.
|
||||
* If the session is not an entitled session, return
|
||||
* OEMCrypto_ERROR_INVALID_CONTEXT and perform no work.
|
||||
*
|
||||
* For each key object in key_array, OEMCrypto shall look up the entry in the
|
||||
* key table with the corresponding entitlement_key_id.
|
||||
* key table for the entitlement session with the corresponding
|
||||
* entitlement_key_id.
|
||||
*
|
||||
* 1. If no entry is found, return OEMCrypto_KEY_NOT_ENTITLED.
|
||||
* 2. If the entry already has a content_key_id and content_key_data, that
|
||||
@@ -1841,12 +1856,19 @@ OEMCryptoResult OEMCrypto_LoadLicense(OEMCrypto_SESSION session,
|
||||
* @retval OEMCrypto_ERROR_SYSTEM_INVALIDATED
|
||||
* @retval OEMCrypto_ERROR_INVALID_ENTITLED_KEY_SESSION
|
||||
*
|
||||
* @buffer_size
|
||||
* OEMCrypto shall support message sizes as described in the section
|
||||
* OEMCrypto_ResourceRatingTier().
|
||||
* OEMCrypto shall return OEMCrypto_ERROR_BUFFER_TOO_LARGE if the buffer is
|
||||
* larger than the supported size.
|
||||
*
|
||||
* @threading
|
||||
* This is a "Session Function" and may be called simultaneously with session
|
||||
* functions for other sessions but not simultaneously with other functions
|
||||
* for this session. It will not be called simultaneously with initialization
|
||||
* or usage table functions. It is as if the CDM holds a write lock for this
|
||||
* session, and a read lock on the OEMCrypto system.
|
||||
* for this session, or its entitlement session. It will not be called
|
||||
* simultaneously with initialization or usage table functions. It is as if
|
||||
* the CDM holds a write lock for this session, and a read lock on the
|
||||
* OEMCrypto system.
|
||||
*
|
||||
* @version
|
||||
* This method changed in API version 17.
|
||||
@@ -5114,11 +5136,9 @@ OEMCryptoResult OEMCrypto_InstallOemPrivateKey(
|
||||
* @retval OEMCrypto_ERROR_INVALID_SESSION
|
||||
*
|
||||
* @threading
|
||||
* This is a "Session Function" and may be called simultaneously with session
|
||||
* functions for other sessions but not simultaneously with other functions
|
||||
* for this session. It will not be called simultaneously with initialization
|
||||
* or usage table functions. It is as if the CDM holds a write lock for this
|
||||
* session, and a read lock on the OEMCrypto system.
|
||||
* This is a "Session Initialization Function" and will not be called
|
||||
* simultaneously with any other function, as if the CDM holds a write lock
|
||||
* on the OEMCrypto system.
|
||||
*
|
||||
* @version
|
||||
* This method is new in API version 17.
|
||||
@@ -5306,6 +5326,31 @@ OEMCryptoResult OEMCrypto_ProcessOTAKeybox(OEMCrypto_SESSION session,
|
||||
const uint8_t* buffer,
|
||||
size_t buffer_length,
|
||||
uint32_t use_test_key);
|
||||
/**
|
||||
* Retrieves the key token associated with the input entitled key session. This
|
||||
* method is currently used only by CAS, where key token is a means to share
|
||||
* vendor specific crypto info with other frameworks (e.g. Descrambler in
|
||||
* Android TunerHAL) that are also under control of the vendor.
|
||||
*
|
||||
* @param[in] key_session: handle for the entitled key session to be used.
|
||||
* @param[out] key_token: where the key token is stored.
|
||||
* @param[in,out] key_token_length: length of the key token, in bytes.
|
||||
*
|
||||
* @retval OEMCrypto_SUCCESS on success
|
||||
* @retval OEMCrypto_ERROR_SHORT_BUFFER if buffer_length is too small.
|
||||
* @retval OEMCrypto_ERROR_NOT_IMPLEMENTED
|
||||
*
|
||||
* @threading
|
||||
* This is an "Initialization and Termination Function" and will not be called
|
||||
* simultaneously with any other function, as if the CDM holds a write lock on
|
||||
* the OEMCrypto system.
|
||||
*
|
||||
* @version
|
||||
* This method is new in API version 17.
|
||||
*/
|
||||
OEMCryptoResult OEMCrypto_GetOEMKeyToken(OEMCrypto_SESSION key_session,
|
||||
uint8_t* key_token,
|
||||
size_t* key_token_length);
|
||||
|
||||
/****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user