summaryrefslogtreecommitdiff
path: root/gemini/tls.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-11 10:36:56 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-11 10:36:56 -0700
commite183f9cd23380a81071c32f64c91e60f46a7d8cb (patch)
treed78b0a4936dee3e3201d97668bfb5de4492b3593 /gemini/tls.go
parent197d8e4cb0170356dd20755efcf1d336c4c38583 (diff)
lots more documentation comments
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 {