Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/foomo/tlsconfig

tls configuration utilities
https://github.com/foomo/tlsconfig

foomo

Last synced: about 15 hours ago
JSON representation

tls configuration utilities

Awesome Lists containing this project

README

        

# Golang tls configuration helper

golangs tls package is great, but the default configuration is nothing you should use in production. This package is trying to provide and maintain a set of default tls configurations.

## securing your server

```go
// construct a webserver with a custom tls configuration
tlsServer := &http.Server{
Addr: "0.0.0.0:443",
Handler: serverHandler,
TLSConfig: tlsconfig.NewServerTLSConfig(tlsconfig.TLSModeServerStrict),
}

tlsServer.ListenAndServeTLS("path/to/cert", "path/to/key")

```