# README
etls
etls (extended tls) is a fork of the golang tls library with enhancements used for testing tls support of servers
Additional ciphers have been added and functions/methods for testing TLS protocol and cipher support of a server.
Test server compatibility
Provide tls configuration with optional CipherSuites, MinVersion, and MaxVersion. If CipherSuites is empty then the default Golang defaultCipherSuites
are used.
import "github.com/jsandas/etls"
...
tlsCfg := etls.Config{
ServerName: "google.com",
InsecureSkipVerify: true,
CipherSuites: []uint16{etls.TLS_AES_128_CCM_SHA256, etls.TLS_CHACHA20_POLY1305_SHA256},
MinVersion: uint16(etls.VersionTLS13),
MaxVersion: uint16(etls.VersionTLS13),
}
conn, err := net.DialTimeout("tcp", server, 3*time.Second)
if err != nil {
t.Error(err)
}
defer conn.Close()
...
client := etls.FakeClient(conn, &tlsCfg)
client.FakeHandshake()
if client.handshakeErr != nil {
fmt.Printf("handshake error msg: %v", client.handshakeErr)
}