Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
Add test cases for new properties
Browse files Browse the repository at this point in the history
  • Loading branch information
babelouest committed Oct 24, 2023
1 parent bc21b5c commit 20dd127
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 4 deletions.
35 changes: 35 additions & 0 deletions test/api_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,36 @@ START_TEST(test_iddawc_api_request_invalid_parameters)
}
END_TEST

START_TEST(test_iddawc_api_request_invalid_response_size_header)
{
struct _i_session i_session;
struct _u_request req;
struct _u_response resp;
struct _u_instance instance;

ck_assert_int_eq(ulfius_init_instance(&instance, 8080, NULL, NULL), U_OK);
ck_assert_int_eq(ulfius_add_endpoint_by_val(&instance, DPOP_HTM, NULL, "/object", 0, &callback_resource_service_object_at_header, NULL), U_OK);
ck_assert_int_eq(ulfius_start_framework(&instance), U_OK);
ck_assert_int_eq(i_init_session(&i_session), I_OK);
ck_assert_int_eq(ulfius_init_request(&req), I_OK);
ck_assert_int_eq(ulfius_init_response(&resp), I_OK);
ck_assert_int_eq(i_set_parameter_list(&i_session, I_OPT_ACCESS_TOKEN, ACCESS_TOKEN,
I_OPT_RESPONSE_MAX_BODY_SIZE, 8,
I_OPT_RESPONSE_MAX_HEADER_COUNT, 2,
I_OPT_NONE), I_OK);
ck_assert_int_eq(ulfius_set_request_properties(&req, U_OPT_HTTP_VERB, DPOP_HTM, U_OPT_HTTP_URL, DPOP_HTU, U_OPT_NONE), U_OK);
ck_assert_int_eq(i_perform_resource_service_request(&i_session, &req, &resp, 0, I_BEARER_TYPE_HEADER, 0, 0), I_ERROR);
ck_assert_int_eq(2, u_map_count(resp.map_header));
ck_assert_int_eq(8, resp.binary_body_length);

i_clean_session(&i_session);
ulfius_clean_request(&req);
ulfius_clean_response(&resp);
ulfius_stop_framework(&instance);
ulfius_clean_instance(&instance);
}
END_TEST

