aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/security
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-01-04 15:35:26 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-01-04 15:35:26 -0800
commitbe52c6e9c29a3bcd61e8766bddd567a33a83bd87 (patch)
tree06ea43bf839915c9a4594350b77893ca74bc962b /src/core/security
parent482234f456cb0cc71fa8ca39af758d4b976b7b47 (diff)
clang-format code
Diffstat (limited to 'src/core/security')
-rw-r--r--src/core/security/client_auth_filter.c4
-rw-r--r--src/core/security/credentials.c2
-rw-r--r--src/core/security/jwt_verifier.c4
-rw-r--r--src/core/security/security_connector.c17
-rw-r--r--src/core/security/security_connector.h5
5 files changed, 15 insertions, 17 deletions
diff --git a/src/core/security/client_auth_filter.c b/src/core/security/client_auth_filter.c
index 1cb247d874..a96a66f86d 100644
--- a/src/core/security/client_auth_filter.c
+++ b/src/core/security/client_auth_filter.c
@@ -232,8 +232,8 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx,
}
sec_ctx = op->context[GRPC_CONTEXT_SECURITY].value;
GRPC_AUTH_CONTEXT_UNREF(sec_ctx->auth_context, "client auth filter");
- sec_ctx->auth_context = GRPC_AUTH_CONTEXT_REF(
- chand->auth_context, "client_auth_filter");
+ sec_ctx->auth_context =
+ GRPC_AUTH_CONTEXT_REF(chand->auth_context, "client_auth_filter");
}
if (op->send_initial_metadata != NULL) {
diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c
index 1d1c3b098a..65aa908fa1 100644
--- a/src/core/security/credentials.c
+++ b/src/core/security/credentials.c
@@ -180,7 +180,7 @@ void grpc_server_credentials_set_auth_metadata_processor(
"grpc_server_credentials_set_auth_metadata_processor("
"creds=%p, "
"processor=grpc_auth_metadata_processor { process: %p, state: %p })",
- 3, (creds, (void*)(gpr_intptr)processor.process, processor.state));
+ 3, (creds, (void *)(gpr_intptr)processor.process, processor.state));
if (creds == NULL) return;
if (creds->processor.destroy != NULL && creds->processor.state != NULL) {
creds->processor.destroy(creds->processor.state);
diff --git a/src/core/security/jwt_verifier.c b/src/core/security/jwt_verifier.c
index 0d1d434570..6697192468 100644
--- a/src/core/security/jwt_verifier.c
+++ b/src/core/security/jwt_verifier.c
@@ -443,8 +443,8 @@ static BIGNUM *bignum_from_base64(const char *b64) {
gpr_log(GPR_ERROR, "Invalid base64 for big num.");
return NULL;
}
- result =
- BN_bin2bn(GPR_SLICE_START_PTR(bin), TSI_SIZE_AS_SIZE(GPR_SLICE_LENGTH(bin)), NULL);
+ result = BN_bin2bn(GPR_SLICE_START_PTR(bin),
+ TSI_SIZE_AS_SIZE(GPR_SLICE_LENGTH(bin)), NULL);
gpr_slice_unref(bin);
return result;
}
diff --git a/src/core/security/security_connector.c b/src/core/security/security_connector.c
index 204cd324f6..a115b942a6 100644
--- a/src/core/security/security_connector.c
+++ b/src/core/security/security_connector.c
@@ -316,8 +316,7 @@ grpc_channel_security_connector *grpc_fake_channel_security_connector_create(
c->base.is_client_side = 1;
c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME;
c->base.vtable = &fake_channel_vtable;
- c->request_metadata_creds =
- grpc_call_credentials_ref(request_metadata_creds);
+ c->request_metadata_creds = grpc_call_credentials_ref(request_metadata_creds);
c->check_call_host = fake_channel_check_call_host;
return c;
}
@@ -500,9 +499,10 @@ static grpc_security_status ssl_check_peer(grpc_security_connector *sc,
return GRPC_SECURITY_OK;
}
-static void ssl_channel_check_peer(
- grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer,
- grpc_security_peer_check_cb cb, void *user_data) {
+static void ssl_channel_check_peer(grpc_exec_ctx *exec_ctx,
+ grpc_security_connector *sc, tsi_peer peer,
+ grpc_security_peer_check_cb cb,
+ void *user_data) {
grpc_ssl_channel_security_connector *c =
(grpc_ssl_channel_security_connector *)sc;
grpc_security_status status;
@@ -516,9 +516,10 @@ static void ssl_channel_check_peer(
tsi_peer_destruct(&peer);
}
-static void ssl_server_check_peer(
- grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer,
- grpc_security_peer_check_cb cb, void *user_data) {
+static void ssl_server_check_peer(grpc_exec_ctx *exec_ctx,
+ grpc_security_connector *sc, tsi_peer peer,
+ grpc_security_peer_check_cb cb,
+ void *user_data) {
grpc_auth_context *auth_context = NULL;
grpc_security_status status = ssl_check_peer(sc, NULL, &peer, &auth_context);
tsi_peer_destruct(&peer);
diff --git a/src/core/security/security_connector.h b/src/core/security/security_connector.h
index b5f3ff17f4..cc6cc742c8 100644
--- a/src/core/security/security_connector.h
+++ b/src/core/security/security_connector.h
@@ -40,10 +40,7 @@
/* --- status enum. --- */
-typedef enum {
- GRPC_SECURITY_OK = 0,
- GRPC_SECURITY_ERROR
-} grpc_security_status;
+typedef enum { GRPC_SECURITY_OK = 0, GRPC_SECURITY_ERROR } grpc_security_status;
/* --- URL schemes. --- */