| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#include "us5418.h" |
| 11 |
#include <pthread.h> |
| 12 |
|
| 13 |
static unsigned char *cacerts = NULL; |
| 14 |
static int cacerts_len = 0; |
| 15 |
|
| 16 |
static char *cssl_emulator_path = NULL; |
| 17 |
|
| 18 |
extern EST_CTX *ectx; |
| 19 |
static char temp_dir[MAX_FILENAME_LEN + 1]; |
| 20 |
static FILE *fh; |
| 21 |
static EVP_PKEY *client_pkey = NULL; |
| 22 |
static X509 *client_cert = NULL; |
| 23 |
static unsigned char *ca_chain_bytes; |
| 24 |
static int ca_chain_bytes_len = 0; |
| 25 |
pthread_mutex_t lock; |
| 26 |
static pid_t pid; |
| 27 |
|
| 28 |
|
| 29 |
#define US5418H_SIMPLE_ENROLL_LINE_COUNT HEADER_LINE_COUNT + 14 |
| 30 |
#define US5418H_GET_CACERTS_LINE_COUNT HEADER_LINE_COUNT + 3 |
| 31 |
#define US5418H_CSR_ATTRS_LINE_COUNT HEADER_LINE_COUNT + 3 |
| 32 |
#define US5418H_SERVER_KEYGEN_LINE_COUNT HEADER_LINE_COUNT + 15 |
| 33 |
#define US5418H_SIMPLE_REENROLL_LINE_COUNT HEADER_LINE_COUNT + 14 |
| 34 |
|
| 35 |
typedef EST_ERROR (*setup_cb_t) (EST_CTX **ctx); |
| 36 |
|
| 37 |
static void us5418h_clean (void) {} |
| 38 |
|
| 39 |
static int us5418h_start_server (int manual_enroll, int nid) |
| 40 |
{ |
| 41 |
int rv; |
| 42 |
if (pthread_mutex_init(&lock, NULL) != 0) |
| 43 |
{ |
| 44 |
printf("\n mutex init has failed\n"); |
| 45 |
return 1; |
| 46 |
} |
| 47 |
rv = st_start(US5418_SERVER_PORT, US5418_SERVER_CERT_AND_KEY, |
| 48 |
US5418_SERVER_CERT_AND_KEY, "US5418 test realm", |
| 49 |
US5418_CACERTS, US5418_TRUSTED_CERT, US5418_OPENSSL_CNF, |
| 50 |
manual_enroll, 0, nid); |
| 51 |
if (rv != EST_ERR_NONE) { |
| 52 |
printf("Failed to start CoAP st_server\n"); |
| 53 |
} |
| 54 |
|
| 55 |
st_set_default_est_event_callbacks(); |
| 56 |
|
| 57 |
return rv; |
| 58 |
} |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
static int us5418h_init_suite (void) |
| 66 |
{ |
| 67 |
int rv; |
| 68 |
|
| 69 |
est_init_logger(EST_LOG_LVL_INFO, NULL); |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
cacerts_len = read_binary_file(US5418_CACERTS, &cacerts); |
| 75 |
if (cacerts_len <= 0) { |
| 76 |
return 1; |
| 77 |
} |
| 78 |
|
| 79 |
us5418h_clean(); |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
rv = us5418h_start_server(0, 0); |
| 86 |
if (rv) { |
| 87 |
printf("The st server for US5418 could not be started.\n"); |
| 88 |
return rv; |
| 89 |
} |
| 90 |
|
| 91 |
#ifdef WIN32 |
| 92 |
snprintf(temp_dir, MAX_FILENAME_LEN, "%s\\", getenv("TEMP")); |
| 93 |
#else |
| 94 |
snprintf(temp_dir, MAX_FILENAME_LEN, "/tmp/"); |
| 95 |
#endif |
| 96 |
|
| 97 |
cssl_emulator_path = getenv("COAP_EMU_SSL"); |
| 98 |
|
| 99 |
read_x509_cert_and_key_file(US5418_CLIENT_CERTKEY, US5418_CLIENT_CERTKEY, |
| 100 |
&client_cert, &client_pkey); |
| 101 |
|
| 102 |
ca_chain_bytes_len = read_binary_file(US5418_CACERTS, &ca_chain_bytes); |
| 103 |
if (ca_chain_bytes_len <= 0) { |
| 104 |
printf("The ca chain file could not be read or had zero len.\n"); |
| 105 |
return 1; |
| 106 |
} |
| 107 |
pid = getpid(); |
| 108 |
|
| 109 |
return rv; |
| 110 |
} |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
static int us5418h_destroy_suite (void) |
| 118 |
{ |
| 119 |
st_stop(); |
| 120 |
if (client_pkey) { |
| 121 |
EVP_PKEY_free(client_pkey); |
| 122 |
} |
| 123 |
if (ca_chain_bytes) { |
| 124 |
free(ca_chain_bytes); |
| 125 |
} |
| 126 |
if (client_cert) { |
| 127 |
X509_free(client_cert); |
| 128 |
} |
| 129 |
if (cacerts) { |
| 130 |
free(cacerts); |
| 131 |
} |
| 132 |
printf("Finishing up. Destroying Suite US5418\n"); |
| 133 |
return 0; |
| 134 |
} |
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
static void us5418h_logger_file (char *format, va_list l) |
| 147 |
{ |
| 148 |
pthread_mutex_lock(&lock); |
| 149 |
vfprintf(fh, format, l); |
| 150 |
fflush(fh); |
| 151 |
pthread_mutex_unlock(&lock); |
| 152 |
} |
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
static void us5418h_test1 (void) |
| 166 |
{ |
| 167 |
PRINT_START; |
| 168 |
EST_ERROR est_err = EST_ERR_UNKNOWN; |
| 169 |
est_err = est_enable_performance_timers(NULL); |
| 170 |
CU_ASSERT_5418(est_err == EST_ERR_NO_CTX); |
| 171 |
est_err = est_enable_performance_timers(ectx); |
| 172 |
CU_ASSERT_5418(est_err == EST_ERR_NONE); |
| 173 |
est_err = est_enable_performance_timers(ectx); |
| 174 |
CU_ASSERT_5418(est_err == EST_ERR_NONE); |
| 175 |
est_err = est_disable_performance_timers(ectx); |
| 176 |
CU_ASSERT_5418(est_err == EST_ERR_NONE); |
| 177 |
est_err = est_disable_performance_timers(ectx); |
| 178 |
CU_ASSERT_5418(est_err == EST_ERR_NONE); |
| 179 |
est_err = est_disable_performance_timers(NULL); |
| 180 |
CU_ASSERT_5418(est_err == EST_ERR_NO_CTX); |
| 181 |
PRINT_END; |
| 182 |
} |
| 183 |
|
| 184 |
EST_ERROR setup_client_ctx(EST_CTX **cctx) { |
| 185 |
EST_ERROR est_err; |
| 186 |
*cctx = est_client_init(ca_chain_bytes, ca_chain_bytes_len, |
| 187 |
EST_CERT_FORMAT_PEM, NULL); |
| 188 |
if (!(*cctx)) { |
| 189 |
|
| 190 |
printf("The client context was not properly initialized.\n"); |
| 191 |
CU_FAIL("The client context was not properly initialized."); |
| 192 |
return EST_ERR_NO_CTX; |
| 193 |
} |
| 194 |
est_err = est_client_set_server(*cctx, US5418_SERVER_IP, US5418_SERVER_PORT, NULL); |
| 195 |
if (est_err != EST_ERR_NONE) { |
| •196 |
printf("EST_ERROR %s occurred while setting the server in the est client context\n", |
| 197 |
EST_ERR_NUM_TO_STR(est_err)); |
| •198 |
CU_FAIL("EST error occurred while setting the server in the est client context"); |
| 199 |
return est_err; |
| 200 |
} |
| 201 |
est_err = est_client_set_auth(*cctx, "estuser", "estpwd", client_cert, client_pkey); |
| 202 |
if (est_err != EST_ERR_NONE) { |
| •203 |
printf("EST_ERROR %s occurred while setting the auth in the est client context\n", |
| 204 |
EST_ERR_NUM_TO_STR(est_err)); |
| •205 |
CU_FAIL("EST error occurred while setting the auth in the est client context"); |
| 206 |
return est_err; |
| 207 |
} |
| 208 |
return EST_ERR_NONE; |
| 209 |
} |
| 210 |
|
| 211 |
static int get_num_entries (REQUESTS request_type) |
| 212 |
{ |
| 213 |
switch (request_type) { |
| 214 |
case SIMPLE_ENROLL: |
| 215 |
return US5418H_SIMPLE_ENROLL_LINE_COUNT; |
| 216 |
case GET_CACERTS: |
| 217 |
return US5418H_GET_CACERTS_LINE_COUNT; |
| 218 |
case CSR_ATTRS: |
| 219 |
return US5418H_CSR_ATTRS_LINE_COUNT; |
| 220 |
case SERVER_KEYGEN: |
| 221 |
return US5418H_SERVER_KEYGEN_LINE_COUNT; |
| 222 |
case SIMPLE_REENROLL: |
| 223 |
return US5418H_SIMPLE_REENROLL_LINE_COUNT; |
| 224 |
default: |
| 225 |
return -1; |
| 226 |
} |
| 227 |
} |
| 228 |
|
| 229 |
static EST_ERROR perform_est_request (REQUESTS request_type, EVP_PKEY *pkey, |
| 230 |
X509 *reenroll_cert, setup_cb_t setup_cb) |
| 231 |
{ |
| 232 |
EST_CTX *cctx = NULL; |
| 233 |
EST_ERROR est_err; |
| 234 |
int pkcs7_len = 0; |
| 235 |
int cacerts_len = 0; |
| 236 |
unsigned char *csr_attrs_buf; |
| 237 |
int csr_attrs_len = 0; |
| 238 |
int newkey_len = 0; |
| 239 |
|
| 240 |
est_err = setup_cb(&cctx); |
| 241 |
if (est_err != EST_ERR_NONE) { |
| 242 |
|
| •243 |
printf("EST_ERROR %s occurred during setup of client context\n", |
| 244 |
EST_ERR_NUM_TO_STR(est_err)); |
| •245 |
CU_FAIL("EST error occurred during setup of client context"); |
| 246 |
if (cctx) { |
| 247 |
est_destroy(cctx); |
| 248 |
} |
| 249 |
return est_err; |
| 250 |
} |
| 251 |
switch (request_type) { |
| 252 |
case SIMPLE_ENROLL: |
| 253 |
est_err = est_client_enroll(cctx, "testcert", &pkcs7_len, pkey); |
| 254 |
if (est_err != EST_ERR_NONE) { |
| •255 |
printf("EST_ERROR %s occurred during enrollment request\n", |
| 256 |
EST_ERR_NUM_TO_STR(est_err)); |
| •257 |
CU_FAIL("EST error occurred during enrollment request"); |
| 258 |
} |
| 259 |
break; |
| 260 |
case GET_CACERTS: |
| 261 |
est_err = est_client_get_cacerts(cctx, &cacerts_len); |
| 262 |
if (est_err != EST_ERR_NONE) { |
| •263 |
printf("EST_ERROR %s occurred during get cacerts request\n", |
| 264 |
EST_ERR_NUM_TO_STR(est_err)); |
| •265 |
CU_FAIL("EST error occurred during get cacerts request"); |
| 266 |
} |
| 267 |
break; |
| 268 |
case CSR_ATTRS: |
| 269 |
est_err = est_client_get_csrattrs(cctx, &csr_attrs_buf, &csr_attrs_len); |
| 270 |
if (est_err != EST_ERR_NONE) { |
| •271 |
printf("EST_ERROR %s occurred during get csr attrs request\n", |
| 272 |
EST_ERR_NUM_TO_STR(est_err)); |
| •273 |
CU_FAIL("EST error occurred during get csr attrs request"); |
| 274 |
} |
| 275 |
break; |
| 276 |
case SERVER_KEYGEN: |
| 277 |
est_err = est_client_server_keygen_enroll(cctx, "testcert", &pkcs7_len, |
| 278 |
&newkey_len, pkey); |
| 279 |
if (est_err != EST_ERR_NONE) { |
| •280 |
printf("EST_ERROR %s occurred during get server keygen request\n", |
| 281 |
EST_ERR_NUM_TO_STR(est_err)); |
| •282 |
CU_FAIL("EST error occurred during get server keygen request"); |
| 283 |
} |
| 284 |
break; |
| 285 |
case SIMPLE_REENROLL: |
| 286 |
est_err = est_client_reenroll(cctx, reenroll_cert, &pkcs7_len, pkey); |
| 287 |
if (est_err != EST_ERR_NONE) { |
| •288 |
printf("EST_ERROR %s occurred during reenroll request\n", |
| 289 |
EST_ERR_NUM_TO_STR(est_err)); |
| •290 |
CU_FAIL("EST error occurred during reenroll request"); |
| 291 |
} |
| 292 |
break; |
| 293 |
default: |
| •294 |
printf("EST_ERROR %s occurred during get csr attrs request\n", |
| 295 |
EST_ERR_NUM_TO_STR(est_err)); |
| •296 |
CU_FAIL("EST error occurred during get csr attrs request"); |
| 297 |
est_err = EST_ERR_INVALID_PARAMETERS; |
| 298 |
} |
| 299 |
if (cctx) { |
| 300 |
est_destroy(cctx); |
| 301 |
} |
| 302 |
return est_err; |
| 303 |
} |
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
static char perform_timer_logging_test (REQUESTS request_type) |
| 317 |
{ |
| 318 |
char cmd[EST_UT_MAX_CMD_LEN]; |
| 319 |
char est_client_logs[MAX_FILENAME_LEN]; |
| 320 |
char est_server_logs[MAX_FILENAME_LEN]; |
| 321 |
char csv_filename[MAX_FILENAME_LEN]; |
| 322 |
FILE *fh_csv; |
| 323 |
char c; |
| 324 |
int exit_code = 0; |
| 325 |
int line_count = 0; |
| 326 |
EST_ERROR est_err = EST_ERR_UNKNOWN; |
| 327 |
char success = 1; |
| 328 |
|
| 329 |
snprintf(est_server_logs, MAX_FILENAME_LEN, "%sus5418h_estserver_%ld.log", |
| 330 |
temp_dir, (unsigned long)pid); |
| 331 |
if (strnlen(est_server_logs, MAX_FILENAME_LEN) >= MAX_FILENAME_LEN) { |
| 332 |
CU_FAIL_5418("The logfile for the est_coap_client.py emulator was " |
| 333 |
"too long. Add symbolic links to make paths shorter."); |
| 334 |
goto end; |
| 335 |
} |
| 336 |
|
| 337 |
if ((fh = fopen(est_server_logs, "w")) == NULL) { |
| 338 |
CU_FAIL_5418("Could not open server log file"); |
| 339 |
goto end; |
| 340 |
} |
| 341 |
|
| 342 |
pthread_mutex_lock(&lock); |
| 343 |
est_err = est_init_logger(EST_LOG_LVL_INFO, us5418h_logger_file); |
| 344 |
pthread_mutex_unlock(&lock); |
| 345 |
if (est_err != EST_ERR_NONE) { |
| 346 |
CU_FAIL_5418("Couldn't init the libest logger"); |
| 347 |
goto end; |
| 348 |
} |
| 349 |
|
| 350 |
snprintf(est_client_logs, MAX_FILENAME_LEN, "%sus5418h_estclient_%ld.log", |
| 351 |
temp_dir, (unsigned long)pid); |
| 352 |
if (strnlen(est_client_logs, MAX_FILENAME_LEN) >= MAX_FILENAME_LEN) { |
| 353 |
CU_FAIL_5418("The logfile for the est_coap_client.py emulator was " |
| 354 |
"too long. Add symbolic links to make paths shorter."); |
| 355 |
goto end; |
| 356 |
} |
| 357 |
est_err = est_enable_performance_timers(ectx); |
| 358 |
CU_ASSERT_5418(est_err == EST_ERR_NONE); |
| 359 |
|
| 360 |
est_err = perform_est_request(request_type, client_pkey, client_cert, |
| 361 |
(setup_cb_t)setup_client_ctx); |
| 362 |
CU_ASSERT_5418(est_err == EST_ERR_NONE); |
| 363 |
est_err = est_disable_performance_timers(ectx); |
| 364 |
CU_ASSERT_5418(est_err == EST_ERR_NONE); |
| 365 |
|
| 366 |
|
| 367 |
pthread_mutex_lock(&lock); |
| 368 |
est_err = est_init_logger(EST_LOG_LVL_INFO, NULL); |
| 369 |
pthread_mutex_unlock(&lock); |
| 370 |
if (est_err != EST_ERR_NONE) { |
| 371 |
CU_FAIL_5418("Couldn't reset the libest logger"); |
| 372 |
goto end; |
| 373 |
} |
| 374 |
fclose(fh); |
| 375 |
snprintf(csv_filename, MAX_FILENAME_LEN, "%sus5418h_timer_%ld.csv", |
| 376 |
temp_dir, (unsigned long)pid); |
| 377 |
if (strnlen(csv_filename, MAX_FILENAME_LEN) >= MAX_FILENAME_LEN) { |
| 378 |
CU_FAIL_5418("The path of the output csv for the est timers is " |
| 379 |
"too long. Add symbolic links to make paths shorter."); |
| 380 |
goto end; |
| 381 |
} |
| 382 |
snprintf(cmd, EST_UT_MAX_CMD_LEN, "LD_LIBRARY_PATH=%s/lib python %s %s %s", |
| 383 |
cssl_emulator_path, PARSE_TIMER_PATH, est_server_logs, |
| 384 |
csv_filename); |
| 385 |
if (strnlen(cmd, EST_UT_MAX_CMD_LEN) >= EST_UT_MAX_CMD_LEN) { |
| 386 |
CU_FAIL_5418("Commmand for generating the timing csv file is too long. " |
| 387 |
"Add symbolic links to make paths shorter."); |
| 388 |
goto end; |
| 389 |
} |
| 390 |
exit_code = system(cmd); |
| 391 |
CU_ASSERT_5418(!exit_code); |
| 392 |
|
| 393 |
fh_csv = fopen(csv_filename, "r"); |
| 394 |
|
| 395 |
|
| 396 |
if (fh_csv == NULL) { |
| 397 |
printf("Could not open file %s", csv_filename); |
| 398 |
CU_FAIL_5418("Could not open output csv file"); |
| 399 |
goto end; |
| 400 |
} |
| 401 |
|
| 402 |
|
| 403 |
for (c = getc(fh_csv); c != EOF; c = getc(fh_csv)) { |
| 404 |
if (c == '\n') { |
| 405 |
line_count += 1; |
| 406 |
} |
| 407 |
} |
| 408 |
|
| 409 |
fclose(fh_csv); |
| 410 |
remove(est_server_logs); |
| 411 |
remove(est_client_logs); |
| 412 |
remove(csv_filename); |
| 413 |
CU_ASSERT_5418(line_count == get_num_entries(request_type)); |
| 414 |
end: |
| 415 |
return success; |
| 416 |
} |
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
static void us5418h_test2 (void) |
| 429 |
{ |
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
PRINT_START; |
| 435 |
success = perform_timer_logging_test(SIMPLE_ENROLL); |
| 436 |
PRINT_END; |
| 437 |
} |
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
static void us5418h_test3 (void) |
| 449 |
{ |
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
PRINT_START; |
| 455 |
success = perform_timer_logging_test(GET_CACERTS); |
| 456 |
PRINT_END; |
| 457 |
} |
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
|
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
static void us5418h_test4 (void) |
| 470 |
{ |
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
PRINT_START; |
| 476 |
success = perform_timer_logging_test(CSR_ATTRS); |
| 477 |
PRINT_END; |
| 478 |
} |
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
static void us5418h_test5 (void) |
| 491 |
{ |
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
PRINT_START; |
| 497 |
success = perform_timer_logging_test(SERVER_KEYGEN); |
| 498 |
PRINT_END; |
| 499 |
} |
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
static void us5418h_test6 (void) |
| 512 |
{ |
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
PRINT_START; |
| 518 |
success = perform_timer_logging_test(SIMPLE_REENROLL); |
| 519 |
PRINT_END; |
| 520 |
} |
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
int us5418h_add_suite (void) |
| 527 |
{ |
| 528 |
#ifdef HAVE_CUNIT |
| 529 |
CU_pSuite pSuite = NULL; |
| 530 |
|
| 531 |
|
| 532 |
pSuite = CU_add_suite("us5418h_Performace_Timers_HTTP", us5418h_init_suite, |
| 533 |
us5418h_destroy_suite); |
| 534 |
if (NULL == pSuite) { |
| 535 |
CU_cleanup_registry(); |
| 536 |
return CU_get_error(); |
| 537 |
} |
| 538 |
|
| 539 |
|
| 540 |
if ((NULL == |
| 541 |
CU_add_test(pSuite, "Test Timer Enable/Disable API", us5418h_test1))) { |
| 542 |
CU_cleanup_registry(); |
| 543 |
return CU_get_error(); |
| 544 |
} |
| 545 |
if ((NULL == |
| 546 |
CU_add_test(pSuite, "Test Timer with Simple Enroll", us5418h_test2))) { |
| 547 |
CU_cleanup_registry(); |
| 548 |
return CU_get_error(); |
| 549 |
} |
| 550 |
if ((NULL == |
| 551 |
CU_add_test(pSuite, "Test Timer with Get CA Certs", us5418h_test3))) { |
| 552 |
CU_cleanup_registry(); |
| 553 |
return CU_get_error(); |
| 554 |
} |
| 555 |
if ((NULL == |
| 556 |
CU_add_test(pSuite, "Test Timer with Get CSR Attrs", us5418h_test4))) { |
| 557 |
CU_cleanup_registry(); |
| 558 |
return CU_get_error(); |
| 559 |
} |
| 560 |
if ((NULL == |
| 561 |
CU_add_test(pSuite, "Test Timer with Server Keygen", us5418h_test5))) { |
| 562 |
CU_cleanup_registry(); |
| 563 |
return CU_get_error(); |
| 564 |
} |
| 565 |
if ((NULL == CU_add_test(pSuite, "Test Timer with Simple Re-enroll", |
| 566 |
us5418h_test6))) { |
| 567 |
CU_cleanup_registry(); |
| 568 |
return CU_get_error(); |
| 569 |
} |
| 570 |
return CUE_SUCCESS; |
| 571 |
#endif |
| 572 |
} |