summaryrefslogtreecommitdiff
path: root/test/params_api_test.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-04-08 14:28:59 +1000
committerPauli <paul.dale@oracle.com>2019-04-08 14:28:59 +1000
commite9cfa192019574a75fbeca4811c10635a9049381 (patch)
treeeb27d30ad2ead0dc6492a5e2c746415d0e40e85b /test/params_api_test.c
parentf997e456b9bd43af275aab90c727a52287467e98 (diff)
downloadopenssl-new-e9cfa192019574a75fbeca4811c10635a9049381.tar.gz
Avoid alignment problems in params API.
Using a byte buffer causes problems for device that don't handle unaligned reads. Instead use the properly aligned variable that was already pointed at. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8696)
Diffstat (limited to 'test/params_api_test.c')
-rw-r--r--test/params_api_test.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/test/params_api_test.c b/test/params_api_test.c
index 94487d613b..c78a42bade 100644
--- a/test/params_api_test.c
+++ b/test/params_api_test.c
@@ -146,7 +146,6 @@ static int test_param_int(int n)
if (!TEST_mem_eq(cmp, len, raw_values[n].value, len))
return 0;
in = 0;
- param.data = buf;
if (!TEST_true(OSSL_PARAM_get_int(&param, &in)))
return 0;
le_copy(cmp, &in, sizeof(in));
@@ -174,7 +173,6 @@ static int test_param_long(int n)
if (!TEST_mem_eq(cmp, len, raw_values[n].value, len))
return 0;
in = 0;
- param.data = buf;
if (!TEST_true(OSSL_PARAM_get_long(&param, &in)))
return 0;
le_copy(cmp, &in, sizeof(in));
@@ -201,7 +199,6 @@ static int test_param_uint(int n)
if (!TEST_mem_eq(cmp, len, raw_values[n].value, len))
return 0;
in = 0;
- param.data = buf;
if (!TEST_true(OSSL_PARAM_get_uint(&param, &in)))
return 0;
le_copy(cmp, &in, sizeof(in));
@@ -229,7 +226,6 @@ static int test_param_ulong(int n)
if (!TEST_mem_eq(cmp, len, raw_values[n].value, len))
return 0;
in = 0;
- param.data = buf;
if (!TEST_true(OSSL_PARAM_get_ulong(&param, &in)))
return 0;
le_copy(cmp, &in, sizeof(in));
@@ -257,7 +253,6 @@ static int test_param_int32(int n)
if (!TEST_mem_eq(cmp, len, raw_values[n].value, len))
return 0;
in = 0;
- param.data = buf;
if (!TEST_true(OSSL_PARAM_get_int32(&param, &in)))
return 0;
le_copy(cmp, &in, sizeof(in));
@@ -285,7 +280,6 @@ static int test_param_uint32(int n)
if (!TEST_mem_eq(cmp, len, raw_values[n].value, len))
return 0;
in = 0;
- param.data = buf;
if (!TEST_true(OSSL_PARAM_get_uint32(&param, &in)))
return 0;
le_copy(cmp, &in, sizeof(in));
@@ -313,7 +307,6 @@ static int test_param_int64(int n)
if (!TEST_mem_eq(cmp, len, raw_values[n].value, len))
return 0;
in = 0;
- param.data = buf;
if (!TEST_true(OSSL_PARAM_get_int64(&param, &in)))
return 0;
le_copy(cmp, &in, sizeof(in));
@@ -341,7 +334,6 @@ static int test_param_uint64(int n)
if (!TEST_mem_eq(cmp, len, raw_values[n].value, len))
return 0;
in = 0;
- param.data = buf;
if (!TEST_true(OSSL_PARAM_get_uint64(&param, &in)))
return 0;
le_copy(cmp, &in, sizeof(in));
@@ -369,7 +361,6 @@ static int test_param_size_t(int n)
if (!TEST_mem_eq(cmp, len, raw_values[n].value, len))
return 0;
in = 0;
- param.data = buf;
if (!TEST_true(OSSL_PARAM_get_size_t(&param, &in)))
return 0;
le_copy(cmp, &in, sizeof(in));