The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) https://grpc.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Esun Kim 65be93cae3 [Example] C++ Auth/SSL example (#36842) 6 months ago
..
credentials [Example] C++ Auth/SSL example (#36842) 6 months ago
BUILD [Example] C++ Auth/SSL example (#36842) 6 months ago
CMakeLists.txt [Example] C++ Auth/SSL example (#36842) 6 months ago
README.md [Example] C++ Auth/SSL example (#36842) 6 months ago
helper.cc [Example] C++ Auth/SSL example (#36842) 6 months ago
helper.h [Example] C++ Auth/SSL example (#36842) 6 months ago
ssl_client.cc [Example] C++ Auth/SSL example (#36842) 6 months ago
ssl_server.cc [Example] C++ Auth/SSL example (#36842) 6 months ago

README.md

Authentication Example

Overview

SSL is a commonly used cryptographic protocol to provide end-to-end communication security. In the example, we show how to set up a server authenticated SSL connection to transmit RPC.

We provide grpc::SslServerCredentials and grpc::SslCredentials types to use SSL conections.

In our example, we use the public/private keys created ahead:

  • "localhost.crt" contains the server certificate (public key).
  • "localhost.key" contains the server private key.
  • "root.crt" contains the certificate (certificate authority) that can verify the server's certificate.

Try it!

Once you have working gRPC, you can build this example using either bazel or cmake. Make sure to run those at this directory so that they can read credential files properly.

Run the server, which will listen on port 50051:

$ ./ssl_server

Run the client (in a different terminal):

$ ./ssl_client

If things go smoothly, you will see the client output:

Greeter received: Hello world