Documentation ¶
Index ¶
- Constants
- func DialAndWrite(config *Config)
- type Certificate
- type ClientAuthType
- type Config
- type DTLSConn
- func (c *DTLSConn) Close() (err error)
- func (c *DTLSConn) Handshake() (err error)
- func (c *DTLSConn) LocalAddr() net.Addr
- func (c *DTLSConn) Read(b []byte) (n int, err error)
- func (c *DTLSConn) RemoteAddr() net.Addr
- func (c *DTLSConn) SetDeadline(t time.Time) error
- func (c *DTLSConn) SetReadDeadline(t time.Time) error
- func (c *DTLSConn) SetWriteDeadline(t time.Time) error
- func (c *DTLSConn) Write(b []byte) (n int, err error)
- type DTLSMultiplexedConn
Constants ¶
View Source
const ( DTLS_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x000a DTLS_RSA_WITH_AES_128_CBC_SHA uint16 = 0x002f DTLS_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0035 DTLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA uint16 = 0xc009 DTLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA uint16 = 0xc00a DTLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xc012 DTLS_ECDHE_RSA_WITH_AES_128_CBC_SHA uint16 = 0xc013 DTLS_ECDHE_RSA_WITH_AES_256_CBC_SHA uint16 = 0xc014 DTLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0xc02f DTLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 uint16 = 0xc02b )
Cipher suites
View Source
const ( VersionDTLS10 = 0x0301 VersionDTLS12 = 0x0303 )
View Source
const (
Port string = ":8080"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Certificate ¶
type Certificate struct { Certificate [][]byte PrivateKey crypto.PrivateKey OCSPStaple []byte Leaf *x509.Certificate }
func LoadX509KeyPair ¶
func LoadX509KeyPair(certFile, keyFile string) (cert Certificate, err error)
same as "tls" implementation
func X509KeyPair ¶
func X509KeyPair(certPEMBlock, keyPEMBlock []byte) (cert Certificate, err error)
same as "tls" implementation
type ClientAuthType ¶
type ClientAuthType int
const ( NoClientCert ClientAuthType = iota RequestClientCert RequireAnyClientCert VerifyClientCertIfGiven RequireAndVerifyClientCert )
type Config ¶
type Config struct { Rand io.Reader Time func() time.Time Certificates []Certificate NameToCertificate map[string]*Certificate RootCAs *x509.CertPool NextProtos []string ServerName string ClientAuth ClientAuthType ClientCAs *x509.CertPool InsecureSkipVerify bool CipherSuites []uint16 PreferServerCipherSuites bool SessionTicketsDisabled bool SessionTicketKey [32]byte MinVersion uint16 MaxVersion uint16 // contains filtered or unexported fields }
type DTLSConn ¶
type DTLSConn struct {
// contains filtered or unexported fields
}
func (*DTLSConn) RemoteAddr ¶
type DTLSMultiplexedConn ¶
func (*DTLSMultiplexedConn) Accept ¶
func (conn *DTLSMultiplexedConn) Accept() (c *DTLSConn, err error)
Click to show internal directories.
Click to hide internal directories.