START_TEST(test_iddawc_api_request_no_refresh_no_dpop)
{
struct _i_session i_session;
Expand Down Expand Up @@ -316,6 +346,8 @@ START_TEST(test_iddawc_api_request_refresh_not_required_dpop_required)
ck_assert_ptr_ne(NULL, j_control = json_loads(resource_object, JSON_DECODE_ANY, NULL));
ck_assert_ptr_ne(NULL, j_resp = ulfius_get_json_body_response(&resp, NULL));
ck_assert_int_eq(1, json_equal(j_control, j_resp));
ulfius_clean_response(&resp);
ck_assert_int_eq(ulfius_init_response(&resp), I_OK);
ck_assert_int_eq(i_perform_resource_service_request(&i_session, &req, &resp, 0, I_BEARER_TYPE_HEADER, 0, 0), I_OK);
ck_assert_int_eq(401, resp.status);

Expand Down Expand Up @@ -438,6 +470,8 @@ START_TEST(test_iddawc_api_request_refresh_not_required_dpop_required_nonce)
ck_assert_int_eq(i_perform_resource_service_request(&i_session, &req, &resp, 0, I_BEARER_TYPE_HEADER, 1, 0), I_OK);
ck_assert_ptr_ne(NULL, i_get_str_parameter(&i_session, I_OPT_DPOP_NONCE_RS));
ck_assert_int_eq(401, resp.status);
ulfius_clean_response(&resp);
ck_assert_int_eq(ulfius_init_response(&resp), I_OK);
ck_assert_int_eq(i_perform_resource_service_request(&i_session, &req, &resp, 0, I_BEARER_TYPE_HEADER, 1, 0), I_OK);
ck_assert_int_eq(200, resp.status);
ck_assert_ptr_ne(NULL, j_control = json_loads(resource_object, JSON_DECODE_ANY, NULL));
Expand Down Expand Up @@ -527,6 +561,7 @@ static Suite *iddawc_suite(void)
s = suite_create("Iddawc API request tests");
tc_core = tcase_create("test_iddawc_api_request");
tcase_add_test(tc_core, test_iddawc_api_request_invalid_parameters);
tcase_add_test(tc_core, test_iddawc_api_request_invalid_response_size_header);
tcase_add_test(tc_core, test_iddawc_api_request_no_refresh_no_dpop);
tcase_add_test(tc_core, test_iddawc_api_request_refresh_not_required_no_dpop);
tcase_add_test(tc_core, test_iddawc_api_request_refresh_required_not_available_no_dpop);
Expand Down
42 changes: 38 additions & 4 deletions test/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@
#define ID_TOKEN_SID "sidXyz1234"
#define SERVER_JWKS_CACHE_EXPIRATION 20
#define SAVE_HTTP_REQUEST_RESPONSE 78
#define RESPONSE_MAX_BODY_SIZE 421
#define RESPONSE_MAX_HEADER_COUNT 746

const char jwks_pubkey_ecdsa_str[] = "{\"keys\":[{\"kty\":\"EC\",\"crv\":\"P-256\",\"x\":\"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4\","\
"\"y\":\"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM\",\"use\":\"enc\",\"kid\":\"1\"}]}";
Expand Down Expand Up @@ -658,6 +660,8 @@ START_TEST(test_iddawc_set_int_parameter)
ck_assert_int_eq(i_set_int_parameter(&i_session, I_OPT_SERVER_JWKS_CACHE_EXPIRATION, SERVER_JWKS_CACHE_EXPIRATION), I_OK);
ck_assert_int_eq(i_set_int_parameter(&i_session, I_OPT_SAVE_HTTP_REQUEST_RESPONSE, SAVE_HTTP_REQUEST_RESPONSE), I_OK);
ck_assert_int_eq(i_set_int_parameter(&i_session, I_OPT_CIBA_REQUESTED_EXPIRY, CIBA_REQUESTED_EXPIRY), I_OK);
ck_assert_int_eq(i_set_int_parameter(&i_session, I_OPT_RESPONSE_MAX_BODY_SIZE, RESPONSE_MAX_BODY_SIZE), I_OK);
ck_assert_int_eq(i_set_int_parameter(&i_session, I_OPT_RESPONSE_MAX_HEADER_COUNT, RESPONSE_MAX_HEADER_COUNT), I_OK);

i_clean_session(&i_session);
}
Expand Down Expand Up @@ -1016,6 +1020,10 @@ START_TEST(test_iddawc_get_int_parameter)
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_SAVE_HTTP_REQUEST_RESPONSE), SAVE_HTTP_REQUEST_RESPONSE);
ck_assert_int_eq(i_set_int_parameter(&i_session, I_OPT_CIBA_REQUESTED_EXPIRY, CIBA_REQUESTED_EXPIRY), I_OK);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_CIBA_REQUESTED_EXPIRY), CIBA_REQUESTED_EXPIRY);
ck_assert_int_eq(i_set_int_parameter(&i_session, I_OPT_RESPONSE_MAX_BODY_SIZE, RESPONSE_MAX_BODY_SIZE), I_OK);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_RESPONSE_MAX_BODY_SIZE), RESPONSE_MAX_BODY_SIZE);
ck_assert_int_eq(i_set_int_parameter(&i_session, I_OPT_RESPONSE_MAX_HEADER_COUNT, RESPONSE_MAX_HEADER_COUNT), I_OK);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_RESPONSE_MAX_HEADER_COUNT), RESPONSE_MAX_HEADER_COUNT);

