Skip to content

Instantly share code, notes, and snippets.

@tisoportes
tisoportes / fetch.go
Created December 3, 2021 15:12 — forked from jtwaleson/fetch.go
Certificate fetcher in 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 December 3, 2021 15:12 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
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 December 3, 2021 15:09 — forked from ncw/README.txt
Client side certificates with go
This demonstrates how to make client side certificates with go
First generate the certificates with
./makecert.sh [email protected]
Run the server in one terminal
go run server.go