diff options
Diffstat (limited to 'src/pkg/crypto/tls/common.go')
| -rw-r--r-- | src/pkg/crypto/tls/common.go | 14 | 
1 files changed, 9 insertions, 5 deletions
| diff --git a/src/pkg/crypto/tls/common.go b/src/pkg/crypto/tls/common.go index 7135f3d0f..fb2916ae0 100644 --- a/src/pkg/crypto/tls/common.go +++ b/src/pkg/crypto/tls/common.go @@ -7,6 +7,7 @@ package tls  import (  	"crypto/rand"  	"crypto/rsa" +	"crypto/x509"  	"io"  	"io/ioutil"  	"sync" @@ -92,9 +93,13 @@ const (  // ConnectionState records basic TLS details about the connection.  type ConnectionState struct { -	HandshakeComplete  bool -	CipherSuite        uint16 -	NegotiatedProtocol string +	HandshakeComplete          bool +	CipherSuite                uint16 +	NegotiatedProtocol         string +	NegotiatedProtocolIsMutual bool + +	// the certificate chain that was presented by the other side +	PeerCertificates []*x509.Certificate  }  // A Config structure is used to configure a TLS client or server. After one @@ -120,7 +125,6 @@ type Config struct {  	RootCAs *CASet  	// NextProtos is a list of supported, application level protocols. -	// Currently only server-side handling is supported.  	NextProtos []string  	// ServerName is included in the client's handshake to support virtual @@ -251,7 +255,7 @@ var varDefaultCipherSuites []uint16  func initDefaultCipherSuites() {  	varDefaultCipherSuites = make([]uint16, len(cipherSuites))  	i := 0 -	for id, _ := range cipherSuites { +	for id := range cipherSuites {  		varDefaultCipherSuites[i] = id  		i++  	} | 
