Update to ODK v18.3

This commit is contained in:
Jacob Trimble
2023-07-20 18:11:31 +00:00
parent 2bfd670424
commit 74178f968f
39 changed files with 14570 additions and 600 deletions

View File

@@ -106,6 +106,8 @@ typedef enum OEMCryptoResult {
OPK_ERROR_REMOTE_CALL = OPK_ERROR_BASE,
OPK_ERROR_INCOMPATIBLE_VERSION = OPK_ERROR_BASE + 1,
OPK_ERROR_NO_PERSISTENT_DATA = OPK_ERROR_BASE + 2,
OPK_ERROR_PREHOOK_FAILURE = OPK_ERROR_BASE + 3,
OPK_ERROR_POSTHOOK_FAILURE = OPK_ERROR_BASE + 4,
} OEMCryptoResult;
/* clang-format on */
@@ -139,11 +141,23 @@ typedef enum OEMCrypto_LicenseType {
typedef enum OEMCrypto_PrivateKeyType {
OEMCrypto_RSA_Private_Key = 0,
OEMCrypto_ECC_Private_Key = 1,
OEMCrypto_PrivateKeyType_MaxValue = OEMCrypto_ECC_Private_Key,
} OEMCrypto_PrivateKeyType;
/**
* Used to indicate a substring of a signed message in OEMCrypto_LoadKeys and
* other functions which must verify that a parameter is contained within a
* The base for (delayed) timers, i.e. from what time the (delayed) timer
* starts.
*/
typedef enum OEMCrypto_TimerDelayBase {
OEMCrypto_License_Start = 0,
OEMCrypto_License_Load = 1,
OEMCrypto_First_Decrypt = 2,
OEMCrypto_TimerDelayBase_MaxValue = OEMCrypto_First_Decrypt,
} OEMCrypto_TimerDelayBase;
/**
* Used to indicate a substring of a signed message in ODK_ParseLicense
* and other functions which must verify that a parameter is contained within a
* signed message.
*/
typedef struct {
@@ -209,7 +223,7 @@ typedef struct {
/**
* Points to the relevant fields for a content key. The fields are extracted
* from the License Response message offered to OEMCrypto_LoadKeys(). Each
* from the License Response message offered to ODK_ParseLicense(). Each
* field points to one of the components of the key. Key data, key control,
* and both IV fields are 128 bits (16 bytes):
* @param key_id: the unique id of this key.
@@ -226,7 +240,7 @@ typedef struct {
* the content key from the key_data field.
*
* The memory for the OEMCrypto_KeyObject fields is allocated and freed
* by the caller of OEMCrypto_LoadKeys().
* by the caller of ODK_ParseLicense().
*/
typedef struct {
OEMCrypto_Substring key_id;