package
0.0.0-20240711123734-c091ff3b1106
Repository: https://github.com/hgsgtk/go-snippets.git
Documentation: pkg.go.dev
# README
HTTPS server in Go
https://medium.com/rungo/secure-https-servers-in-go-a783008b36da
Generate a private key and a self-signed SSL certificate
- Generate a
localhost.ley
(private key) andlocalhost.csr
.
openssl req -new -newkey rsa:2048 -nodes -keyout localhost.key -out localhost.csr
- Generate the
localhost.crt
which is the self-signed certificate signed by ownlocalhost.key
private key.
openssl x509 -req -days 365 -in localhost.csr -signkey localhost.key -out localhost.crt