diff options
| author | Adnan Maolood <[email protected]> | 2021-02-20 18:30:49 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-20 18:30:49 -0500 |
| commit | 0baa66a4e70a2302c044fbd9eb7ee4eb5e3bb03e (patch) | |
| tree | ecae9eabd20c6691b79a34ecf62f5e7c25128617 /examples/server.go | |
| parent | certificate.Store: Support "*" wildcard pattern (diff) | |
| download | go-gemini-0baa66a4e70a2302c044fbd9eb7ee4eb5e3bb03e.tar.xz go-gemini-0baa66a4e70a2302c044fbd9eb7ee4eb5e3bb03e.zip | |
Update examples
Diffstat (limited to 'examples/server.go')
| -rw-r--r-- | examples/server.go | 14 |
1 files changed, 1 insertions, 13 deletions
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) |