diff options
author | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:24:58 -0600 |
---|---|---|
committer | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:24:58 -0600 |
commit | 7e1a2d1ce76600d707807545a3f8ed95c14a12ed (patch) | |
tree | b95952a96a4f004205a39c9d4591fc923f5e6aa1 /drivers | |
parent | d8749be38fee07bde24f77bedb122c9c2cdf8377 (diff) |
CR ENGR00046932 - Sahara build warnings are resolved.
Patch for CR ENGR00046932 - Sahara build warnings are resolved.
Removed unsupported SSL code. Applies to linux 2.6.22 kernel
for MX platforms.
http://www.bitshrine.org/gpp/linux-2.6.22-mx-CR-ENGR00046932-Sahara-build-warnings-are-.patch
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mxc/security/rng/include/shw_driver.h | 6 | ||||
-rw-r--r-- | drivers/mxc/security/sahara2/fsl_shw_auth.c | 105 | ||||
-rw-r--r-- | drivers/mxc/security/sahara2/include/sahara.h | 6 |
3 files changed, 0 insertions, 117 deletions
diff --git a/drivers/mxc/security/rng/include/shw_driver.h b/drivers/mxc/security/rng/include/shw_driver.h index 79b20757932e..f0d1576a8fc9 100644 --- a/drivers/mxc/security/rng/include/shw_driver.h +++ b/drivers/mxc/security/rng/include/shw_driver.h @@ -223,12 +223,6 @@ typedef enum fsl_shw_acc_mode_t { * be non-multiple of block size. This mode may be used for AES. */ FSL_ACC_MODE_CCM, - /*! - * SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). - * Needs one key object for encryption, another for the HMAC. The usual - * hashing and symmetric encryption algorithms are supported. - */ - FSL_ACC_MODE_SSL } fsl_shw_acc_mode_t; /* REQ-FSLSHW-PINTFC-COA-HCO-001 */ diff --git a/drivers/mxc/security/sahara2/fsl_shw_auth.c b/drivers/mxc/security/sahara2/fsl_shw_auth.c index a5aac3ff7649..edbaf6488a44 100644 --- a/drivers/mxc/security/sahara2/fsl_shw_auth.c +++ b/drivers/mxc/security/sahara2/fsl_shw_auth.c @@ -448,100 +448,6 @@ static inline fsl_shw_return_t encrypt_mac(sah_Head_Desc ** desc_chain, return status; } -#if SUPPORT_SSL -/*! - * Generate an SSL value - * - * @param user_ctx Info for acquiring memory - * @param auth_ctx Info for CTR0, size of MAC - * @param cipher_key_info - * @param auth_key_info - * @param auth_data_length - * @param auth_data - * @param payload_length - * @param payload - * @param ct - * @param auth_value - * - * @return A return code of type #fsl_shw_return_t. - */ -static fsl_shw_return_t do_ssl_gen(fsl_shw_uco_t * user_ctx, - fsl_shw_acco_t * auth_ctx, - fsl_shw_sko_t * cipher_key_info, - fsl_shw_sko_t * auth_key_info, - uint32_t auth_data_length, - const uint8_t * auth_data, - uint32_t payload_length, - const uint8_t * payload, - uint8_t * ct, uint8_t * auth_value) -{ - SAH_SF_DCLS; - uint8_t *ptr1 = NULL; - - /* Assume one-shot init-finalize... no precomputes */ - header = SAH_HDR_MDHA_SET_MODE_MD_KEY ^ - sah_insert_mdha_algorithm[auth_ctx->auth_info.hash_ctx_info. - algorithm] ^ sah_insert_mdha_init ^ - sah_insert_mdha_ssl ^ sah_insert_mdha_pdata ^ - sah_insert_mdha_mac_full; - - /* set up hmac */ - DESC_IN_KEY(header, 0, NULL, auth_key_info); - - /* This is wrong -- need to find 16 extra bytes of data from - * somewhere */ - DESC_IN_OUT(SAH_HDR_MDHA_HASH, payload_length, payload, 1, auth_value); - - /* set up encrypt */ - header = SAH_HDR_SKHA_SET_MODE_IV_KEY - ^ sah_insert_skha_mode[auth_ctx->cipher_ctx_info.mode] - ^ sah_insert_skha_encrypt - ^ sah_insert_skha_algorithm[cipher_key_info->algorithm]; - - /* Honor 'no key parity checking' for DES and TDES */ - if ((cipher_key_info->flags & FSL_SKO_KEY_IGNORE_PARITY) && - ((cipher_key_info->algorithm == FSL_KEY_ALG_DES) || - (cipher_key_info->algorithm == FSL_KEY_ALG_TDES))) { - header ^= sah_insert_skha_no_key_parity; - } - - if (auth_ctx->cipher_ctx_info.mode == FSL_SYM_MODE_CTR) { - header ^= - sah_insert_skha_modulus[auth_ctx->cipher_ctx_info. - modulus_exp]; - } - - if ((auth_ctx->cipher_ctx_info.mode == FSL_SYM_MODE_ECB) - || (auth_ctx->cipher_ctx_info.flags & FSL_SYM_CTX_INIT)) { - ptr1 = block_zeros; - } else { - ptr1 = auth_ctx->cipher_ctx_info.context; - } - - DESC_IN_KEY(header, auth_ctx->cipher_ctx_info.block_size_bytes, ptr1, - cipher_key_info); - - /* This is wrong -- need to find 16 extra bytes of data from - * somewhere... - */ - if (payload_length != 0) { - DESC_IN_OUT(SAH_HDR_SKHA_ENC_DEC, - payload_length, payload, payload_length, ct); - } - - SAH_SF_EXECUTE(); - - out: - SAH_SF_DESC_CLEAN(); - - /* Eliminate compiler warnings until full implementation... */ - (void)auth_data; - (void)auth_data_length; - - return ret; -} /* do_ssl_gen() */ -#endif - /*! * @brief Generate a (CCM) auth code and encrypt the payload. * @@ -594,17 +500,6 @@ fsl_shw_return_t fsl_shw_gen_encrypt(fsl_shw_uco_t * user_ctx, SAH_SF_USER_CHECK(); - if (auth_ctx->mode == FSL_ACC_MODE_SSL) { -#if SUPPORT_SSL - ret = do_ssl_gen(user_ctx, auth_ctx, cipher_key_info, - auth_key_info, auth_data_length, auth_data, - payload_length, payload, ct, auth_value); -#else - ret = FSL_RETURN_BAD_MODE_S; -#endif - return ret; - } - if (auth_ctx->mode != FSL_ACC_MODE_CCM) { ret = FSL_RETURN_BAD_MODE_S; goto out; diff --git a/drivers/mxc/security/sahara2/include/sahara.h b/drivers/mxc/security/sahara2/include/sahara.h index b7681e0c34ec..c40a70241f21 100644 --- a/drivers/mxc/security/sahara2/include/sahara.h +++ b/drivers/mxc/security/sahara2/include/sahara.h @@ -373,12 +373,6 @@ typedef enum fsl_shw_acc_mode_t { * be non-multiple of block size. This mode may be used for AES. */ FSL_ACC_MODE_CCM, - /*! - * SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). - * Needs one key object for encryption, another for the HMAC. The usual - * hashing and symmetric encryption algorithms are supported. - */ - FSL_ACC_MODE_SSL, } fsl_shw_acc_mode_t; /* REQ-S2LRD-PINTFC-COA-HCO-001 */ |