diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-29 19:07:44 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-29 19:07:44 -0800 |
commit | c354269ba7bd1f6dfe9c86ba18f38fc8e346dcfc (patch) | |
tree | bcc5b75945a13ad9c2e805b66989206ebfd02d6f /test/core/security | |
parent | 26e934245d2af33f613f932f290315c5c9feca27 (diff) |
Remove _ prefixed variable names
Diffstat (limited to 'test/core/security')
-rw-r--r-- | test/core/security/credentials_test.cc | 54 | ||||
-rw-r--r-- | test/core/security/json_token_test.cc | 4 | ||||
-rw-r--r-- | test/core/security/jwt_verifier_test.cc | 26 | ||||
-rw-r--r-- | test/core/security/oauth2_utils.cc | 2 | ||||
-rw-r--r-- | test/core/security/print_google_default_creds_token.cc | 2 | ||||
-rw-r--r-- | test/core/security/secure_endpoint_test.cc | 6 | ||||
-rw-r--r-- | test/core/security/ssl_server_fuzzer.cc | 2 | ||||
-rw-r--r-- | test/core/security/verify_jwt.cc | 2 |
8 files changed, 49 insertions, 49 deletions
diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index 7d0a24a459..ecc61928f5 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -148,7 +148,7 @@ static grpc_httpcli_response http_response(int status, const char* body) { /* -- Tests. -- */ static void test_empty_md_array(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_credentials_mdelem_array md_array; memset(&md_array, 0, sizeof(md_array)); GPR_ASSERT(md_array.md == nullptr); @@ -157,7 +157,7 @@ static void test_empty_md_array(void) { } static void test_add_to_empty_md_array(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_credentials_mdelem_array md_array; memset(&md_array, 0, sizeof(md_array)); const char* key = "hello"; @@ -172,7 +172,7 @@ static void test_add_to_empty_md_array(void) { } static void test_add_abunch_to_md_array(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_credentials_mdelem_array md_array; memset(&md_array, 0, sizeof(md_array)); const char* key = "hello"; @@ -191,7 +191,7 @@ static void test_add_abunch_to_md_array(void) { } static void test_oauth2_token_fetcher_creds_parsing_ok(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -208,7 +208,7 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) { } static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -220,7 +220,7 @@ static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) { } static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = http_response(200, ""); @@ -231,7 +231,7 @@ static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) { } static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -246,7 +246,7 @@ static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) { } static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = http_response(200, @@ -260,7 +260,7 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) { } static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -276,7 +276,7 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) { static void test_oauth2_token_fetcher_creds_parsing_missing_token_lifetime( void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -378,7 +378,7 @@ static void run_request_metadata_test(grpc_call_credentials* creds, } static void test_google_iam_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = {{GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, test_google_iam_authorization_token}, {GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, @@ -395,7 +395,7 @@ static void test_google_iam_creds(void) { } static void test_access_token_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = {{GRPC_AUTHORIZATION_METADATA_KEY, "Bearer blah"}}; request_metadata_state* state = make_request_metadata_state(GRPC_ERROR_NONE, emd, GPR_ARRAY_SIZE(emd)); @@ -419,7 +419,7 @@ static grpc_security_status check_channel_oauth2_create_security_connector( } static void test_channel_oauth2_composite_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args* new_args; grpc_channel_credentials_vtable vtable = { nullptr, check_channel_oauth2_create_security_connector, nullptr}; @@ -439,7 +439,7 @@ static void test_channel_oauth2_composite_creds(void) { } static void test_oauth2_google_iam_composite_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {GRPC_AUTHORIZATION_METADATA_KEY, test_oauth2_bearer_token}, {GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, @@ -492,7 +492,7 @@ check_channel_oauth2_google_iam_create_security_connector( } static void test_channel_oauth2_google_iam_composite_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args* new_args; grpc_channel_credentials_vtable vtable = { nullptr, check_channel_oauth2_google_iam_create_security_connector, @@ -570,7 +570,7 @@ static int httpcli_get_should_not_be_called(const grpc_httpcli_request* request, } static void test_compute_engine_creds_success(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; grpc_call_credentials* creds = @@ -599,7 +599,7 @@ static void test_compute_engine_creds_success(void) { } static void test_compute_engine_creds_failure(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; request_metadata_state* state = make_request_metadata_state( GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Error occured when fetching oauth2 token."), @@ -659,7 +659,7 @@ static int refresh_token_httpcli_post_failure( } static void test_refresh_token_creds_success(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, @@ -688,7 +688,7 @@ static void test_refresh_token_creds_success(void) { } static void test_refresh_token_creds_failure(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; request_metadata_state* state = make_request_metadata_state( GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Error occured when fetching oauth2 token."), @@ -791,7 +791,7 @@ static void test_jwt_creds_lifetime(void) { static void test_jwt_creds_success(void) { char* json_key_string = test_json_key_str(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; char* expected_md_value; @@ -833,7 +833,7 @@ static void test_jwt_creds_success(void) { static void test_jwt_creds_signing_failure(void) { char* json_key_string = test_json_key_str(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; request_metadata_state* state = make_request_metadata_state( @@ -865,7 +865,7 @@ static void set_google_default_creds_env_var_with_file_contents( } static void test_google_default_creds_auth_key(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_service_account_jwt_access_credentials* jwt; grpc_composite_channel_credentials* creds; char* json_key = test_json_key_str(); @@ -886,7 +886,7 @@ static void test_google_default_creds_auth_key(void) { } static void test_google_default_creds_refresh_token(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_google_refresh_token_credentials* refresh; grpc_composite_channel_credentials* creds; grpc_flush_cached_google_default_credentials(); @@ -921,7 +921,7 @@ static int default_creds_gce_detection_httpcli_get_success_override( static char* null_well_known_creds_path_getter(void) { return nullptr; } static void test_google_default_creds_gce(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; request_metadata_state* state = @@ -1056,7 +1056,7 @@ static void plugin_destroy(void* state) { static void test_metadata_plugin_success(void) { plugin_state state = PLUGIN_INITIAL_STATE; grpc_metadata_credentials_plugin plugin; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; request_metadata_state* md_state = make_request_metadata_state( @@ -1079,7 +1079,7 @@ static void test_metadata_plugin_success(void) { static void test_metadata_plugin_failure(void) { plugin_state state = PLUGIN_INITIAL_STATE; grpc_metadata_credentials_plugin plugin; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; char* expected_error; @@ -1121,7 +1121,7 @@ static void test_get_well_known_google_credentials_file_path(void) { } static void test_channel_creds_duplicate_without_call_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_credentials* channel_creds = grpc_fake_transport_security_credentials_create(); diff --git a/test/core/security/json_token_test.cc b/test/core/security/json_token_test.cc index 57e2f4c978..aac9cc0029 100644 --- a/test/core/security/json_token_test.cc +++ b/test/core/security/json_token_test.cc @@ -207,7 +207,7 @@ static void test_parse_json_key_failure_no_private_key(void) { static grpc_json* parse_json_part_from_jwt(const char* str, size_t len, char** scratchpad) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; char* b64; char* decoded; grpc_json* json; @@ -327,7 +327,7 @@ static void check_jwt_claim(grpc_json* claim, const char* expected_audience, static void check_jwt_signature(const char* b64_signature, RSA* rsa_key, const char* signed_data, size_t signed_data_size) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; EVP_MD_CTX* md_ctx = EVP_MD_CTX_create(); EVP_PKEY* key = EVP_PKEY_new(); diff --git a/test/core/security/jwt_verifier_test.cc b/test/core/security/jwt_verifier_test.cc index ec14fec697..e219260b1d 100644 --- a/test/core/security/jwt_verifier_test.cc +++ b/test/core/security/jwt_verifier_test.cc @@ -209,7 +209,7 @@ static void test_claims_success(void) { grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != nullptr); GPR_ASSERT(grpc_jwt_claims_json(claims) == json); @@ -231,7 +231,7 @@ static void test_expired_claims_failure(void) { gpr_timespec exp_exp = {120, 0, GPR_CLOCK_REALTIME}; gpr_timespec exp_nbf = {60, 0, GPR_CLOCK_REALTIME}; GPR_ASSERT(json != nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != nullptr); GPR_ASSERT(grpc_jwt_claims_json(claims) == json); @@ -252,7 +252,7 @@ static void test_invalid_claims_failure(void) { grpc_slice s = grpc_slice_from_copied_string(invalid_claims); grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_jwt_claims_from_json(json, s) == nullptr); } @@ -262,7 +262,7 @@ static void test_bad_audience_claims_failure(void) { grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != nullptr); GPR_ASSERT(grpc_jwt_claims_check(claims, "https://bar.com") == @@ -276,7 +276,7 @@ static void test_bad_subject_claims_failure(void) { grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != nullptr); GPR_ASSERT(grpc_jwt_claims_check(claims, "https://foo.com") == @@ -350,7 +350,7 @@ static void on_verification_success(void* user_data, } static void test_jwt_verifier_google_email_issuer_success(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_google_email_issuer); @@ -383,7 +383,7 @@ static int httpcli_get_custom_keys_for_email( } static void test_jwt_verifier_custom_email_issuer_success(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(&custom_mapping, 1); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_custom_email_issuer); @@ -430,7 +430,7 @@ static int httpcli_get_openid_config(const grpc_httpcli_request* request, } static void test_jwt_verifier_url_issuer_success(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_url_issuer); @@ -469,7 +469,7 @@ static int httpcli_get_bad_json(const grpc_httpcli_request* request, } static void test_jwt_verifier_url_issuer_bad_config(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_url_issuer); @@ -492,7 +492,7 @@ static void test_jwt_verifier_url_issuer_bad_config(void) { } static void test_jwt_verifier_bad_json_key(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_google_email_issuer); @@ -521,7 +521,7 @@ static void corrupt_jwt_sig(char* jwt) { char* last_dot = strrchr(jwt, '.'); GPR_ASSERT(last_dot != nullptr); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; sig = grpc_base64_decode(last_dot + 1, 1); } GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); @@ -543,7 +543,7 @@ static void on_verification_bad_signature(void* user_data, } static void test_jwt_verifier_bad_signature(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_url_issuer); @@ -583,7 +583,7 @@ static void on_verification_bad_format(void* user_data, } static void test_jwt_verifier_bad_format(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); grpc_httpcli_set_override(httpcli_get_should_not_be_called, httpcli_post_should_not_be_called); diff --git a/test/core/security/oauth2_utils.cc b/test/core/security/oauth2_utils.cc index 7551d7df85..0d3a1279af 100644 --- a/test/core/security/oauth2_utils.cc +++ b/test/core/security/oauth2_utils.cc @@ -69,7 +69,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials( grpc_call_credentials* creds) { oauth2_request request; memset(&request, 0, sizeof(request)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_closure do_nothing_closure; grpc_auth_metadata_context null_ctx = {"", "", nullptr, nullptr}; diff --git a/test/core/security/print_google_default_creds_token.cc b/test/core/security/print_google_default_creds_token.cc index 7089b9808a..b3742f58a8 100644 --- a/test/core/security/print_google_default_creds_token.cc +++ b/test/core/security/print_google_default_creds_token.cc @@ -62,7 +62,7 @@ static void on_metadata_response(void* arg, grpc_error* error) { int main(int argc, char** argv) { int result = 0; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; synchronizer sync; grpc_channel_credentials* creds = nullptr; const char* service_url = "https://test.foo.google.com/Foo"; diff --git a/test/core/security/secure_endpoint_test.cc b/test/core/security/secure_endpoint_test.cc index c8f4f32538..38c78fed42 100644 --- a/test/core/security/secure_endpoint_test.cc +++ b/test/core/security/secure_endpoint_test.cc @@ -38,7 +38,7 @@ static grpc_pollset* g_pollset; static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( size_t slice_size, grpc_slice* leftover_slices, size_t leftover_nslices, bool use_zero_copy_protector) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; tsi_frame_protector* fake_read_protector = tsi_create_fake_frame_protector(nullptr); tsi_frame_protector* fake_write_protector = @@ -172,7 +172,7 @@ static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) { grpc_slice_buffer incoming; grpc_slice s = grpc_slice_from_copied_string("hello world 12345678900987654321"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; int n = 0; grpc_closure done_closure; gpr_log(GPR_INFO, "Start test left over"); @@ -209,7 +209,7 @@ int main(int argc, char** argv) { grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_pollset = (grpc_pollset*)gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); grpc_endpoint_tests(configs[0], g_pollset, g_mu); diff --git a/test/core/security/ssl_server_fuzzer.cc b/test/core/security/ssl_server_fuzzer.cc index 9cf73fa871..7056cfe581 100644 --- a/test/core/security/ssl_server_fuzzer.cc +++ b/test/core/security/ssl_server_fuzzer.cc @@ -56,7 +56,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (leak_check) grpc_memory_counters_init(); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_quota* resource_quota = grpc_resource_quota_create("ssl_server_fuzzer"); diff --git a/test/core/security/verify_jwt.cc b/test/core/security/verify_jwt.cc index 1bd92bbc97..e039970c67 100644 --- a/test/core/security/verify_jwt.cc +++ b/test/core/security/verify_jwt.cc @@ -76,7 +76,7 @@ int main(int argc, char** argv) { gpr_cmdline* cl; const char* jwt = nullptr; const char* aud = nullptr; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_init(); cl = gpr_cmdline_create("JWT verifier tool"); |