Skip to content

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

@ofirc

Description

@ofirc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions