Go to file
2024-03-29 10:08:15 +01:00
.gitignore chore: add gitignore 2024-03-28 13:55:19 +01:00
example_test.go initial draft 2016-02-04 10:56:33 +01:00
go.mod fix: module org 2024-03-29 10:08:15 +01:00
go.sum fix: module org 2024-03-29 10:08:15 +01:00
README.md initial draft 2016-02-04 10:56:33 +01:00
tlsconfig.go feat: add TLSModeServerStrict and add X25519 curve to default prefs 2024-03-28 18:07:28 +01:00

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

// 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")