i_clean_session(&i_session);
}
Expand Down Expand Up @@ -1293,6 +1301,8 @@ START_TEST(test_iddawc_parameter_list)
I_OPT_SAVE_HTTP_REQUEST_RESPONSE, SAVE_HTTP_REQUEST_RESPONSE,
I_OPT_DPOP_NONCE_AS, DPOP_NONCE_AS,
I_OPT_DPOP_NONCE_RS, DPOP_NONCE_RS,
I_OPT_RESPONSE_MAX_BODY_SIZE, RESPONSE_MAX_BODY_SIZE,
I_OPT_RESPONSE_MAX_HEADER_COUNT, RESPONSE_MAX_HEADER_COUNT,
I_OPT_NONE), I_OK);

ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_STATE), STATE);
Expand Down Expand Up @@ -1392,6 +1402,8 @@ START_TEST(test_iddawc_parameter_list)
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_SAVE_HTTP_REQUEST_RESPONSE), SAVE_HTTP_REQUEST_RESPONSE);
ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_DPOP_NONCE_AS), DPOP_NONCE_AS);
ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_DPOP_NONCE_RS), DPOP_NONCE_RS);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_RESPONSE_MAX_BODY_SIZE), RESPONSE_MAX_BODY_SIZE);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_RESPONSE_MAX_HEADER_COUNT), RESPONSE_MAX_HEADER_COUNT);

i_clean_session(&i_session);
}
Expand Down Expand Up @@ -1602,6 +1614,8 @@ START_TEST(test_iddawc_export_json_t)
ck_assert_int_eq(json_integer_value(json_object_get(j_export, "save_http_request_response")), 0);
ck_assert_ptr_eq(json_object_get(j_export, "dpop_nonce_as"), NULL);
ck_assert_ptr_eq(json_object_get(j_export, "dpop_nonce_rs"), NULL);
ck_assert_int_eq(json_integer_value(json_object_get(j_export, "response_body_limit")), I_DEFAULT_RESPONSE_MAX_BODY_SIZE);
ck_assert_int_eq(json_integer_value(json_object_get(j_export, "max_header")), I_DEFAULT_RESPONSE_MAX_HEADER_COUNT);
json_decref(j_export);

ck_assert_int_eq(i_set_parameter_list(&i_session, I_OPT_RESPONSE_TYPE, I_RESPONSE_TYPE_CODE|I_RESPONSE_TYPE_TOKEN|I_RESPONSE_TYPE_ID_TOKEN,
Expand Down Expand Up @@ -1721,6 +1735,8 @@ START_TEST(test_iddawc_export_json_t)
I_OPT_SAVE_HTTP_REQUEST_RESPONSE, SAVE_HTTP_REQUEST_RESPONSE,
I_OPT_DPOP_NONCE_AS, DPOP_NONCE_AS,
I_OPT_DPOP_NONCE_RS, DPOP_NONCE_RS,
I_OPT_RESPONSE_MAX_BODY_SIZE, RESPONSE_MAX_BODY_SIZE,
I_OPT_RESPONSE_MAX_HEADER_COUNT, RESPONSE_MAX_HEADER_COUNT,
I_OPT_NONE), I_OK);
i_session.id_token_payload = json_pack("{ss}", "aud", "payload");
ck_assert_int_eq(i_set_rich_authorization_request_str(&i_session, AUTH_REQUEST_TYPE_1, AUTH_REQUEST_1), I_OK);
Expand Down Expand Up @@ -1848,6 +1864,8 @@ START_TEST(test_iddawc_export_json_t)
ck_assert_int_eq(json_integer_value(json_object_get(j_export, "save_http_request_response")), SAVE_HTTP_REQUEST_RESPONSE);
ck_assert_str_eq(json_string_value(json_object_get(j_export, "dpop_nonce_as")), DPOP_NONCE_AS);
ck_assert_str_eq(json_string_value(json_object_get(j_export, "dpop_nonce_rs")), DPOP_NONCE_RS);
ck_assert_int_eq(json_integer_value(json_object_get(j_export, "response_body_limit")), RESPONSE_MAX_BODY_SIZE);
ck_assert_int_eq(json_integer_value(json_object_get(j_export, "max_header")), RESPONSE_MAX_HEADER_COUNT);
json_decref(j_export);

