]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/tls: document ConnectionState fields
authorRuss Cox <rsc@golang.org>
Thu, 3 Oct 2013 01:40:01 +0000 (21:40 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 3 Oct 2013 01:40:01 +0000 (21:40 -0400)
Fixes #6456.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14289043

src/pkg/crypto/tls/common.go

index a9b25545df0d22a7af446c71d74e19c580a758fb..d2e8fab09268fdf37394541f8a95bba8a46c600f 100644 (file)
@@ -136,20 +136,14 @@ var supportedSignatureAlgorithms = []signatureAndHash{
 
 // ConnectionState records basic TLS details about the connection.
 type ConnectionState struct {
-       HandshakeComplete          bool
-       DidResume                  bool
-       CipherSuite                uint16
-       NegotiatedProtocol         string
-       NegotiatedProtocolIsMutual bool
-
-       // ServerName contains the server name indicated by the client, if any.
-       // (Only valid for server connections.)
-       ServerName string
-
-       // the certificate chain that was presented by the other side
-       PeerCertificates []*x509.Certificate
-       // the verified certificate chains built from PeerCertificates.
-       VerifiedChains [][]*x509.Certificate
+       HandshakeComplete          bool                  // TLS handshake is complete
+       DidResume                  bool                  // connection resumes a previous TLS connection
+       CipherSuite                uint16                // cipher suite in use (TLS_RSA_WITH_RC4_128_SHA, ...)
+       NegotiatedProtocol         string                // negotiated next protocol (from Config.NextProtos)
+       NegotiatedProtocolIsMutual bool                  // negotiated protocol was advertised by server
+       ServerName                 string                // server name requested by client, if any (server side only)
+       PeerCertificates           []*x509.Certificate   // certificate chain presented by remote peer
+       VerifiedChains             [][]*x509.Certificate // verified chains built from PeerCertificates
 }
 
 // ClientAuthType declares the policy the server will follow for