File tree Expand file tree Collapse file tree 4 files changed +36
-0
lines changed
components/TARGET_PSA/TESTS/compliance_crypto Expand file tree Collapse file tree 4 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -90,12 +90,18 @@ int32_t psa_aead_encrypt_test(security_t caller)
90
90
TEST_ASSERT_EQUAL (status , PSA_SUCCESS , TEST_CHECKPOINT_NUM (5 ));
91
91
92
92
if (is_buffer_empty (check1 [i ].nonce , check1 [i ].nonce_length ) == TRUE)
93
+ {
93
94
nonce = NULL ;
95
+ check1 [i ].nonce_length = 0 ;
96
+ }
94
97
else
95
98
nonce = check1 [i ].nonce ;
96
99
97
100
if (is_buffer_empty (check1 [i ].additional_data , check1 [i ].additional_data_length ) == TRUE)
101
+ {
98
102
additional_data = NULL ;
103
+ check1 [i ].additional_data_length = 0 ;
104
+ }
99
105
else
100
106
additional_data = check1 [i ].additional_data ;
101
107
@@ -152,12 +158,18 @@ int32_t psa_aead_encrypt_negative_test(security_t caller)
152
158
check2 [i ].key_alg );
153
159
154
160
if (is_buffer_empty (check2 [i ].nonce , check2 [i ].nonce_length ) == TRUE)
161
+ {
155
162
nonce = NULL ;
163
+ check2 [i ].nonce_length = 0 ;
164
+ }
156
165
else
157
166
nonce = check2 [i ].nonce ;
158
167
159
168
if (is_buffer_empty (check2 [i ].additional_data , check2 [i ].additional_data_length ) == TRUE)
169
+ {
160
170
additional_data = NULL ;
171
+ check2 [i ].additional_data_length = 0 ;
172
+ }
161
173
else
162
174
additional_data = check2 [i ].additional_data ;
163
175
Original file line number Diff line number Diff line change @@ -89,12 +89,18 @@ int32_t psa_aead_decrypt_test(security_t caller)
89
89
TEST_ASSERT_EQUAL (status , PSA_SUCCESS , TEST_CHECKPOINT_NUM (5 ));
90
90
91
91
if (is_buffer_empty (check1 [i ].nonce , check1 [i ].nonce_length ) == TRUE)
92
+ {
92
93
nonce = NULL ;
94
+ check1 [i ].nonce_length = 0 ;
95
+ }
93
96
else
94
97
nonce = check1 [i ].nonce ;
95
98
96
99
if (is_buffer_empty (check1 [i ].additional_data , check1 [i ].additional_data_length ) == TRUE)
100
+ {
97
101
additional_data = NULL ;
102
+ check1 [i ].additional_data_length = 0 ;
103
+ }
98
104
else
99
105
additional_data = check1 [i ].additional_data ;
100
106
@@ -149,12 +155,18 @@ int32_t psa_aead_decrypt_negative_test(security_t caller)
149
155
check2 [i ].key_alg );
150
156
151
157
if (is_buffer_empty (check2 [i ].nonce , check2 [i ].nonce_length ) == TRUE)
158
+ {
152
159
nonce = NULL ;
160
+ check2 [i ].nonce_length = 0 ;
161
+ }
153
162
else
154
163
nonce = check2 [i ].nonce ;
155
164
156
165
if (is_buffer_empty (check2 [i ].additional_data , check2 [i ].additional_data_length ) == TRUE)
166
+ {
157
167
additional_data = NULL ;
168
+ check2 [i ].additional_data_length = 0 ;
169
+ }
158
170
else
159
171
additional_data = check2 [i ].additional_data ;
160
172
Original file line number Diff line number Diff line change @@ -128,7 +128,10 @@ int32_t psa_asymmetric_encrypt_test(security_t caller)
128
128
TEST_ASSERT_EQUAL (status , PSA_SUCCESS , TEST_CHECKPOINT_NUM (5 ));
129
129
130
130
if (is_buffer_empty (check1 [i ].salt , check1 [i ].salt_length ) == TRUE)
131
+ {
131
132
salt = NULL ;
133
+ check1 [i ].salt_length = 0 ;
134
+ }
132
135
else
133
136
salt = check1 [i ].salt ;
134
137
@@ -223,7 +226,10 @@ int32_t psa_asymmetric_encrypt_negative_test(security_t caller)
223
226
TEST_ASSERT_EQUAL (status , PSA_SUCCESS , TEST_CHECKPOINT_NUM (6 ));
224
227
225
228
if (is_buffer_empty (check1 [i ].salt , check1 [i ].salt_length ) == TRUE)
229
+ {
226
230
salt = NULL ;
231
+ check1 [i ].salt_length = 0 ;
232
+ }
227
233
else
228
234
salt = check1 [i ].salt ;
229
235
Original file line number Diff line number Diff line change @@ -128,7 +128,10 @@ int32_t psa_asymmetric_decrypt_test(security_t caller)
128
128
TEST_ASSERT_EQUAL (status , PSA_SUCCESS , TEST_CHECKPOINT_NUM (5 ));
129
129
130
130
if (is_buffer_empty (check1 [i ].salt , check1 [i ].salt_length ) == TRUE)
131
+ {
131
132
salt = NULL ;
133
+ check1 [i ].salt_length = 0 ;
134
+ }
132
135
else
133
136
salt = check1 [i ].salt ;
134
137
@@ -209,7 +212,10 @@ int32_t psa_asymmetric_decrypt_negative_test(security_t caller)
209
212
TEST_ASSERT_EQUAL (status , PSA_SUCCESS , TEST_CHECKPOINT_NUM (6 ));
210
213
211
214
if (is_buffer_empty (check1 [i ].salt , check1 [i ].salt_length ) == TRUE)
215
+ {
212
216
salt = NULL ;
217
+ check1 [i ].salt_length = 0 ;
218
+ }
213
219
else
214
220
salt = check1 [i ].salt ;
215
221
You can’t perform that action at this time.
0 commit comments