Versions in this module Expand all Collapse all v0 v0.2.0 Apr 15, 2014 Changes in this version type Conn + func (c *Conn) SendCloseNotify() error v0.1.0 Apr 14, 2014 Changes in this version + const TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA + const TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + const TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA + const TLS_ECDHE_ECDSA_WITH_RC4_128_SHA + const TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA + const TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA + const TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + const TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA + const TLS_ECDHE_RSA_WITH_RC4_128_SHA + const TLS_RSA_WITH_3DES_EDE_CBC_SHA + const TLS_RSA_WITH_AES_128_CBC_SHA + const TLS_RSA_WITH_AES_256_CBC_SHA + const TLS_RSA_WITH_RC4_128_SHA + const VersionSSL30 + const VersionTLS10 + const VersionTLS11 + const VersionTLS12 + func Listen(network, laddr string, config *Config) (net.Listener, error) + func NewListener(inner net.Listener, config *Config) net.Listener + type Certificate struct + Certificate [][]byte + Leaf *x509.Certificate + OCSPStaple []byte + PrivateKey crypto.PrivateKey + func LoadX509KeyPair(certFile, keyFile string) (cert Certificate, err error) + func X509KeyPair(certPEMBlock, keyPEMBlock []byte) (cert Certificate, err error) + type ClientAuthType int + const NoClientCert + const RequestClientCert + const RequireAndVerifyClientCert + const RequireAnyClientCert + const VerifyClientCertIfGiven + type ClientSessionCache interface + Get func(sessionKey string) (session *ClientSessionState, ok bool) + Put func(sessionKey string, cs *ClientSessionState) + func NewLRUClientSessionCache(capacity int) ClientSessionCache + type ClientSessionState struct + type Config struct + Certificates []Certificate + CipherSuites []uint16 + ClientAuth ClientAuthType + ClientCAs *x509.CertPool + ClientSessionCache ClientSessionCache + CurvePreferences []CurveID + InsecureSkipVerify bool + MaxVersion uint16 + MinVersion uint16 + NameToCertificate map[string]*Certificate + NextProtos []string + PreferServerCipherSuites bool + Rand io.Reader + RootCAs *x509.CertPool + ServerName string + SessionTicketKey [32]byte + SessionTicketsDisabled bool + Time func() time.Time + func (c *Config) BuildNameToCertificate() + type Conn struct + Heartbeats chan []byte + func Client(conn net.Conn, config *Config) *Conn + func Dial(network, addr string, config *Config) (*Conn, error) + func DialWithDialer(dialer *net.Dialer, network, addr string, config *Config) (*Conn, error) + func Server(conn net.Conn, config *Config) *Conn + func (c *Conn) Close() error + func (c *Conn) ConnectionState() ConnectionState + func (c *Conn) Handshake() error + func (c *Conn) LocalAddr() net.Addr + func (c *Conn) OCSPResponse() []byte + func (c *Conn) Read(b []byte) (n int, err error) + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) SendHeartbeat(data []byte) error + func (c *Conn) SetDeadline(t time.Time) error + func (c *Conn) SetReadDeadline(t time.Time) error + func (c *Conn) SetWriteDeadline(t time.Time) error + func (c *Conn) VerifyHostname(host string) error + func (c *Conn) Write(b []byte) (int, error) + type ConnectionState struct + CipherSuite uint16 + DidResume bool + HandshakeComplete bool + NegotiatedProtocol string + NegotiatedProtocolIsMutual bool + PeerCertificates []*x509.Certificate + ServerName string + VerifiedChains [][]*x509.Certificate + Version uint16 + type CurveID uint16 + const CurveP256 + const CurveP384 + const CurveP521