aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/security
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/security')
-rw-r--r--src/core/lib/security/transport/client_auth_filter.cc10
-rw-r--r--src/core/lib/security/transport/server_auth_filter.cc14
2 files changed, 14 insertions, 10 deletions
diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc
index cd3c2e3f19..6a3641f112 100644
--- a/src/core/lib/security/transport/client_auth_filter.cc
+++ b/src/core/lib/security/transport/client_auth_filter.cc
@@ -37,8 +37,9 @@
#define MAX_CREDENTIALS_METADATA_COUNT 4
+namespace {
/* We can have a per-call credentials. */
-typedef struct {
+struct call_data {
grpc_call_stack* owning_call;
grpc_call_combiner* call_combiner;
grpc_call_credentials* creds;
@@ -57,13 +58,14 @@ typedef struct {
grpc_closure async_result_closure;
grpc_closure check_call_host_cancel_closure;
grpc_closure get_request_metadata_cancel_closure;
-} call_data;
+};
/* We can have a per-channel credentials. */
-typedef struct {
+struct channel_data {
grpc_channel_security_connector* security_connector;
grpc_auth_context* auth_context;
-} channel_data;
+};
+} // namespace
void grpc_auth_metadata_context_reset(
grpc_auth_metadata_context* auth_md_context) {
diff --git a/src/core/lib/security/transport/server_auth_filter.cc b/src/core/lib/security/transport/server_auth_filter.cc
index 73653f2a66..f82971dc56 100644
--- a/src/core/lib/security/transport/server_auth_filter.cc
+++ b/src/core/lib/security/transport/server_auth_filter.cc
@@ -26,13 +26,14 @@
#include "src/core/lib/security/transport/auth_filters.h"
#include "src/core/lib/slice/slice_internal.h"
-typedef enum {
+namespace {
+enum async_state {
STATE_INIT = 0,
STATE_DONE,
STATE_CANCELLED,
-} async_state;
+};
-typedef struct call_data {
+struct call_data {
grpc_call_combiner* call_combiner;
grpc_call_stack* owning_call;
grpc_transport_stream_op_batch* recv_initial_metadata_batch;
@@ -44,12 +45,13 @@ typedef struct call_data {
grpc_auth_context* auth_context;
grpc_closure cancel_closure;
gpr_atm state; // async_state
-} call_data;
+};
-typedef struct channel_data {
+struct channel_data {
grpc_auth_context* auth_context;
grpc_server_credentials* creds;
-} channel_data;
+};
+} // namespace
static grpc_metadata_array metadata_batch_to_md_array(
const grpc_metadata_batch* batch) {