tls-config

command
v0.53.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

README

TLS Configuration

This example demonstrates configuring TLS for an HTTP server using self-signed certificates.

Running the Example

go run github.com/dioad/net/examples/tls-config

Or build and run:

cd examples/tls-config
go build
./tls-config

Then test with curl:

curl -k https://localhost:8443/

(The -k flag skips certificate verification for self-signed certificates)

What It Demonstrates

  • Generating self-signed certificates programmatically
  • Configuring TLS with local certificate files
  • Setting up an HTTPS server with TLS
  • Certificate subject and SAN configuration
  • Graceful shutdown handling

Code

See main.go for the complete executable example.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL