aboutsummaryrefslogtreecommitdiff
path: root/setup/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'setup/config/config.go')
-rw-r--r--setup/config/config.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/setup/config/config.go b/setup/config/config.go
index e99852ec..918bcbe3 100644
--- a/setup/config/config.go
+++ b/setup/config/config.go
@@ -231,6 +231,21 @@ func loadConfig(
return nil, err
}
+ for _, v := range c.Global.VirtualHosts {
+ if v.KeyValidityPeriod == 0 {
+ v.KeyValidityPeriod = c.Global.KeyValidityPeriod
+ }
+ if v.PrivateKeyPath == "" {
+ v.KeyID = c.Global.KeyID
+ v.PrivateKey = c.Global.PrivateKey
+ continue
+ }
+ privateKeyPath := absPath(basePath, v.PrivateKeyPath)
+ if v.KeyID, v.PrivateKey, err = LoadMatrixKey(privateKeyPath, readFile); err != nil {
+ return nil, err
+ }
+ }
+
for _, key := range c.Global.OldVerifyKeys {
switch {
case key.PrivateKeyPath != "":