Commit ffd55045 authored by Adam Langley's avatar Adam Langley

crypto/tls: export the verified chains.

The verified chains are the chains that were actually verified.

R=bradfitz
CC=golang-dev
https://golang.org/cl/4462046
parent e1bf165b
...@@ -100,6 +100,8 @@ type ConnectionState struct { ...@@ -100,6 +100,8 @@ type ConnectionState struct {
// the certificate chain that was presented by the other side // the certificate chain that was presented by the other side
PeerCertificates []*x509.Certificate PeerCertificates []*x509.Certificate
// the verified certificate chains built from PeerCertificates.
VerifiedChains [][]*x509.Certificate
} }
// A Config structure is used to configure a TLS client or server. After one // A Config structure is used to configure a TLS client or server. After one
......
...@@ -768,6 +768,7 @@ func (c *Conn) ConnectionState() ConnectionState { ...@@ -768,6 +768,7 @@ func (c *Conn) ConnectionState() ConnectionState {
state.NegotiatedProtocolIsMutual = !c.clientProtocolFallback state.NegotiatedProtocolIsMutual = !c.clientProtocolFallback
state.CipherSuite = c.cipherSuite state.CipherSuite = c.cipherSuite
state.PeerCertificates = c.peerCertificates state.PeerCertificates = c.peerCertificates
state.VerifiedChains = c.verifiedChains
} }
return state return state
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment