From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6C9247E24 for ; Wed, 12 Oct 2016 08:43:41 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP; 11 Oct 2016 23:43:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,332,1473145200"; d="scan'208";a="18796981" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga005.jf.intel.com with ESMTP; 11 Oct 2016 23:43:36 -0700 Date: Wed, 12 Oct 2016 14:44:24 +0800 From: Yuanhan Liu To: Arek Kusztal Cc: dpdk stable , Deepak Kumar Jain Message-ID: <57fddbc8.QhSM4ynkQG6PR1F8%yuanhan.liu@linux.intel.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [dpdk-stable] patch 'app/test: fix verification of digest for GCM' has been queued to stable release 16.07.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 06:43:42 -0000 Hi, FYI, your patch has been queued to stable release 16.07.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before this Friday. So please shutout if anyone has objections. Thanks. --yliu --- >>From f8a8e20ad961e16998cb717263c8ddaaa58da027 Mon Sep 17 00:00:00 2001 From: Arek Kusztal Date: Thu, 22 Sep 2016 11:45:55 +0100 Subject: [PATCH] app/test: fix verification of digest for GCM [ upstream commit 77debbbfdf18e314ce9c0286fe10e3998f27b1d9 ] This patch fixes verification of digest in test_cryptodev.c file for AES GCM test cases. Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations") Signed-off-by: Arek Kusztal Acked-by: Deepak Kumar Jain --- app/test/test_cryptodev.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 647787d..afc02aa 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -2988,13 +2988,13 @@ test_snow3g_encrypted_authentication_test_case_1(void) static int create_gcm_session(uint8_t dev_id, enum rte_crypto_cipher_operation op, const uint8_t *key, const uint8_t key_len, - const uint8_t aad_len, const uint8_t auth_len) + const uint8_t aad_len, const uint8_t auth_len, + enum rte_crypto_auth_operation auth_op) { uint8_t cipher_key[key_len]; struct crypto_unittest_params *ut_params = &unittest_params; - memcpy(cipher_key, key, key_len); /* Setup Cipher Parameters */ @@ -3002,7 +3002,7 @@ create_gcm_session(uint8_t dev_id, enum rte_crypto_cipher_operation op, ut_params->cipher_xform.next = NULL; ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_GCM; - ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE; + ut_params->auth_xform.auth.op = auth_op; ut_params->cipher_xform.cipher.op = op; ut_params->cipher_xform.cipher.key.data = cipher_key; ut_params->cipher_xform.cipher.key.length = key_len; @@ -3057,8 +3057,6 @@ create_gcm_operation(enum rte_crypto_cipher_operation op, struct rte_crypto_sym_op *sym_op = ut_params->op->sym; - - sym_op->auth.digest.data = (uint8_t *)rte_pktmbuf_append( ut_params->ibuf, auth_tag_len); TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data, @@ -3139,7 +3137,8 @@ test_mb_AES_GCM_authenticated_encryption(const struct gcm_test_data *tdata) retval = create_gcm_session(ts_params->valid_devs[0], RTE_CRYPTO_CIPHER_OP_ENCRYPT, tdata->key.data, tdata->key.len, - tdata->aad.len, tdata->auth_tag.len); + tdata->aad.len, tdata->auth_tag.len, + RTE_CRYPTO_AUTH_OP_GENERATE); if (retval < 0) return retval; @@ -3269,7 +3268,8 @@ test_mb_AES_GCM_authenticated_decryption(const struct gcm_test_data *tdata) retval = create_gcm_session(ts_params->valid_devs[0], RTE_CRYPTO_CIPHER_OP_DECRYPT, tdata->key.data, tdata->key.len, - tdata->aad.len, tdata->auth_tag.len); + tdata->aad.len, tdata->auth_tag.len, + RTE_CRYPTO_AUTH_OP_VERIFY); if (retval < 0) return retval; -- 1.9.0