From b0829ebaf174216787c9a9557cf4a40afa2c8023 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 Mar 2015 09:30:55 -0800 Subject: [PATCH] C# server side TLS support --- include/grpc/grpc_security.h | 3 +- src/csharp/Grpc.Core/Grpc.Core.csproj | 2 + .../Internal/ServerCredentialsSafeHandle.cs | 68 +++++++++++ .../Grpc.Core/Internal/ServerSafeHandle.cs | 9 +- src/csharp/Grpc.Core/Server.cs | 12 +- src/csharp/Grpc.Core/ServerCredentials.cs | 107 ++++++++++++++++++ .../Grpc.IntegrationTesting.csproj | 1 + .../Grpc.IntegrationTesting/InteropClient.cs | 13 +-- .../InteropClientServerTest.cs | 8 +- .../Grpc.IntegrationTesting/InteropServer.cs | 12 +- .../TestCredentials.cs | 83 ++++++++++++++ src/csharp/ext/grpc_csharp_ext.c | 35 ++++++ 12 files changed, 334 insertions(+), 19 deletions(-) create mode 100644 src/csharp/Grpc.Core/Internal/ServerCredentialsSafeHandle.cs create mode 100644 src/csharp/Grpc.Core/ServerCredentials.cs create mode 100644 src/csharp/Grpc.IntegrationTesting/TestCredentials.cs diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index ab2cc08489d..c297622a512 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -167,10 +167,9 @@ grpc_server_credentials *grpc_ssl_server_credentials_create( grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( void); -/* --- Secure server creation. --- */ +/* --- Server-side secure ports. --- */ /* Add a HTTP2 over an encrypted link over tcp listener. - Server must have been created with grpc_secure_server_create. Returns bound port number on success, 0 on failure. REQUIRES: server not started */ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index 78b6cdde59b..c4b12b1cab0 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -74,6 +74,8 @@ + +