I have working gRPC code where a client is sending data to a server.
Works fine when not using TLS.

I used this example to generate keys using openssl.  
My golang code for client and server TLS communication is essentially the 
same as in this example.
I used the example's openssl method to generate keys.
https://bbengfort.github.io/programmer/2017/03/03/secure-grpc.html

The server loads the resulting keys and appears to be ready to accept TLS 
encrypted connections.
It doesn't have any issues reading the cert and key files on the server.

I set the cert up on my client and I get the following rpc error.

rpc error: code = Unavailable desc = all SubConns are in TransientFailure

What could I be possibly doing wrong with the cert generation?
Is it a cert issue?

openssl genrsa -out server.key 2048
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650
openssl req -new -sha256 -key server.key -out server.csr
openssl x509 -req -sha256 -in server.csr -signkey server.key -out 
server.crt -days 3650

On Server:
creds, err := credentials.NewServerTLSFromFile("server.crt","server.key")

On Client:
creds, err := credentials.NewClientTLSFromFile("server.crt" "")

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to