Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
proposal: crypto/tls: provide a way to access local certificate used to set up a connection #24673
While TLS provides ConnectionState() to share some connection security info, like remote certificate (
Exposing the local certificate would be very helpful for debugging connection issues, for example, user may find certificate getter returns suboptimal certificate, which may be expiring soon or having a long verification chain. Moreover, it will also enable collecting certificate usage statistics, which could be valuable for service owners.
changed the title
crypto/tls: provide a way to access local certificate used to set up a connection
Apr 4, 2018
We have a specific use case in grpc channelz feature. It presents to users the current state of a connection, including the info about what's the local/remote certificate has been used. Users may use it to figure out what's the identity it presents to the peer, how long local certificate will last before expired, etc. Moreover, channel trace could record local certificates tried and failed before, which may be helpful for diagnosing problematic setup.
Thanks for elaborating.
@agl I just saw this in the docs, what am I missing about TLS 1.3 that can lead to multiple client certs?
Sorry about the delay in response.
And yes, collocating local certificate with remote certificate in the