From 91a5a9db9a5d55b3ff577d6aa61f16f7a934f1dc Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 12 Jan 2025 05:20:15 +0800 Subject: Add TLS cert configuration handling --- config.go | 4 ++++ maild.scfg | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/config.go b/config.go index f187b69..c76fa94 100644 --- a/config.go +++ b/config.go @@ -11,6 +11,10 @@ import ( var config struct { Server_name string `scfg:"server_name"` Routes map[string]string `scfg:"routes"` + TLS struct { + Cert string `scfg:"cert"` + Key string `scfg:"key"` + } `scfg:"tls"` } var config_mutex sync.RWMutex diff --git a/maild.scfg b/maild.scfg index 99efe9c..373e640 100644 --- a/maild.scfg +++ b/maild.scfg @@ -5,3 +5,8 @@ routes { test@andrewyu.org /home/runxiyu/inbox adeline@andrewyu.org /home/runxiyu/inbox } + +tls { + cert /etc/tls/cert.pem + key /etc/tls/privkey.pem +} -- cgit v1.2.3