Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use go-grpc-http1 behind a TLS? #242

Open
ofirc opened this issue Dec 19, 2024 · 0 comments
Open

How to use go-grpc-http1 behind a TLS? #242

ofirc opened this issue Dec 19, 2024 · 0 comments

Comments

@ofirc
Copy link

ofirc commented Dec 19, 2024

Hi,
I am trying to use go-grpc-http1 with a TLS server in HTTP/1 in the following way:
client-tls.go.txt
server-tls.go.txt

The server seems to run alright:

$ ./server-tls
2024/12/19 22:01:44 INFO: [core] [Server #1]Server created
2024/12/19 22:01:44 Server is listening on :8443 with TLS over HTTP/1.1

However, when I try to run the client, I get:

2024/12/19 22:10:59 Failed to call SayHello: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake"

Running the curl command with the custom CA passes with flying colors:

curl -v --cacert cert.pem https://localhost:8443 >& curl.txt

curl.txt

What could be the reason? am I initializing the client correctly?

Thanks,
Ofir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant