From 0baa66a4e70a2302c044fbd9eb7ee4eb5e3bb03e Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Sat, 20 Feb 2021 18:30:49 -0500 Subject: Update examples --- examples/server.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'examples/server.go') diff --git a/examples/server.go b/examples/server.go index 6e00f32..430da55 100644 --- a/examples/server.go +++ b/examples/server.go @@ -5,8 +5,6 @@ package main import ( - "crypto/tls" - "crypto/x509/pkix" "log" "os" "time" @@ -16,17 +14,7 @@ import ( ) func main() { - certificates := &certificate.Store{ - CreateCertificate: func(hostname string) (tls.Certificate, error) { - return certificate.Create(certificate.CreateOptions{ - Subject: pkix.Name{ - CommonName: hostname, - }, - DNSNames: []string{hostname}, - Duration: 365 * 24 * time.Hour, - }) - }, - } + certificates := &certificate.Store{} certificates.Register("localhost") if err := certificates.Load("/var/lib/gemini/certs"); err != nil { log.Fatal(err) -- cgit v1.2.3