From 1e86226c8a6c2f0f6fe262e5e4b9c5f01f5ce272 Mon Sep 17 00:00:00 2001 From: Joy Latten Date: Wed, 29 Oct 2014 15:23:12 -0500 Subject: [PATCH 2/2] Correctly declare OAEP parameter in RSA Wrap tests to prevent a possible scope issue. Signed-off-by: Joy Latten --- testcases/crypto/rsa_func.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testcases/crypto/rsa_func.c b/testcases/crypto/rsa_func.c index 36fe75b..89eb7d4 100644 --- a/testcases/crypto/rsa_func.c +++ b/testcases/crypto/rsa_func.c @@ -725,6 +725,7 @@ CK_RV do_WrapUnwrapRSA(struct GENERATED_TEST_SUITE_INFO *tsuite) CK_BYTE re_cipher[32]; CK_ULONG cipher_len = 32; CK_ULONG re_cipher_len = 32; + CK_RSA_PKCS_OAEP_PARAMS oaep_params; char *s; @@ -802,8 +803,6 @@ CK_RV do_WrapUnwrapRSA(struct GENERATED_TEST_SUITE_INFO *tsuite) // get wrapping mechanism wrap_mech = tsuite->mech; if (wrap_mech.mechanism == CKM_RSA_PKCS_OAEP) { - CK_RSA_PKCS_OAEP_PARAMS oaep_params; - oaep_params = tsuite->tv[i].oaep_params; wrap_mech.pParameter = &oaep_params; wrap_mech.ulParameterLen = sizeof(CK_RSA_PKCS_OAEP_PARAMS); -- 2.1.0