From 0d4936b25f6e5975f34c41af829b2b43ff4246e5 Mon Sep 17 00:00:00 2001 From: Daniel Cardenas Date: Thu, 8 Jun 2017 21:42:14 +0000 Subject: Revert "Fugu-O supprot OEMCrypto v13" This reverts commit e77eb9ff32db2ff5e3c4bcdac39490f5c7b726ac. Bug: 35949668 Change-Id: I3660feb84c6aeaef6af115a66ffeb55e3bac7ef2 Test: Netflix, youtube, play movies. --- DRM/cc54/inc/wv_mod_drm_api.h | 87 ++++------------------------------------ DRM/cc54/inc/wv_mod_drm_error.h | 12 +----- DRM/cc54/inc/wv_mod_oem_crypto.h | 10 ----- 3 files changed, 9 insertions(+), 100 deletions(-) diff --git a/DRM/cc54/inc/wv_mod_drm_api.h b/DRM/cc54/inc/wv_mod_drm_api.h index d3be933..4e5cab0 100755 --- a/DRM/cc54/inc/wv_mod_drm_api.h +++ b/DRM/cc54/inc/wv_mod_drm_api.h @@ -165,8 +165,7 @@ uint32_t drm_wv_mod_v9_load_keys(uint32_t session_id, uint32_t num_keys, const struct drm_wv_mod_key_object *key_array, const uint8_t *pst, - uint32_t pst_length, - const uint8_t *srm_restriction_data); + uint32_t pst_length); uint32_t drm_wv_mod_v9_generate_rsa_signature(uint32_t session_id, const uint8_t *message, @@ -214,6 +213,7 @@ uint32_t drm_wv_mod_load_usage_table(const uint8_t *const usage_table_data, * Flag indicating if the table has changed since the last * update_usage_table or load_usage_table call. * + * TODO: Return documentation */ uint32_t drm_wv_mod_update_usage_table(uint8_t *const usage_table_data, uint32_t data_size, @@ -221,8 +221,8 @@ uint32_t drm_wv_mod_update_usage_table(uint8_t *const usage_table_data, // NOTE: drm_wv_mod_update_usage_table shall be called after calling this // function -uint32_t drm_wv_mod_deactivate_usage_entry(uint32_t session_id, - const uint8_t *const pst, +// TODO: Documentation +uint32_t drm_wv_mod_deactivate_usage_entry(const uint8_t *const pst, uint32_t pst_length); /** @@ -243,6 +243,7 @@ uint32_t drm_wv_mod_deactivate_usage_entry(uint32_t session_id, * sizeof(struct OEMCrypto_PST_Report) in length. If extra space is provided, * this field will reflect the actual size of the returned report. * + * TODO: Return documentation */ uint32_t drm_wv_mod_report_usage(uint32_t session_id, const uint8_t *const pst, @@ -270,6 +271,7 @@ uint32_t drm_wv_mod_report_usage(uint32_t session_id, * @param[in] signature_length * Length of signature buffer in bytes * + * TODO: Return Documentation */ uint32_t drm_wv_mod_delete_usage_entry(uint32_t session_id, const uint8_t *const pst, @@ -281,6 +283,7 @@ uint32_t drm_wv_mod_delete_usage_entry(uint32_t session_id, // This will only clear Chaabi TEE memory. Caller is responsible for deleting // usage table file from file system. +// TODO: Documentation uint32_t drm_wv_mod_delete_usage_table(void); @@ -347,80 +350,4 @@ uint32_t drm_wv_mod_glue_block(uint32_t session_id, uint32_t cleartext_length, const uint8_t *iv); -/*! Version 13 specific APIs */ - -/*! - * Create a new Usage Table Header with no entries. - */ -uint32_t drm_wv_mod_create_usage_table_header(uint8_t *header_buffer, - uint32_t *header_buffer_length, - uint64_t system_time); - -/*! - * Loads the usage table header into TEE. - */ -uint32_t drm_wv_mod_load_usage_table_header(const uint8_t *buffer, - uint32_t buffer_length, - uint64_t system_time); - -/*! - * Create a new usage entry. - */ -uint32_t drm_wv_mod_create_new_usage_entry(uint32_t session_id, - uint32_t *usage_entry_number); - -/*! - * Load a usage table saved by update usage entry. - */ -uint32_t drm_wv_mod_load_usage_entry(uint32_t session_id, - uint32_t index, - const uint8_t *buffer, - uint32_t buffer_length); - -/*! - * Updates session usage entry. - */ -uint32_t drm_wv_mod_update_usage_entry(uint32_t session_id, - uint8_t *header_buffer, - uint32_t *header_buffer_length, - uint8_t *entry_buffer, - uint32_t *entry_buffer_length); - -/*! - * Move usage entry with current session from one location in header to another. - */ -uint32_t drm_wv_mod_move_entry(uint32_t session_id, - uint32_t new_index); - -/*! - * Shrinks the usage table and the header. - */ -uint32_t drm_wv_mod_shrink_usage_table_header(uint32_t new_entry_count, - uint8_t *header_buffer, - uint32_t *header_buffer_length); - -/*! - * Copies an entry from old v12(or earlier) usage table to new table. - */ -uint32_t drm_wv_mod_copy_old_usage_entry(uint32_t session_id, - const uint8_t *pst, - uint32_t pst_length); - -/*! - * Delete the old usage table. - */ -uint32_t drm_wv_mod_delete_old_usage_table(void); - -/*! - * Create old usage entry. - */ -uint32_t drm_wv_mod_create_old_usage_entry(uint64_t time_since_license_received, - uint64_t time_since_first_decrypt, - uint64_t time_since_last_decrypt, - enum drm_wv_mod_usage_entry_status status, - uint8_t *server_mac_key, - uint8_t *client_mac_key, - const uint8_t *pst, - uint32_t pst_length); - #endif /* __WV_MOD_DRM_API_H_ */ diff --git a/DRM/cc54/inc/wv_mod_drm_error.h b/DRM/cc54/inc/wv_mod_drm_error.h index 6b33d08..b10c2eb 100755 --- a/DRM/cc54/inc/wv_mod_drm_error.h +++ b/DRM/cc54/inc/wv_mod_drm_error.h @@ -58,7 +58,7 @@ enum drm_wv_mod_result DRM_WV_MOD_ENCRYPTION_DECRYPTION_SIZE_INCORRECT, DRM_WV_MOD_ERROR_BUFFER_TOO_SMALL, DRM_WV_MOD_ERROR_BUFFER_TYPE_INVALID, - DRM_WV_MOD_ERROR_BUFFER_TOO_LARGE, + DRM_WV_MOD_ERROR_DATA_SIZE_TOO_LARGE, DRM_WV_MOD_ERROR_RETURN_BUFFER_TOO_SMALL, DRM_WV_MOD_ERROR_DMA_DATA_SIZE_TOO_LARGE, DRM_WV_MOD_ERROR_NONCE_GENERATION_FAILURE, @@ -74,15 +74,7 @@ enum drm_wv_mod_result DRM_WV_MOD_ERROR_INVALID_USAGE_TABLE_GENERATION_NUM, DRM_WV_MOD_ERROR_INVALID_USAGE_TABLE_MAGIC, DRM_WV_MOD_ERROR_USAGE_TABLE_NOT_INITIALIZED, - DRM_WV_MOD_ERROR_INVALID_CIPHER_MODE, - DRM_WV_MOD_ERROR_GENERATION_NUM_SKEW, - DRM_WV_MOD_WARNING_GENERATION_NUM_SKEW, - DRM_WV_MOD_ERROR_ENTRY_IN_USE, - DRM_WV_MOD_ERROR_ENTRY_NEEDS_UPDATE, - DRM_WV_MOD_ERROR_ANALOG_OUTPUT, - DRM_WV_MOD_ERROR_WRONG_PST, - DRM_WV_MOD_ERROR_MISSING_MASTER, - DRM_WV_MOD_ERROR_LICENSE_INACTIVE + DRM_WV_MOD_ERROR_INVALID_CIPHER_MODE }; #endif diff --git a/DRM/cc54/inc/wv_mod_oem_crypto.h b/DRM/cc54/inc/wv_mod_oem_crypto.h index bdba935..42ed033 100755 --- a/DRM/cc54/inc/wv_mod_oem_crypto.h +++ b/DRM/cc54/inc/wv_mod_oem_crypto.h @@ -32,16 +32,6 @@ enum drm_wv_mod_rsa_padding_scheme DRM_WV_MOD_RSA_PADDING_SCHEME_MAX_VALUE }; -enum drm_wv_mod_usage_entry_status -{ - k_free = -1, - k_unused = 0, - k_active = 1, - k_inactive = 2, // deprecated in v13 - k_inactive_used = 3, - k_inactive_unused = 4 -}; - struct drm_wv_mod_key_object { const uint8_t *key_id; -- cgit v1.2.3