zero effort temp TLS listener
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
ttls.go

README.md

ttls Go Report Card

small lib thats creating temporary TLS listener with random server certificate.

why temporary ? every time that NewTTLSListener get called , new TLS certificates will be created.

WARNING - Do Not Use For any project that requires MITM protection, more useful for some temporary use cases with local AUTH..

Installation

$ go get -u github.com/yaronsumel/ttls 

Usage

create the TLS Listener with Min effort

	server, _ := ttls.NewTTLSListener("0.0.0.0:8080", nil)

or customize the x509 certificate as you wish

	server, _ := ttls.NewTTLSListener("0.0.0.0:8080", &ttls.X509Opts{
		Country:"US",
		Organization:"GITHUB",
		SerialNumber:12345,
		SubjectKeyID:"somekeyid",
	})

all together

server, _ := ttls.NewTTLSListener("0.0.0.0:8080", nil)

	for {
		conn, err := server.Listener.Accept()
		if err != nil {
		// something went wrong...
		}
		defer conn.Close()
		// do something with the client conn
	}