aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-01-25 10:59:50 -0500
committerAdnan Maolood <[email protected]>2021-01-25 10:59:50 -0500
commit3efa17f6fb39077357e72316e4681a47686b9759 (patch)
tree7e3b98a702b184d7e1dd5a9b64a0e210b4d223f3 /examples
parentserver: Allow handling any hostname with "*" (diff)
downloadgo-gemini-3efa17f6fb39077357e72316e4681a47686b9759.tar.xz
go-gemini-3efa17f6fb39077357e72316e4681a47686b9759.zip
Update examples
Diffstat (limited to 'examples')
-rw-r--r--examples/auth.go2
-rw-r--r--examples/server.go2
-rw-r--r--examples/stream.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/auth.go b/examples/auth.go
index aedf262..d9325ee 100644
--- a/examples/auth.go
+++ b/examples/auth.go
@@ -33,7 +33,7 @@ func main() {
if err := server.Certificates.Load("/var/lib/gemini/certs"); err != nil {
log.Fatal(err)
}
- server.CreateCertificate = func(hostname string) (tls.Certificate, error) {
+ server.GetCertificate = func(hostname string) (tls.Certificate, error) {
return certificate.Create(certificate.CreateOptions{
Subject: pkix.Name{
CommonName: hostname,
diff --git a/examples/server.go b/examples/server.go
index 7ccd0e8..89703ca 100644
--- a/examples/server.go
+++ b/examples/server.go
@@ -21,7 +21,7 @@ func main() {
if err := server.Certificates.Load("/var/lib/gemini/certs"); err != nil {
log.Fatal(err)
}
- server.CreateCertificate = func(hostname string) (tls.Certificate, error) {
+ server.GetCertificate = func(hostname string) (tls.Certificate, error) {
return certificate.Create(certificate.CreateOptions{
Subject: pkix.Name{
CommonName: hostname,
diff --git a/examples/stream.go b/examples/stream.go
index 74c78e5..1a292fd 100644
--- a/examples/stream.go
+++ b/examples/stream.go
@@ -21,7 +21,7 @@ func main() {
if err := server.Certificates.Load("/var/lib/gemini/certs"); err != nil {
log.Fatal(err)
}
- server.CreateCertificate = func(hostname string) (tls.Certificate, error) {
+ server.GetCertificate = func(hostname string) (tls.Certificate, error) {
return certificate.Create(certificate.CreateOptions{
Subject: pkix.Name{
CommonName: hostname,