json_decref(j_additional);
Expand Down Expand Up @@ -1987,6 +2005,8 @@ START_TEST(test_iddawc_import_json_t)
I_OPT_SAVE_HTTP_REQUEST_RESPONSE, SAVE_HTTP_REQUEST_RESPONSE,
I_OPT_DPOP_NONCE_AS, DPOP_NONCE_AS,
I_OPT_DPOP_NONCE_RS, DPOP_NONCE_RS,
I_OPT_RESPONSE_MAX_BODY_SIZE, RESPONSE_MAX_BODY_SIZE,
I_OPT_RESPONSE_MAX_HEADER_COUNT, RESPONSE_MAX_HEADER_COUNT,
I_OPT_NONE), I_OK);
i_session.id_token_payload = json_pack("{ss}", "aud", "payload");
ck_assert_int_eq(i_set_rich_authorization_request_str(&i_session, AUTH_REQUEST_TYPE_1, AUTH_REQUEST_1), I_OK);
Expand Down Expand Up @@ -2120,6 +2140,8 @@ START_TEST(test_iddawc_import_json_t)
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_SAVE_HTTP_REQUEST_RESPONSE), SAVE_HTTP_REQUEST_RESPONSE);
ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_DPOP_NONCE_AS), DPOP_NONCE_AS);
ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_DPOP_NONCE_RS), DPOP_NONCE_RS);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_RESPONSE_MAX_BODY_SIZE), RESPONSE_MAX_BODY_SIZE);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_RESPONSE_MAX_HEADER_COUNT), RESPONSE_MAX_HEADER_COUNT);
json_decref(j_export);

json_decref(j_config);
Expand All @@ -2141,7 +2163,7 @@ START_TEST(test_iddawc_export_str)
ck_assert_int_eq(i_init_session(&i_session), I_OK);

str_export = i_export_session_str(&i_session);
ck_assert_str_eq(str_export, "{\"response_type\":0,\"additional_parameters\":{},\"additional_response\":{},\"result\":0,\"expires_in\":0,\"expires_at\":0,\"auth_method\":1,\"token_method\":0,\"server_jwks\":{\"keys\":[]},\"x5u_flags\":0,\"openid_config_strict\":false,\"token_exp\":600,\"authorization_details\":[],\"device_auth_expires_in\":0,\"device_auth_interval\":0,\"require_pushed_authorization_requests\":false,\"pushed_authorization_request_expires_in\":0,\"use_dpop\":false,\"decrypt_code\":false,\"decrypt_refresh_token\":false,\"decrypt_access_token\":false,\"client_jwks\":{\"keys\":[]},\"remote_cert_flag\":4369,\"pkce_method\":0,\"claims\":{\"userinfo\":{},\"id_token\":{}},\"ciba_mode\":0,\"ciba_login_hint_format\":0,\"ciba_auth_req_expires_in\":0,\"ciba_auth_req_interval\":0,\"frontchannel_logout_session_required\":0,\"backchannel_logout_session_required\":0,\"server_jwks_cache_expiration\":0,\"save_http_request_response\":0,\"ciba_requested_expiry\":0,\"openid_config_strict_flags\":4368}");
ck_assert_str_eq(str_export, "{\"response_type\":0,\"additional_parameters\":{},\"additional_response\":{},\"result\":0,\"expires_in\":0,\"expires_at\":0,\"auth_method\":1,\"token_method\":0,\"server_jwks\":{\"keys\":[]},\"x5u_flags\":0,\"openid_config_strict\":false,\"token_exp\":600,\"authorization_details\":[],\"device_auth_expires_in\":0,\"device_auth_interval\":0,\"require_pushed_authorization_requests\":false,\"pushed_authorization_request_expires_in\":0,\"use_dpop\":false,\"decrypt_code\":false,\"decrypt_refresh_token\":false,\"decrypt_access_token\":false,\"client_jwks\":{\"keys\":[]},\"remote_cert_flag\":4369,\"pkce_method\":0,\"claims\":{\"userinfo\":{},\"id_token\":{}},\"ciba_mode\":0,\"ciba_login_hint_format\":0,\"ciba_auth_req_expires_in\":0,\"ciba_auth_req_interval\":0,\"frontchannel_logout_session_required\":0,\"backchannel_logout_session_required\":0,\"server_jwks_cache_expiration\":0,\"save_http_request_response\":0,\"ciba_requested_expiry\":0,\"openid_config_strict_flags\":4368,\"response_body_limit\":4194304,\"max_header\":64}");
o_free(str_export);

