diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-14 08:02:45 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-14 08:02:45 -0800 |
commit | 3cf79228ffcdd5c867b4067d6f6a5743a14d3ff1 (patch) | |
tree | 86778cc9c61666939677f67956a4f6539a79b6bf /test/core/security | |
parent | d5a7a8a61eb3c1d5759f79c9cb4667a4d2df0d25 (diff) |
Review feedback
Diffstat (limited to 'test/core/security')
-rw-r--r-- | test/core/security/jwt_verifier_test.c | 14 | ||||
-rw-r--r-- | test/core/security/verify_jwt.c | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 14321d164e..71da935eeb 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -306,16 +306,14 @@ static int httpcli_get_google_keys_for_email( return 1; } -static void on_verification_success(void *user_data, +static void on_verification_success(grpc_exec_ctx *exec_ctx, void *user_data, grpc_jwt_verifier_status status, grpc_jwt_claims *claims) { GPR_ASSERT(status == GRPC_JWT_VERIFIER_OK); GPR_ASSERT(claims != NULL); GPR_ASSERT(user_data == (void *)expected_user_data); GPR_ASSERT(strcmp(grpc_jwt_claims_audience(claims), expected_audience) == 0); - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_jwt_claims_destroy(&exec_ctx, claims); - grpc_exec_ctx_finish(&exec_ctx); + grpc_jwt_claims_destroy(exec_ctx, claims); } static void test_jwt_verifier_google_email_issuer_success(void) { @@ -423,7 +421,8 @@ static void test_jwt_verifier_url_issuer_success(void) { grpc_httpcli_set_override(NULL, NULL); } -static void on_verification_key_retrieval_error(void *user_data, +static void on_verification_key_retrieval_error(grpc_exec_ctx *exec_ctx, + void *user_data, grpc_jwt_verifier_status status, grpc_jwt_claims *claims) { GPR_ASSERT(status == GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR); @@ -508,7 +507,8 @@ static void corrupt_jwt_sig(char *jwt) { grpc_slice_unref(sig); } -static void on_verification_bad_signature(void *user_data, +static void on_verification_bad_signature(grpc_exec_ctx *exec_ctx, + void *user_data, grpc_jwt_verifier_status status, grpc_jwt_claims *claims) { GPR_ASSERT(status == GRPC_JWT_VERIFIER_BAD_SIGNATURE); @@ -549,7 +549,7 @@ static int httpcli_get_should_not_be_called(grpc_exec_ctx *exec_ctx, return 1; } -static void on_verification_bad_format(void *user_data, +static void on_verification_bad_format(grpc_exec_ctx *exec_ctx, void *user_data, grpc_jwt_verifier_status status, grpc_jwt_claims *claims) { GPR_ASSERT(status == GRPC_JWT_VERIFIER_BAD_FORMAT); diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c index 043d29e6bb..32169bb8d2 100644 --- a/test/core/security/verify_jwt.c +++ b/test/core/security/verify_jwt.c @@ -59,7 +59,7 @@ static void print_usage_and_exit(gpr_cmdline *cl, const char *argv0) { exit(1); } -static void on_jwt_verification_done(void *user_data, +static void on_jwt_verification_done(grpc_exec_ctx *exec_ctx, void *user_data, grpc_jwt_verifier_status status, grpc_jwt_claims *claims) { synchronizer *sync = user_data; @@ -72,7 +72,7 @@ static void on_jwt_verification_done(void *user_data, grpc_json_dump_to_string((grpc_json *)grpc_jwt_claims_json(claims), 2); printf("Claims: \n\n%s\n", claims_str); gpr_free(claims_str); - grpc_jwt_claims_destroy(claims); + grpc_jwt_claims_destroy(exec_ctx, claims); } else { GPR_ASSERT(claims == NULL); fprintf(stderr, "Verification failed with error %s\n", |