Documentation ¶
Overview ¶
This package partially implements the TLS 1.1 protocol, as specified in RFC 4346.
Index ¶
- Variables
- type CASet
- type Certificate
- type Config
- type Conn
- func (tls *Conn) Close() os.Error
- func (tls *Conn) GetConnectionState() ConnectionState
- func (tls *Conn) Read(p []byte) (int, os.Error)
- func (tls *Conn) SetReadTimeout(nsec int64) os.Error
- func (tls *Conn) SetTimeout(nsec int64) os.Error
- func (tls *Conn) SetWriteTimeout(nsec int64) os.Error
- func (tls *Conn) WaitConnectionState() ConnectionState
- func (tls *Conn) Write(p []byte) (int, os.Error)
- type ConnectionState
- type Listener
Constants ¶
This section is empty.
Variables ¶
var (
TLS_RSA_WITH_RC4_128_SHA uint16 = 5
)
TLS cipher suites.
Functions ¶
This section is empty.
Types ¶
type CASet ¶
type CASet struct {
// contains filtered or unexported fields
}
A CASet is a set of certificates.
func (*CASet) FindParent ¶
func (s *CASet) FindParent(cert *x509.Certificate) (parent *x509.Certificate)
FindParent attempts to find the certificate in s which signs the given certificate. If no such certificate can be found, it returns nil.
func (*CASet) SetFromPEM ¶
SetFromPEM attempts to parse a series of PEM encoded root certificates. It appends any certificates found to s and returns true if any certificates were successfully parsed. On many Linux systems, /etc/ssl/cert.pem will contains the system wide set of root CAs in a format suitable for this function.
type Certificate ¶
type Certificate struct { Certificate [][]byte PrivateKey *rsa.PrivateKey }
type Config ¶
type Config struct { // Rand provides the source of entropy for nonces and RSA blinding. Rand io.Reader // Time returns the current time as the number of seconds since the epoch. Time func() int64 Certificates []Certificate RootCAs *CASet // NextProtos is a list of supported, application level protocols. // Currently only server-side handling is supported. NextProtos []string }
A Config structure is used to configure a TLS client or server. After one has been passed to a TLS function it must not be modified.
type Conn ¶
A Conn represents a secure connection.
func (*Conn) GetConnectionState ¶
func (tls *Conn) GetConnectionState() ConnectionState
func (*Conn) WaitConnectionState ¶
func (tls *Conn) WaitConnectionState() ConnectionState
type ConnectionState ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶
NewListener creates a Listener which accepts connections from an inner Listener and wraps each connection with Server.