ck_assert_int_eq(i_set_parameter_list(&i_session, I_OPT_RESPONSE_TYPE, I_RESPONSE_TYPE_CODE|I_RESPONSE_TYPE_TOKEN|I_RESPONSE_TYPE_ID_TOKEN,
Expand Down Expand Up @@ -2263,6 +2285,8 @@ START_TEST(test_iddawc_export_str)
I_OPT_SAVE_HTTP_REQUEST_RESPONSE, SAVE_HTTP_REQUEST_RESPONSE,
I_OPT_DPOP_NONCE_AS, DPOP_NONCE_AS,
I_OPT_DPOP_NONCE_RS, DPOP_NONCE_RS,
I_OPT_RESPONSE_MAX_BODY_SIZE, RESPONSE_MAX_BODY_SIZE,
I_OPT_RESPONSE_MAX_HEADER_COUNT, RESPONSE_MAX_HEADER_COUNT,
I_OPT_NONE), I_OK);
ck_assert_int_eq(r_jwks_import_from_json_str(i_session.server_jwks, jwks_pubkey_ecdsa_str), RHN_OK);
ck_assert_int_eq(r_jwks_import_from_json_str(i_session.client_jwks, jwks_pubkey_ecdsa_str), RHN_OK);
Expand Down Expand Up @@ -2411,6 +2435,8 @@ START_TEST(test_iddawc_import_str)
I_OPT_SAVE_HTTP_REQUEST_RESPONSE, SAVE_HTTP_REQUEST_RESPONSE,
I_OPT_DPOP_NONCE_AS, DPOP_NONCE_AS,
I_OPT_DPOP_NONCE_RS, DPOP_NONCE_RS,
I_OPT_RESPONSE_MAX_BODY_SIZE, RESPONSE_MAX_BODY_SIZE,
I_OPT_RESPONSE_MAX_HEADER_COUNT, RESPONSE_MAX_HEADER_COUNT,
I_OPT_NONE), I_OK);
ck_assert_int_eq(r_jwks_import_from_json_str(i_session.server_jwks, jwks_pubkey_ecdsa_str), RHN_OK);
ck_assert_int_eq(r_jwks_import_from_json_str(i_session.client_jwks, jwks_pubkey_ecdsa_str), RHN_OK);
Expand Down Expand Up @@ -2547,6 +2573,8 @@ START_TEST(test_iddawc_import_str)
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_SAVE_HTTP_REQUEST_RESPONSE), SAVE_HTTP_REQUEST_RESPONSE);
ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_DPOP_NONCE_AS), DPOP_NONCE_AS);
ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_DPOP_NONCE_RS), DPOP_NONCE_RS);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_RESPONSE_MAX_BODY_SIZE), RESPONSE_MAX_BODY_SIZE);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_RESPONSE_MAX_HEADER_COUNT), RESPONSE_MAX_HEADER_COUNT);
o_free(str_import);
o_free(str_rar);

Expand Down Expand Up @@ -2689,6 +2717,8 @@ START_TEST(test_iddawc_import_multiple)
I_OPT_SAVE_HTTP_REQUEST_RESPONSE, SAVE_HTTP_REQUEST_RESPONSE,
I_OPT_DPOP_NONCE_AS, DPOP_NONCE_AS,
I_OPT_DPOP_NONCE_RS, DPOP_NONCE_RS,
I_OPT_RESPONSE_MAX_BODY_SIZE, RESPONSE_MAX_BODY_SIZE,
I_OPT_RESPONSE_MAX_HEADER_COUNT, RESPONSE_MAX_HEADER_COUNT,
I_OPT_NONE), I_OK);
i_session.id_token_payload = json_pack("{ss}", "aud", "payload");
ck_assert_int_eq(i_set_rich_authorization_request_str(&i_session, AUTH_REQUEST_TYPE_1, AUTH_REQUEST_1), I_OK);
Expand Down Expand Up @@ -2824,6 +2854,8 @@ START_TEST(test_iddawc_import_multiple)
ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_ID_TOKEN_SID), ID_TOKEN_SID);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_SERVER_JWKS_CACHE_EXPIRATION), SERVER_JWKS_CACHE_EXPIRATION);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_SAVE_HTTP_REQUEST_RESPONSE), SAVE_HTTP_REQUEST_RESPONSE);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_RESPONSE_MAX_BODY_SIZE), RESPONSE_MAX_BODY_SIZE);
ck_assert_int_eq(i_get_int_parameter(&i_session, I_OPT_RESPONSE_MAX_HEADER_COUNT), RESPONSE_MAX_HEADER_COUNT);

