Update to ODK v18.3
This commit is contained in:
@@ -259,6 +259,8 @@ OEMCryptoResult ODK_DeactivateUsageEntry(ODK_ClockValues* clock_values);
|
||||
* of the message. (in) size of buffer reserved for the core message, in
|
||||
* bytes. (out) actual length of the core message, in bytes.
|
||||
* @param[in] nonce_values: pointer to the session's nonce data.
|
||||
* @param[in] message_count_info: information used for server-side anomaly
|
||||
* detection
|
||||
*
|
||||
* @retval OEMCrypto_SUCCESS
|
||||
* @retval OEMCrypto_ERROR_SHORT_BUFFER: core_message_size is too small
|
||||
@@ -269,7 +271,8 @@ OEMCryptoResult ODK_DeactivateUsageEntry(ODK_ClockValues* clock_values);
|
||||
*/
|
||||
OEMCryptoResult ODK_PrepareCoreLicenseRequest(
|
||||
uint8_t* message, size_t message_length, size_t* core_message_size,
|
||||
const ODK_NonceValues* nonce_values);
|
||||
const ODK_NonceValues* nonce_values,
|
||||
const ODK_MessageCounterInfo* counter_info);
|
||||
|
||||
/**
|
||||
* Modifies the message to include a core renewal request at the beginning of
|
||||
@@ -337,11 +340,8 @@ OEMCryptoResult ODK_PrepareCoreRenewalRequest(uint8_t* message,
|
||||
* of the message. (in) size of buffer reserved for the core message, in
|
||||
* bytes. (out) actual length of the core message, in bytes.
|
||||
* @param[in] nonce_values: pointer to the session's nonce data.
|
||||
* @param[in] device_id: For devices with a keybox, this is the device ID from
|
||||
* the keybox. For devices with an OEM Certificate, this is a device
|
||||
* unique id string.
|
||||
* @param[in] device_id_length: length of device_id. The device ID can be at
|
||||
* most 64 bytes.
|
||||
* @param[in] message_count_info: information used for server-side anomaly
|
||||
* detection
|
||||
*
|
||||
* @retval OEMCrypto_SUCCESS
|
||||
* @retval OEMCrypto_ERROR_SHORT_BUFFER: core_message_size is too small
|
||||
@@ -352,8 +352,44 @@ OEMCryptoResult ODK_PrepareCoreRenewalRequest(uint8_t* message,
|
||||
*/
|
||||
OEMCryptoResult ODK_PrepareCoreProvisioningRequest(
|
||||
uint8_t* message, size_t message_length, size_t* core_message_length,
|
||||
const ODK_NonceValues* nonce_values, const uint8_t* device_id,
|
||||
size_t device_id_length);
|
||||
const ODK_NonceValues* nonce_values,
|
||||
const ODK_MessageCounterInfo* counter_info);
|
||||
|
||||
/**
|
||||
* Modifies the message to include a core provisioning 4.0 request at the
|
||||
* beginning of the message buffer. The values in nonce_values are used to
|
||||
* populate the message.
|
||||
*
|
||||
* This shall be called by OEMCrypto from
|
||||
* OEMCrypto_PrepAndSignProvisioningRequest.
|
||||
*
|
||||
* NOTE: if the message pointer is null and/or input core_message_length is
|
||||
* zero, this function returns OEMCrypto_ERROR_SHORT_BUFFER and sets output
|
||||
* core_message_size to the size needed.
|
||||
*
|
||||
* @param[in,out] message: Pointer to memory for the entire message. Modified by
|
||||
* the ODK library.
|
||||
* @param[in] message_length: length of the entire message buffer.
|
||||
* @param[in,out] core_message_size: length of the core message at the beginning
|
||||
* of the message. (in) size of buffer reserved for the core message, in
|
||||
* bytes. (out) actual length of the core message, in bytes.
|
||||
* @param[in] nonce_values: pointer to the session's nonce data.
|
||||
* @param[in] device_info: Encoded device hardware info in CBOR format.
|
||||
* @param[in] device_info_length: length of device_info.
|
||||
* @param[in] message_count_info: information used for server-side anomaly
|
||||
* detection
|
||||
*
|
||||
* @retval OEMCrypto_SUCCESS
|
||||
* @retval OEMCrypto_ERROR_SHORT_BUFFER: core_message_size is too small
|
||||
* @retval OEMCrypto_ERROR_INVALID_CONTEXT
|
||||
*
|
||||
* @version
|
||||
* This method is new in version 18 of the API.
|
||||
*/
|
||||
OEMCryptoResult ODK_PrepareCoreProvisioning40Request(
|
||||
uint8_t* message, size_t message_length, size_t* core_message_length,
|
||||
const ODK_NonceValues* nonce_values, const uint8_t* device_info,
|
||||
size_t device_info_length, const ODK_MessageCounterInfo* counter_info);
|
||||
|
||||
/**
|
||||
* Modifies the message to include a core renewal provisioning request at the
|
||||
@@ -515,6 +551,7 @@ OEMCryptoResult ODK_RefreshV15Values(const ODK_TimerLimits* timer_limits,
|
||||
* and false when called for OEMCrypto_ReloadLicense.
|
||||
* @param[in] usage_entry_present: true if the session has a new usage entry
|
||||
* associated with it created via OEMCrypto_CreateNewUsageEntry.
|
||||
* @param[in] system_time_seconds: The current system's time in seconds.
|
||||
* @param[in,out] timer_limits: The session's timer limits. These will be
|
||||
* updated.
|
||||
* @param[in,out] clock_values: The session's clock values. These will be
|
||||
@@ -522,13 +559,19 @@ OEMCryptoResult ODK_RefreshV15Values(const ODK_TimerLimits* timer_limits,
|
||||
* @param[in,out] nonce_values: The session's nonce values. These will be
|
||||
* updated.
|
||||
* @param[out] parsed_license: the destination for the data.
|
||||
* @param[out] timer_value: set if playback timer should be started.
|
||||
*
|
||||
* @retval OEMCrypto_SUCCESS
|
||||
* @retval ODK_ERROR_CORE_MESSAGE: if the message did not parse correctly, or
|
||||
* there were other incorrect values. An error should be returned to the
|
||||
* CDM layer.
|
||||
* @retval ODK_UNSUPPORTED_API
|
||||
* @retval OEMCrypto_ERROR_INVALID_NONCE
|
||||
* @retval ODK_SET_TIMER: if the playback timer has been started successfully
|
||||
* @retval ODK_DISABLE_TIMER: if the playtime timer has been started
|
||||
* successfully then is disabled.
|
||||
* @retval ODK_TIMER_EXPIRED: if the license is attempted to be loaded after the
|
||||
* rental duration expires.
|
||||
* @retval OEMCrypto_ERROR_INVALåID_NONCE
|
||||
*
|
||||
* @version
|
||||
* This method is new in version 16 of the API.
|
||||
@@ -536,8 +579,9 @@ OEMCryptoResult ODK_RefreshV15Values(const ODK_TimerLimits* timer_limits,
|
||||
OEMCryptoResult ODK_ParseLicense(
|
||||
const uint8_t* message, size_t message_length, size_t core_message_length,
|
||||
bool initial_license_load, bool usage_entry_present,
|
||||
ODK_TimerLimits* timer_limits, ODK_ClockValues* clock_values,
|
||||
ODK_NonceValues* nonce_values, ODK_ParsedLicense* parsed_license);
|
||||
uint64_t system_time_seconds, ODK_TimerLimits* timer_limits,
|
||||
ODK_ClockValues* clock_values, ODK_NonceValues* nonce_values,
|
||||
ODK_ParsedLicense* parsed_license, uint64_t* timer_value);
|
||||
|
||||
/**
|
||||
* The function ODK_ParseRenewal will parse the message and verify its
|
||||
@@ -564,7 +608,8 @@ OEMCryptoResult ODK_ParseLicense(
|
||||
* @param[in] message_length: length of the entire message buffer.
|
||||
* @param[in] core_message_size: length of the core message, at the beginning of
|
||||
* the message buffer.
|
||||
* @param[in] nonce_values: pointer to the session's nonce data.
|
||||
* @param[in,out] nonce_values: pointer to the session's nonce data. These might
|
||||
* be updated if the server returns a lower API version.
|
||||
* @param[in] system_time_seconds: the current time on OEMCrypto's clock, in
|
||||
* seconds.
|
||||
* @param[in] timer_limits: timer limits specified in the license.
|
||||
@@ -591,7 +636,7 @@ OEMCryptoResult ODK_ParseLicense(
|
||||
*/
|
||||
OEMCryptoResult ODK_ParseRenewal(const uint8_t* message, size_t message_length,
|
||||
size_t core_message_length,
|
||||
const ODK_NonceValues* nonce_values,
|
||||
ODK_NonceValues* nonce_values,
|
||||
uint64_t system_time_seconds,
|
||||
const ODK_TimerLimits* timer_limits,
|
||||
ODK_ClockValues* clock_values,
|
||||
@@ -604,8 +649,8 @@ OEMCryptoResult ODK_ParseRenewal(const uint8_t* message, size_t message_length,
|
||||
* If the message does not parse correctly, ODK_ParseProvisioning will return
|
||||
* an error that OEMCrypto should return to the CDM layer above.
|
||||
*
|
||||
* If the API in the message is larger than 16, then ODK_UNSUPPORTED_API is
|
||||
* returned.
|
||||
* If the API in the message is larger than ODK_MAJOR_VERSION, then
|
||||
* ODK_UNSUPPORTED_API is returned.
|
||||
*
|
||||
* ODK_ParseProvisioning shall verify that nonce_values->nonce and
|
||||
* nonce_values->session_id are the same as those in the message. Otherwise
|
||||
@@ -620,11 +665,13 @@ OEMCryptoResult ODK_ParseRenewal(const uint8_t* message, size_t message_length,
|
||||
* @param[in] message_length: length of the entire message buffer.
|
||||
* @param[in] core_message_size: length of the core message, at the beginning of
|
||||
* the message buffer.
|
||||
* @param[in] nonce_values: pointer to the session's nonce data.
|
||||
* @param[in/out] nonce_values: pointer to the session's nonce data. These might
|
||||
* be updated if the server returns a lower API version.
|
||||
* @param[in] device_id: a pointer to a buffer containing the device ID of the
|
||||
* device. The ODK function will verify it matches that in the message.
|
||||
* @param[in] device_id_length: the length of the device ID.
|
||||
* @param[out] parsed_response: destination for the parse data.
|
||||
* @param[out] counter_info: destination for counter portion of parse data.
|
||||
* @param[out] parsed_response: destination for response portion of parse data.
|
||||
*
|
||||
* @retval OEMCrypto_SUCCESS
|
||||
* @retval ODK_ERROR_CORE_MESSAGE: the message did not parse correctly, or there
|
||||
@@ -638,9 +685,45 @@ OEMCryptoResult ODK_ParseRenewal(const uint8_t* message, size_t message_length,
|
||||
*/
|
||||
OEMCryptoResult ODK_ParseProvisioning(
|
||||
const uint8_t* message, size_t message_length, size_t core_message_length,
|
||||
const ODK_NonceValues* nonce_values, const uint8_t* device_id,
|
||||
ODK_NonceValues* nonce_values, const uint8_t* device_id,
|
||||
size_t device_id_length, ODK_ParsedProvisioning* parsed_response);
|
||||
|
||||
/**
|
||||
* The function ODK_ParseProvisioning40 will parse the message and verify the
|
||||
* nonce values match those in the request.
|
||||
*
|
||||
* If the message does not parse correctly, ODK_ParseProvisioning40 will return
|
||||
* an error that OEMCrypto should return to the CDM layer above.
|
||||
*
|
||||
* If the API in the message is larger than ODK_MAJOR_VERSION, then
|
||||
* ODK_UNSUPPORTED_API is returned.
|
||||
*
|
||||
* ODK_ParseProvisioning40 shall verify that nonce_values->nonce and
|
||||
* nonce_values->session_id are the same as those in the message. Otherwise
|
||||
* it shall return OEMCrypto_ERROR_INVALID_NONCE.
|
||||
*
|
||||
* @param[in] message: pointer to the message buffer.
|
||||
* @param[in] message_length: length of the entire message buffer.
|
||||
* @param[in] core_message_size: length of the core message, at the beginning of
|
||||
* the message buffer.
|
||||
* @param[in,out] nonce_values: pointer to the session's nonce data. These might
|
||||
* be updated if the server returns a lower API version.
|
||||
*
|
||||
* @retval OEMCrypto_SUCCESS
|
||||
* @retval ODK_ERROR_CORE_MESSAGE: the message did not parse correctly, or there
|
||||
* were other incorrect values. An error should be returned to the CDM
|
||||
* layer.
|
||||
* @retval ODK_UNSUPPORTED_API
|
||||
* @retval OEMCrypto_ERROR_INVALID_NONCE
|
||||
*
|
||||
* @version
|
||||
* This method is new in version 18 of the API.
|
||||
*/
|
||||
OEMCryptoResult ODK_ParseProvisioning40(const uint8_t* message,
|
||||
size_t message_length,
|
||||
size_t core_message_length,
|
||||
ODK_NonceValues* nonce_values);
|
||||
|
||||
/**
|
||||
* The function ODK_ParseProvisioning will parse the message and verify the
|
||||
* API version is at most the version passed in.
|
||||
|
||||
Reference in New Issue
Block a user