2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
17 * @file test_cases.cpp
18 * @author Dongsun Lee (ds73.lee@samsung.com)
20 * @brief tests for SE Backend
22 #include <boost/test/unit_test.hpp>
25 #include <key-manager-se-backend.h>
27 BOOST_AUTO_TEST_SUITE(USER)
29 BOOST_AUTO_TEST_SUITE(SE_EMUL);
31 void _print_bin(char *bin, uint32_t len) {
32 for(uint32_t i=0; i<len; i++) {
33 printf("%02X, ", 0x00FF & bin[i]);
40 bool key_exist = true;
41 kmsb_error_e ret = KMSB_ERROR_NONE;
43 unsigned char input[32] = {0x01};
44 unsigned char iv[16] = {0x02};
45 unsigned char *output = NULL;
46 unsigned int output_len = 0;
48 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
51 &output, &output_len);
52 if (ret == KMSB_ERROR_NO_KEY)
55 BOOST_TEST_MESSAGE( "Check Existence of DB Protection Key : Exist=" << std::boolalpha << key_exist );
59 struct dbp_key_checker
63 boost::test_tools::assertion_result operator()(boost::unit_test::test_unit_id)
65 return _dbp_key_exist();
69 struct no_dbp_key_checker
71 no_dbp_key_checker() {}
73 boost::test_tools::assertion_result operator()(boost::unit_test::test_unit_id)
75 return !_dbp_key_exist();
79 BOOST_AUTO_TEST_CASE(kmsb_generate_dbp_key_p,
80 * boost::unit_test::precondition(no_dbp_key_checker()))
82 kmsb_error_e ret = KMSB_ERROR_NONE;
84 unsigned char input[32] = {0x01};
85 unsigned char iv[16] = {0x02};
86 unsigned char *output = NULL;
87 unsigned int output_len = 0;
89 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
92 &output, &output_len);
93 BOOST_REQUIRE(ret == KMSB_ERROR_NO_KEY);
95 ret = kmsb_generate_dbp_key(false);
96 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
98 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
101 &output, &output_len);
102 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
103 if (output) free(output);
106 BOOST_AUTO_TEST_CASE(kmsb_generate_dbp_key_regenerate_p,
107 * boost::unit_test::precondition(dbp_key_checker()))
109 kmsb_error_e ret = kmsb_generate_dbp_key(true);
110 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
113 BOOST_AUTO_TEST_CASE(kmsb_generate_dbp_key_not_permitted_n,
114 * boost::unit_test::precondition(dbp_key_checker()))
116 kmsb_error_e ret = kmsb_generate_dbp_key(false);
117 BOOST_REQUIRE(ret == KMSB_ERROR_NOT_PERMITTED);
120 BOOST_AUTO_TEST_CASE(kmsb_encrypt_with_dbp_key_p,
121 * boost::unit_test::precondition(dbp_key_checker()))
123 kmsb_error_e ret = KMSB_ERROR_NONE;
125 unsigned char input[32] = {0x01};
126 unsigned char iv[16] = {0x02};
127 unsigned char *output1 = NULL;
128 unsigned char *output2 = NULL;
129 unsigned int output_len = 0;
131 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
132 input, sizeof(input),
134 &output1, &output_len);
135 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
136 BOOST_REQUIRE(output_len == sizeof(input));
138 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
139 input, sizeof(input),
141 &output2, &output_len);
142 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
143 BOOST_REQUIRE(output_len == sizeof(input));
145 BOOST_REQUIRE(std::memcmp(output1, output2, output_len) == 0);
147 if (output1) free(output1);
148 if (output2) free(output2);
151 BOOST_AUTO_TEST_CASE(kmsb_encrypt_with_dbp_key_invalid_parameter_n)
153 kmsb_error_e ret = KMSB_ERROR_NONE;
155 unsigned char input[32] = {0x01};
156 unsigned char iv[16] = {0x02};
157 unsigned char *output = NULL;
158 unsigned int output_len = 0;
160 ret = kmsb_encrypt_with_dbp_key(0,
161 input, sizeof(input),
163 &output, &output_len);
164 BOOST_REQUIRE(ret == KMSB_ERROR_INVALID_PARAMETER);
166 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
169 &output, &output_len);
170 BOOST_REQUIRE(ret == KMSB_ERROR_INVALID_PARAMETER);
172 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
175 &output, &output_len);
176 BOOST_REQUIRE(ret == KMSB_ERROR_INVALID_PARAMETER);
178 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
179 input, sizeof(input),
181 &output, &output_len);
182 BOOST_REQUIRE(ret == KMSB_ERROR_INVALID_PARAMETER);
184 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
185 input, sizeof(input),
187 &output, &output_len);
188 BOOST_REQUIRE(ret == KMSB_ERROR_INVALID_PARAMETER);
190 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
191 input, sizeof(input),
194 BOOST_REQUIRE(ret == KMSB_ERROR_INVALID_PARAMETER);
196 ret = kmsb_encrypt_with_dbp_key(SE_BACKEND_DBP_SCHEME_VERSION,
197 input, sizeof(input),
200 BOOST_REQUIRE(ret == KMSB_ERROR_INVALID_PARAMETER);
203 ///////////////////////////
204 const int TEST_AES_KEY_IDX = 1;
205 const int TEST_ECDSA_P192_KEY_IDX = 2;
206 const int TEST_ECDSA_P256_KEY_IDX = 3;
207 const int TEST_ECDSA_S384_KEY_IDX = 4;
209 BOOST_AUTO_TEST_CASE(kmsb_aes_cbc_encrypt_p)
211 kmsb_error_e ret = KMSB_ERROR_NONE;
213 unsigned char input[32] = {0x01};
214 unsigned char iv[16] = {0x02};
215 unsigned char *output1 = NULL;
216 unsigned char *output2 = NULL;
217 unsigned int output_len = 0;
219 kmsb_aes_param_s param;
220 param.mode = KMSB_ALGO_AES_CBC;
224 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
225 input, sizeof(input),
226 &output1, &output_len);
227 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
229 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
230 input, sizeof(input),
231 &output2, &output_len);
232 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
233 BOOST_REQUIRE(std::memcmp(output1, output2, output_len) == 0);
235 if (output1) free(output1);
236 if (output2) free(output2);
239 BOOST_AUTO_TEST_CASE(kmsb_aes_cbc_decrypt_p)
241 kmsb_error_e ret = KMSB_ERROR_NONE;
243 unsigned char input[32] = {0x01};
244 unsigned char iv[16] = {0x02};
245 unsigned char *output1 = NULL;
246 unsigned char *output2 = NULL;
247 unsigned int output_len = 0;
249 kmsb_aes_param_s param;
250 param.mode = KMSB_ALGO_AES_CBC;
254 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
255 input, sizeof(input),
256 &output1, &output_len);
257 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
259 ret = kmsb_aes_decrypt(TEST_AES_KEY_IDX, ¶m,
261 &output2, &output_len);
262 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
263 BOOST_REQUIRE(output_len == sizeof(input));
264 BOOST_REQUIRE(std::memcmp(input, output2, output_len) == 0);
266 if (output1) free(output1);
267 if (output2) free(output2);
270 BOOST_AUTO_TEST_CASE(kmsb_aes_ctr_encrypt_p)
272 kmsb_error_e ret = KMSB_ERROR_NONE;
274 unsigned char input[32] = {0x01};
275 unsigned char iv[16] = {0x02};
276 unsigned char *output1 = NULL;
277 unsigned char *output2 = NULL;
278 unsigned int output_len = 0;
280 kmsb_aes_param_s param;
281 param.mode = KMSB_ALGO_AES_CTR;
284 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
285 input, sizeof(input),
286 &output1, &output_len);
287 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
288 BOOST_REQUIRE(output_len == sizeof(input));
290 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
291 input, sizeof(input),
292 &output2, &output_len);
293 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
294 BOOST_REQUIRE(output_len == sizeof(input));
296 BOOST_REQUIRE(std::memcmp(output1, output2, output_len) == 0);
298 if (output1) free(output1);
299 if (output2) free(output2);
302 BOOST_AUTO_TEST_CASE(kmsb_aes_ctr_decrypt_p)
304 kmsb_error_e ret = KMSB_ERROR_NONE;
306 unsigned char input[32] = {0x01};
307 unsigned char iv[16] = {0x02};
308 unsigned char *output1 = NULL;
309 unsigned char *output2 = NULL;
310 unsigned int output_len = 0;
312 kmsb_aes_param_s param;
313 param.mode = KMSB_ALGO_AES_CTR;
317 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
318 input, sizeof(input),
319 &output1, &output_len);
320 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
321 BOOST_REQUIRE(output_len == sizeof(input));
323 ret = kmsb_aes_decrypt(TEST_AES_KEY_IDX, ¶m,
325 &output2, &output_len);
326 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
327 BOOST_REQUIRE(output_len == sizeof(input));
328 BOOST_REQUIRE(std::memcmp(input, output2, output_len) == 0);
330 if (output1) free(output1);
331 if (output2) free(output2);
334 BOOST_AUTO_TEST_CASE(kmsb_aes_cfb_encrypt_p)
336 kmsb_error_e ret = KMSB_ERROR_NONE;
338 unsigned char input[32] = {0x01};
339 unsigned char iv[16] = {0x02};
340 unsigned char *output1 = NULL;
341 unsigned char *output2 = NULL;
342 unsigned int output_len = 0;
344 kmsb_aes_param_s param;
345 param.mode = KMSB_ALGO_AES_CFB;
348 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
349 input, sizeof(input),
350 &output1, &output_len);
351 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
352 BOOST_REQUIRE(output_len == sizeof(input));
354 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
355 input, sizeof(input),
356 &output2, &output_len);
357 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
358 BOOST_REQUIRE(output_len == sizeof(input));
360 BOOST_REQUIRE(std::memcmp(output1, output2, output_len) == 0);
362 if (output1) free(output1);
363 if (output2) free(output2);
366 BOOST_AUTO_TEST_CASE(kmsb_aes_cfb_decrypt_p)
368 kmsb_error_e ret = KMSB_ERROR_NONE;
370 unsigned char input[32] = {0x01};
371 unsigned char iv[16] = {0x02};
372 unsigned char *output1 = NULL;
373 unsigned char *output2 = NULL;
374 unsigned int output_len = 0;
376 kmsb_aes_param_s param;
377 param.mode = KMSB_ALGO_AES_CFB;
381 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
382 input, sizeof(input),
383 &output1, &output_len);
384 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
385 BOOST_REQUIRE(output_len == sizeof(input));
387 ret = kmsb_aes_decrypt(TEST_AES_KEY_IDX, ¶m,
389 &output2, &output_len);
390 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
391 BOOST_REQUIRE(output_len == sizeof(input));
392 BOOST_REQUIRE(std::memcmp(input, output2, output_len) == 0);
394 if (output1) free(output1);
395 if (output2) free(output2);
398 BOOST_AUTO_TEST_CASE(kmsb_aes_gcm_encrypt_p)
400 kmsb_error_e ret = KMSB_ERROR_NONE;
402 unsigned char input[32] = {0x01};
403 unsigned char iv[16] = {0x02};
404 unsigned char aad[16] = {0x03};
405 unsigned char tag[16];
406 unsigned char *output1 = NULL;
407 unsigned char *output2 = NULL;
408 unsigned int output_len = 0;
410 kmsb_aes_param_s param;
411 param.mode = KMSB_ALGO_AES_GCM;
415 param.aad_len = sizeof(aad),
417 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
418 input, sizeof(input),
419 &output1, &output_len);
420 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
421 BOOST_REQUIRE(output_len == sizeof(input));
423 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
424 input, sizeof(input),
425 &output2, &output_len);
426 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
427 BOOST_REQUIRE(output_len == sizeof(input));
429 BOOST_REQUIRE(std::memcmp(output1, output2, output_len) == 0);
431 if (output1) free(output1);
432 if (output2) free(output2);
435 BOOST_AUTO_TEST_CASE(kmsb_aes_gcm_decrypt_p)
437 kmsb_error_e ret = KMSB_ERROR_NONE;
439 unsigned char input[32] = {0x01};
440 unsigned char iv[16] = {0x02};
441 unsigned char aad[16] = {0x03};
442 unsigned char tag[16];
443 unsigned char *output1 = NULL;
444 unsigned char *output2 = NULL;
445 unsigned int output_len = 0;
447 kmsb_aes_param_s param;
448 param.mode = KMSB_ALGO_AES_GCM;
452 param.aad_len = sizeof(aad);
455 ret = kmsb_aes_encrypt(TEST_AES_KEY_IDX, ¶m,
456 input, sizeof(input),
457 &output1, &output_len);
458 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
459 BOOST_REQUIRE(output_len == sizeof(input));
461 ret = kmsb_aes_decrypt(TEST_AES_KEY_IDX, ¶m,
463 &output2, &output_len);
464 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
465 BOOST_REQUIRE(output_len == sizeof(input));
466 BOOST_REQUIRE(std::memcmp(input, output2, output_len) == 0);
468 if (output1) free(output1);
469 if (output2) free(output2);
472 void test_kmsb_create_signature(int key_idx,
473 kmsb_hash_algo_e alg, kmsb_ec_type_e ec,
474 unsigned char *input, unsigned int input_len,
475 unsigned char **output, unsigned int *output_len)
477 kmsb_error_e ret = KMSB_ERROR_NONE;
478 kmsb_sign_param_s param;
480 param.hash_algo = alg;
482 ret = kmsb_create_signature(key_idx, ¶m,
485 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
488 void test_kmsb_verify_signature(int key_idx,
489 kmsb_hash_algo_e alg, kmsb_ec_type_e ec,
490 unsigned char *input, unsigned int input_len,
491 unsigned char **output, unsigned int *output_len)
493 kmsb_error_e ret = KMSB_ERROR_NONE;
494 kmsb_sign_param_s param;
496 param.hash_algo = alg;
498 ret = kmsb_create_signature(key_idx, ¶m,
501 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
503 ret = kmsb_verify_signature(key_idx, ¶m,
505 *output, *output_len);
506 BOOST_REQUIRE(ret == KMSB_ERROR_NONE);
509 BOOST_AUTO_TEST_CASE(kmsb_create_signature_sha1_p)
511 unsigned char input[32] = {0x01};
512 unsigned char *signature = NULL;
513 unsigned int signature_len = 0;
515 kmsb_hash_algo_e alg = KMSB_HASH_SHA1;
516 kmsb_ec_type_e ec = KMSB_EC_PRIME256V1;
517 test_kmsb_create_signature(TEST_ECDSA_P256_KEY_IDX, alg, ec,
518 input, sizeof(input),
519 &signature, &signature_len);
521 if (signature) free(signature);
524 BOOST_AUTO_TEST_CASE(kmsb_create_signature_sha256_p)
526 unsigned char input[32] = {0x01};
527 unsigned char *signature = NULL;
528 unsigned int signature_len = 0;
530 kmsb_hash_algo_e alg = KMSB_HASH_SHA256;
531 kmsb_ec_type_e ec = KMSB_EC_PRIME256V1;
532 test_kmsb_create_signature(TEST_ECDSA_P256_KEY_IDX, alg, ec,
533 input, sizeof(input),
534 &signature, &signature_len);
536 if (signature) free(signature);
539 BOOST_AUTO_TEST_CASE(kmsb_create_signature_sha384_p)
541 unsigned char input[32] = {0x01};
542 unsigned char *signature = NULL;
543 unsigned int signature_len = 0;
545 kmsb_hash_algo_e alg = KMSB_HASH_SHA384;
546 kmsb_ec_type_e ec = KMSB_EC_PRIME256V1;
547 test_kmsb_create_signature(TEST_ECDSA_P256_KEY_IDX, alg, ec,
548 input, sizeof(input),
549 &signature, &signature_len);
551 if (signature) free(signature);
554 BOOST_AUTO_TEST_CASE(kmsb_create_signature_sha512_p)
556 unsigned char input[32] = {0x01};
557 unsigned char *signature = NULL;
558 unsigned int signature_len = 0;
560 kmsb_hash_algo_e alg = KMSB_HASH_SHA512;
561 kmsb_ec_type_e ec = KMSB_EC_PRIME256V1;
562 test_kmsb_create_signature(TEST_ECDSA_P256_KEY_IDX, alg, ec,
563 input, sizeof(input),
564 &signature, &signature_len);
566 if (signature) free(signature);
569 BOOST_AUTO_TEST_CASE(kmsb_create_signature_p192v1_p)
571 unsigned char input[32] = {0x01};
572 unsigned char *signature = NULL;
573 unsigned int signature_len = 0;
575 kmsb_hash_algo_e alg = KMSB_HASH_SHA256;
576 kmsb_ec_type_e ec = KMSB_EC_PRIME192V1;
577 test_kmsb_create_signature(TEST_ECDSA_P192_KEY_IDX, alg, ec,
578 input, sizeof(input),
579 &signature, &signature_len);
581 if (signature) free(signature);
584 BOOST_AUTO_TEST_CASE(kmsb_create_signature_secp384r1_p)
586 unsigned char input[32] = {0x01};
587 unsigned char *signature = NULL;
588 unsigned int signature_len = 0;
590 kmsb_hash_algo_e alg = KMSB_HASH_SHA256;
591 kmsb_ec_type_e ec = KMSB_EC_SECP384R1;
592 test_kmsb_create_signature(TEST_ECDSA_S384_KEY_IDX, alg, ec,
593 input, sizeof(input),
594 &signature, &signature_len);
596 if (signature) free(signature);
599 BOOST_AUTO_TEST_CASE(kmsb_verify_signature_sha1_p)
601 unsigned char input[32] = {0x01};
602 unsigned char *signature = NULL;
603 unsigned int signature_len = 0;
605 kmsb_hash_algo_e alg = KMSB_HASH_SHA1;
606 kmsb_ec_type_e ec = KMSB_EC_PRIME256V1;
607 test_kmsb_verify_signature(TEST_ECDSA_P256_KEY_IDX, alg, ec,
608 input, sizeof(input),
609 &signature, &signature_len);
611 if (signature) free(signature);
614 BOOST_AUTO_TEST_CASE(kmsb_verify_signature_sha256_p)
616 unsigned char input[32] = {0x01};
617 unsigned char *signature = NULL;
618 unsigned int signature_len = 0;
620 kmsb_hash_algo_e alg = KMSB_HASH_SHA256;
621 kmsb_ec_type_e ec = KMSB_EC_PRIME256V1;
622 test_kmsb_verify_signature(TEST_ECDSA_P256_KEY_IDX, alg, ec,
623 input, sizeof(input),
624 &signature, &signature_len);
626 if (signature) free(signature);
629 BOOST_AUTO_TEST_CASE(kmsb_verify_signature_sha384_p)
631 unsigned char input[32] = {0x01};
632 unsigned char *signature = NULL;
633 unsigned int signature_len = 0;
635 kmsb_hash_algo_e alg = KMSB_HASH_SHA384;
636 kmsb_ec_type_e ec = KMSB_EC_PRIME256V1;
637 test_kmsb_verify_signature(TEST_ECDSA_P256_KEY_IDX, alg, ec,
638 input, sizeof(input),
639 &signature, &signature_len);
641 if (signature) free(signature);
644 BOOST_AUTO_TEST_CASE(kmsb_verify_signature_sha512_p)
646 unsigned char input[32] = {0x01};
647 unsigned char *signature = NULL;
648 unsigned int signature_len = 0;
650 kmsb_hash_algo_e alg = KMSB_HASH_SHA512;
651 kmsb_ec_type_e ec = KMSB_EC_PRIME256V1;
652 test_kmsb_verify_signature(TEST_ECDSA_P256_KEY_IDX, alg, ec,
653 input, sizeof(input),
654 &signature, &signature_len);
656 if (signature) free(signature);
659 BOOST_AUTO_TEST_CASE(kmsb_verify_signature_p192v1_p)
661 unsigned char input[32] = {0x01};
662 unsigned char *signature = NULL;
663 unsigned int signature_len = 0;
665 kmsb_hash_algo_e alg = KMSB_HASH_SHA256;
666 kmsb_ec_type_e ec = KMSB_EC_PRIME192V1;
667 test_kmsb_verify_signature(TEST_ECDSA_P192_KEY_IDX, alg, ec,
668 input, sizeof(input),
669 &signature, &signature_len);
671 if (signature) free(signature);
674 BOOST_AUTO_TEST_CASE(kmsb_verify_signature_secp384r1_p)
676 unsigned char input[32] = {0x01};
677 unsigned char *signature = NULL;
678 unsigned int signature_len = 0;
680 kmsb_hash_algo_e alg = KMSB_HASH_SHA256;
681 kmsb_ec_type_e ec = KMSB_EC_SECP384R1;
682 test_kmsb_verify_signature(TEST_ECDSA_S384_KEY_IDX, alg, ec,
683 input, sizeof(input),
684 &signature, &signature_len);
686 if (signature) free(signature);
688 BOOST_AUTO_TEST_SUITE_END() // SE_EMUL
690 BOOST_AUTO_TEST_SUITE_END() // USER