Skip to content

Instantly share code, notes, and snippets.

@tisoportes
tisoportes / fetch.go
Created Dec 3, 2021 — forked from jtwaleson/fetch.go
Certificate fetcher in Go
View fetch.go
package main
import "crypto/tls"
import "crypto/sha1"
import "crypto/x509"
import "fmt"
import "encoding/pem"
import "os"
import "time"
import "bufio"
@tisoportes
tisoportes / golang-tls.md
Created Dec 3, 2021 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
View golang-tls.md

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@tisoportes
tisoportes / README.txt
Created Dec 3, 2021 — forked from ncw/README.txt
Client side certificates with go
View README.txt
This demonstrates how to make client side certificates with go
First generate the certificates with
./makecert.sh test@test.com
Run the server in one terminal
go run server.go