title: Use SSL in gRPC client server communication
body: <p>I know nothing about SSL/TLS and am trying to use SSL/TLS channel in gRPC by following instructions found online.
  Here is the server code:</p>
  <pre class="lang-cpp prettyprint-override"><code>      std::string server_address(&quot;0.0.0.0:50051&quot;);
        GreeterServiceImpl service;
      
        grpc::SslServerCredentialsOptions::PemKeyCertPair pkcp ={&quot;a&quot;,&quot;b&quot;};
        grpc::SslServerCredentialsOptions ssl_opts;
        ssl_opts.pem_root_certs=&quot;&quot;;
        ssl_opts.pem_key_cert_pairs.push_back(pkcp);
      
        std::shared_ptr&lt;grpc::ServerCredentials&gt; creds;
        creds = grpc::SslServerCredentials(ssl_opts);
      
        ServerBuilder builder;
        builder.AddListeningPort(server_address, creds);
        builder.RegisterService(&amp;service);
        std::unique_ptr&lt;Server&gt; server(builder.BuildAndStart());
  </code></pre>
  <p>The server won't start and terminates with following error.</p>
  <pre><code>E1115 13:00:55.657846941   17129 ssl_transport_security.c:636] Invalid cert chain file.
  E1115 13:00:55.657936436   17129 security_connector.c:830]   Handshaker factory creation failed with TSI_INVALID_ARGUMENT.
  E1115 13:00:55.657954952   17129 server_secure_chttp2.c:344] {&quot;created&quot;:&quot;@1479243655.657946821&quot;,&quot;description&quot;:&quot;Unable to create secure server with credentials of type Ssl.&quot;,&quot;file&quot;:&quot;src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c&quot;,&quot;file_line&quot;:242,&quot;security_status&quot;:1}
  Server listening on 0.0.0.0:50051
  Segmentation fault (core dumped)
  </code></pre>
  <p>All I want to do is just use SSL for server and client communication. Looks like I am missing proper certificates in the server and believe similar things needed in client. Since I don't have any background in SSL it would be great if anybody can point me to examples about how to create those certificates and use properly for gRPC communication.</p>