summaryrefslogtreecommitdiff
path: root/gemini/tls.go
diff options
context:
space:
mode:
Diffstat (limited to 'gemini/tls.go')
-rw-r--r--gemini/tls.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/gemini/tls.go b/gemini/tls.go
index 3cdf93b..5b35fb6 100644
--- a/gemini/tls.go
+++ b/gemini/tls.go
@@ -2,6 +2,9 @@ package gemini
import "crypto/tls"
+// FileTLS builds a TLS configuration from paths to a certificate and key file.
+//
+// It sets parameters on the configuration to make it suitable for use with gemini.
func FileTLS(certfile string, keyfile string) (*tls.Config, error) {
cert, err := tls.LoadX509KeyPair(certfile, keyfile)
if err != nil {