finished 1st revision
diff --git a/src/core/lib/security/security_connector/local_security_connector.cc b/src/core/lib/security/security_connector/local_security_connector.cc
index 3fe7201..29e60e5 100644
--- a/src/core/lib/security/security_connector/local_security_connector.cc
+++ b/src/core/lib/security/security_connector/local_security_connector.cc
@@ -125,6 +125,11 @@
grpc_auth_context** auth_context,
grpc_closure* on_peer_checked) {
grpc_security_status status;
+ /* Create an auth context which is necessary to pass the santiy check in
+ * {client, server}_auth_filter that verifies if the peer's auth context is
+ * obtained during handshakes. The auth context is only checked for its
+ * existence and not actually used.
+ */
status = local_auth_context_create(auth_context);
grpc_error* error = status == GRPC_SECURITY_OK
? GRPC_ERROR_NONE
diff --git a/src/core/tsi/local_transport_security.cc b/src/core/tsi/local_transport_security.cc
index 2799098..99fd56d 100644
--- a/src/core/tsi/local_transport_security.cc
+++ b/src/core/tsi/local_transport_security.cc
@@ -31,8 +31,6 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/tsi/transport_security_grpc.h"
-#define TSI_LOCAL_PEER_IDENTITY "local"
-
/* Main struct for local TSI zero-copy frame protector. */
typedef struct local_zero_copy_grpc_protector {
tsi_zero_copy_grpc_protector base;
@@ -41,7 +39,6 @@
/* Main struct for local TSI handshaker result. */
typedef struct local_tsi_handshaker_result {
tsi_handshaker_result base;
- char* peer_identity;
bool is_client;
} local_tsi_handshaker_result;
@@ -133,7 +130,6 @@
local_tsi_handshaker_result* result =
reinterpret_cast<local_tsi_handshaker_result*>(
const_cast<tsi_handshaker_result*>(self));
- gpr_free(result->peer_identity);
gpr_free(result);
}
@@ -154,15 +150,6 @@
static_cast<local_tsi_handshaker_result*>(gpr_zalloc(sizeof(*result)));
result->is_client = is_client;
result->base.vtable = &result_vtable;
- /* Create a peer identity with random information that will be later converted
- * to auth context. Without this peer identity, the santiy check in {client,
- * server}_auth_filter that verifies if the peer's auth context is obtained
- * during handshakes will fail. Since the peer identity information in auth
- * context is only checked for its existence (not actually used), we only
- * populate some random data and later will provision more meaningful peer if
- * needed (e.g., peer's pid/uid/gid from credentials).
- */
- result->peer_identity = gpr_strdup(TSI_LOCAL_PEER_IDENTITY);
*self = &result->base;
return TSI_OK;
}