aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-30 11:17:23 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-30 11:17:23 -0700
commit43e613257a38df21906dabaf0ac0f8662379c9a8 (patch)
tree995ad6e4df513a082ac0dc2c72a5e565a00fe5e8
parentf29a6c107df0aded7dac1a32bb2cbf10f98b08dd (diff)
Fixup merge
-rw-r--r--src/core/security/credentials.c85
-rw-r--r--src/core/security/credentials.h10
-rw-r--r--test/core/end2end/tests/request_response_with_payload_and_call_creds.c7
3 files changed, 0 insertions, 102 deletions
diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c
index ae02949670..a195af548a 100644
--- a/src/core/security/credentials.c
+++ b/src/core/security/credentials.c
@@ -228,18 +228,9 @@ static grpc_security_status ssl_server_create_security_connector(
return grpc_ssl_server_security_connector_create(&c->config, sc);
}
-<<<<<<< HEAD
-static grpc_credentials_vtable ssl_vtable = {ssl_destroy,
- ssl_has_request_metadata,
- ssl_has_request_metadata_only,
- ssl_get_metadata_context,
- NULL,
- ssl_create_security_connector};
-=======
static grpc_credentials_vtable ssl_vtable = {
ssl_destroy, ssl_has_request_metadata, ssl_has_request_metadata_only, NULL,
ssl_create_security_connector};
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
static grpc_server_credentials_vtable ssl_server_vtable = {
ssl_server_destroy, ssl_server_create_security_connector};
@@ -421,23 +412,9 @@ static void jwt_get_request_metadata(grpc_credentials *creds,
}
}
-<<<<<<< HEAD
-static grpc_mdctx *jwt_get_metadata_context(grpc_credentials *creds) {
- grpc_jwt_credentials *c = (grpc_jwt_credentials *)creds;
- return c->md_ctx;
-}
-
-static grpc_credentials_vtable jwt_vtable = {jwt_destroy,
- jwt_has_request_metadata,
- jwt_has_request_metadata_only,
- jwt_get_metadata_context,
- jwt_get_request_metadata,
- NULL};
-=======
static grpc_credentials_vtable jwt_vtable = {
jwt_destroy, jwt_has_request_metadata, jwt_has_request_metadata_only,
jwt_get_request_metadata, NULL};
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
grpc_credentials *grpc_jwt_credentials_create(const char *json_key,
gpr_timespec token_lifetime) {
@@ -483,11 +460,7 @@ static void oauth2_token_fetcher_destroy(grpc_credentials *creds) {
(grpc_oauth2_token_fetcher_credentials *)creds;
grpc_credentials_md_store_unref(c->access_token_md);
gpr_mu_destroy(&c->mu);
-<<<<<<< HEAD
- grpc_mdctx_unref(c->md_ctx);
grpc_pollset_set_destroy(&c->pollset_set);
-=======
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
gpr_free(c);
}
@@ -660,13 +633,7 @@ static grpc_credentials_vtable compute_engine_vtable = {
oauth2_token_fetcher_destroy,
oauth2_token_fetcher_has_request_metadata,
oauth2_token_fetcher_has_request_metadata_only,
-<<<<<<< HEAD
- oauth2_token_fetcher_get_metadata_context,
- oauth2_token_fetcher_get_request_metadata,
- NULL};
-=======
oauth2_token_fetcher_get_request_metadata, NULL};
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
static void compute_engine_fetch_oauth2(
grpc_credentials_metadata_request *metadata_req,
@@ -712,13 +679,7 @@ static grpc_credentials_vtable service_account_vtable = {
service_account_destroy,
oauth2_token_fetcher_has_request_metadata,
oauth2_token_fetcher_has_request_metadata_only,
-<<<<<<< HEAD
- oauth2_token_fetcher_get_metadata_context,
- oauth2_token_fetcher_get_request_metadata,
- NULL};
-=======
oauth2_token_fetcher_get_request_metadata, NULL};
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
static void service_account_fetch_oauth2(
grpc_credentials_metadata_request *metadata_req,
@@ -792,13 +753,7 @@ static grpc_credentials_vtable refresh_token_vtable = {
refresh_token_destroy,
oauth2_token_fetcher_has_request_metadata,
oauth2_token_fetcher_has_request_metadata_only,
-<<<<<<< HEAD
- oauth2_token_fetcher_get_metadata_context,
- oauth2_token_fetcher_get_request_metadata,
- NULL};
-=======
oauth2_token_fetcher_get_request_metadata, NULL};
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
static void refresh_token_fetch_oauth2(
grpc_credentials_metadata_request *metadata_req,
@@ -891,16 +846,8 @@ static void fake_oauth2_get_request_metadata(grpc_credentials *creds,
}
static grpc_credentials_vtable fake_oauth2_vtable = {
-<<<<<<< HEAD
- fake_oauth2_destroy,
- fake_oauth2_has_request_metadata,
- fake_oauth2_has_request_metadata_only,
- fake_oauth2_get_metadata_context,
- fake_oauth2_get_request_metadata,
-=======
fake_oauth2_destroy, fake_oauth2_has_request_metadata,
fake_oauth2_has_request_metadata_only, fake_oauth2_get_request_metadata,
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
NULL};
grpc_credentials *grpc_fake_oauth2_credentials_create(
@@ -940,17 +887,8 @@ static int fake_transport_security_has_request_metadata_only(
return 0;
}
-<<<<<<< HEAD
-static grpc_mdctx *fake_transport_security_get_metadata_context(
- grpc_credentials *c) {
- return NULL;
-}
-
-static grpc_security_status fake_transport_security_create_security_connector(
-=======
static grpc_security_status
fake_transport_security_create_security_connector(
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
grpc_credentials *c, const char *target, const grpc_channel_args *args,
grpc_credentials *request_metadata_creds,
grpc_channel_security_connector **sc, grpc_channel_args **new_args) {
@@ -968,13 +906,7 @@ fake_transport_security_server_create_security_connector(
static grpc_credentials_vtable fake_transport_security_credentials_vtable = {
fake_transport_security_credentials_destroy,
fake_transport_security_has_request_metadata,
-<<<<<<< HEAD
- fake_transport_security_has_request_metadata_only,
- fake_transport_security_get_metadata_context,
- NULL,
-=======
fake_transport_security_has_request_metadata_only, NULL,
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
fake_transport_security_create_security_connector};
static grpc_server_credentials_vtable
@@ -1137,16 +1069,8 @@ static grpc_security_status composite_create_security_connector(
}
static grpc_credentials_vtable composite_credentials_vtable = {
-<<<<<<< HEAD
- composite_destroy,
- composite_has_request_metadata,
- composite_has_request_metadata_only,
- composite_get_metadata_context,
- composite_get_request_metadata,
-=======
composite_destroy, composite_has_request_metadata,
composite_has_request_metadata_only, composite_get_request_metadata,
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
composite_create_security_connector};
static grpc_credentials_array get_creds_array(grpc_credentials **creds_addr) {
@@ -1268,18 +1192,9 @@ static void iam_get_request_metadata(grpc_credentials *creds,
GRPC_CREDENTIALS_OK);
}
-<<<<<<< HEAD
-static grpc_credentials_vtable iam_vtable = {iam_destroy,
- iam_has_request_metadata,
- iam_has_request_metadata_only,
- iam_get_metadata_context,
- iam_get_request_metadata,
- NULL};
-=======
static grpc_credentials_vtable iam_vtable = {
iam_destroy, iam_has_request_metadata, iam_has_request_metadata_only,
iam_get_request_metadata, NULL};
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
grpc_credentials *grpc_iam_credentials_create(const char *token,
const char *authority_selector) {
diff --git a/src/core/security/credentials.h b/src/core/security/credentials.h
index 059a723afb..85931d384d 100644
--- a/src/core/security/credentials.h
+++ b/src/core/security/credentials.h
@@ -123,13 +123,8 @@ typedef struct {
void (*destroy)(grpc_credentials *c);
int (*has_request_metadata)(const grpc_credentials *c);
int (*has_request_metadata_only)(const grpc_credentials *c);
-<<<<<<< HEAD
- grpc_mdctx *(*get_metadata_context)(grpc_credentials *c);
- void (*get_request_metadata)(grpc_credentials *c, const char *service_url,
-=======
void (*get_request_metadata)(grpc_credentials *c,
const char *service_url,
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
grpc_credentials_metadata_cb cb,
void *user_data);
grpc_security_status (*create_security_connector)(
@@ -181,13 +176,8 @@ grpc_credentials *grpc_credentials_contains_type(
/* Exposed for testing only. */
grpc_credentials_status
grpc_oauth2_token_fetcher_credentials_parse_server_response(
-<<<<<<< HEAD
- const struct grpc_httpcli_response *response, grpc_mdctx *ctx,
- grpc_mdelem **token_elem, gpr_timespec *token_lifetime);
-=======
const struct grpc_httpcli_response *response, grpc_credentials_md_store **token_md,
gpr_timespec *token_lifetime);
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
/* Simulates an oauth2 token fetch with the specified value for testing. */
grpc_credentials *grpc_fake_oauth2_credentials_create(
diff --git a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
index a89b47e7b9..45057f07c5 100644
--- a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
+++ b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
@@ -229,20 +229,13 @@ static void request_response_with_payload_and_call_creds(
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(f.server, &s,
&call_details,
&request_metadata_recv,
-<<<<<<< HEAD
f.cq, f.cq,
tag(101)));
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
-=======
- f.server_cq, f.server_cq,
- tag(101)));
- cq_expect_completion(v_server, tag(101), 1);
- cq_verify(v_server);
s_auth_context = grpc_call_auth_context(s);
GPR_ASSERT(s_auth_context != NULL);
print_auth_context(0, s_auth_context);
->>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
/* Cannot set creds on the server call object. */
GPR_ASSERT(grpc_call_set_credentials(s, NULL) != GRPC_CALL_OK);