ck_assert_int_eq(i_import_session_json_t(&i_session_import, j_export), I_OK);
ck_assert_int_eq(i_get_response_type(&i_session_import), I_RESPONSE_TYPE_CODE|I_RESPONSE_TYPE_TOKEN|I_RESPONSE_TYPE_ID_TOKEN);
Expand Down Expand Up @@ -2937,7 +2969,7 @@ START_TEST(test_iddawc_import_multiple)
ck_assert_str_eq(i_get_str_parameter(&i_session_import, I_OPT_CIBA_BINDING_MESSAGE), CIBA_BINDING_MESSAGE);
ck_assert_int_eq(i_get_int_parameter(&i_session_import, I_OPT_CIBA_REQUESTED_EXPIRY), CIBA_REQUESTED_EXPIRY);
ck_assert_str_eq(i_get_str_parameter(&i_session_import, I_OPT_CIBA_CLIENT_NOTIFICATION_TOKEN), CIBA_CLIENT_NOTIFICATION_TOKEN);
ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_CIBA_ACR_VALUES), CIBA_ACR_VALUES " " CIBA_ACR_VALUES_APPEND);
ck_assert_str_eq(i_get_str_parameter(&i_session_import, I_OPT_CIBA_ACR_VALUES), CIBA_ACR_VALUES " " CIBA_ACR_VALUES_APPEND);
ck_assert_str_eq(i_get_str_parameter(&i_session_import, I_OPT_CIBA_AUTH_REQ_ID), CIBA_AUTH_REQ_ID);
ck_assert_str_eq(i_get_str_parameter(&i_session_import, I_OPT_CIBA_CLIENT_NOTIFICATION_ENDPOINT), CIBA_CLIENT_NOTIFICATION_ENDPOINT);
ck_assert_int_eq(i_get_int_parameter(&i_session_import, I_OPT_CIBA_AUTH_REQ_EXPIRES_IN), CIBA_AUTH_REQ_EXPIRES_IN);
Expand All @@ -2950,8 +2982,10 @@ START_TEST(test_iddawc_import_multiple)
ck_assert_str_eq(i_get_str_parameter(&i_session_import, I_OPT_ID_TOKEN_SID), ID_TOKEN_SID);
ck_assert_int_eq(i_get_int_parameter(&i_session_import, I_OPT_SERVER_JWKS_CACHE_EXPIRATION), SERVER_JWKS_CACHE_EXPIRATION);
ck_assert_int_eq(i_get_int_parameter(&i_session_import, I_OPT_SAVE_HTTP_REQUEST_RESPONSE), SAVE_HTTP_REQUEST_RESPONSE);
ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_DPOP_NONCE_AS), DPOP_NONCE_AS);
ck_assert_str_eq(i_get_str_parameter(&i_session, I_OPT_DPOP_NONCE_RS), DPOP_NONCE_RS);
ck_assert_str_eq(i_get_str_parameter(&i_session_import, I_OPT_DPOP_NONCE_AS), DPOP_NONCE_AS);
ck_assert_str_eq(i_get_str_parameter(&i_session_import, I_OPT_DPOP_NONCE_RS), DPOP_NONCE_RS);
ck_assert_int_eq(i_get_int_parameter(&i_session_import, I_OPT_RESPONSE_MAX_BODY_SIZE), RESPONSE_MAX_BODY_SIZE);
ck_assert_int_eq(i_get_int_parameter(&i_session_import, I_OPT_RESPONSE_MAX_HEADER_COUNT), RESPONSE_MAX_HEADER_COUNT);

json_decref(j_export);

Expand Down
Loading

0 comments on commit 20dd127

Please sign in to comment.