|
44 | 44 | #include "cfg/provider.h" |
45 | 45 | #include "helper.h" |
46 | 46 |
|
47 | | -#include <http_config.h> |
48 | | - |
49 | | -static cmd_parms cmd = {}; |
50 | | - |
51 | 47 | // provider |
52 | 48 |
|
53 | 49 | START_TEST(test_cmd_provider_token_endpoint_auth_set) { |
54 | 50 | void *ptr = NULL; |
55 | 51 | const char *arg = NULL; |
56 | 52 | const char *rv = NULL; |
57 | | - |
58 | | - cmd.server = oidc_test_request_get()->server; |
59 | | - cmd.pool = oidc_test_request_get()->pool; |
60 | | - cmd.directive = apr_pcalloc(cmd.pool, sizeof(ap_directive_t)); |
61 | | - cmd.directive->directive = OIDCProviderTokenEndpointAuth; |
| 53 | + cmd_parms *cmd = oidc_test_cmd_get(OIDCProviderTokenEndpointAuth); |
62 | 54 |
|
63 | 55 | arg = "private_key_jwt"; |
64 | | - rv = oidc_cmd_provider_token_endpoint_auth_set(&cmd, ptr, arg); |
| 56 | + rv = oidc_cmd_provider_token_endpoint_auth_set(cmd, ptr, arg); |
65 | 57 | ck_assert_msg(rv == NULL, "failed: %s", rv); |
66 | 58 |
|
67 | 59 | arg = "private_key_jws"; |
68 | | - rv = oidc_cmd_provider_token_endpoint_auth_set(&cmd, ptr, arg); |
| 60 | + rv = oidc_cmd_provider_token_endpoint_auth_set(cmd, ptr, arg); |
69 | 61 | ck_assert_msg(rv != NULL, "should have failed"); |
70 | 62 |
|
71 | 63 | arg = "private_key_jwt:RS256"; |
72 | | - rv = oidc_cmd_provider_token_endpoint_auth_set(&cmd, ptr, arg); |
| 64 | + rv = oidc_cmd_provider_token_endpoint_auth_set(cmd, ptr, arg); |
73 | 65 | ck_assert_msg(rv == NULL, "failed: %s", rv); |
74 | 66 |
|
75 | 67 | arg = "private_key_jwt:RA256"; |
76 | | - rv = oidc_cmd_provider_token_endpoint_auth_set(&cmd, ptr, arg); |
| 68 | + rv = oidc_cmd_provider_token_endpoint_auth_set(cmd, ptr, arg); |
77 | 69 | ck_assert_msg(rv != NULL, "should have failed"); |
78 | 70 | } |
79 | 71 | END_TEST |
|
0 commit comments