SUPPORT-8592. Проверка подписи маркера доступа
This commit is contained in:
parent
9e85e4e8de
commit
4fa45a1f5e
46 changed files with 1970 additions and 250 deletions
30
tests/main.c
Normal file
30
tests/main.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include "utils/test_jwt.h"
|
||||
|
||||
#include <CUnit/Basic.h>
|
||||
|
||||
int main(int arv, char** argc)
|
||||
{
|
||||
int failures = -1;
|
||||
(void)arv;
|
||||
(void)argc;
|
||||
|
||||
if (CUE_SUCCESS != CU_initialize_registry())
|
||||
return CU_get_error();
|
||||
|
||||
CU_pSuite suite_jwt = CU_add_suite("JWTSuit", NULL, NULL);
|
||||
if (NULL == suite_jwt) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (NULL == CU_ADD_TEST(suite_jwt, test_jwt_get_header_payload_and_sign)) goto exit;
|
||||
if (NULL == CU_ADD_TEST(suite_jwt, test_jwt_get_alg_from_header)) goto exit;
|
||||
|
||||
CU_basic_set_mode(CU_BRM_NORMAL);
|
||||
CU_basic_run_tests();
|
||||
|
||||
exit:
|
||||
failures = CU_get_number_of_failures();
|
||||
CU_cleanup_registry();
|
||||
|
||||
return (failures == 0) ? 0 : -1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue