Skip to content

Commit

Permalink
fix checking for tls certificates, and the quickstart with the -exist…
Browse files Browse the repository at this point in the history
…ing-webserver flag

some time ago, the flag to ParseConfig() to do or skip checking the tls
keys/certs was inverted, but it looks like i didn't change the call sites... so
during "mox config test", and after a regular "mox quickstart" there was no
check for the tls keys/certs, and during "mox quickstart -existing-webserver"
there was a check where there shouldn't be. this made using -existing-webserver
impossible.

this became clear with the question by morki in issue #5.
  • Loading branch information
mjl- committed Aug 14, 2023
1 parent 48eb530 commit f96310f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,9 @@ are printed.
c.Usage()
}

_, errs := mox.ParseConfig(context.Background(), mox.ConfigStaticPath, true, false, false)
mox.FilesImmediate = true

_, errs := mox.ParseConfig(context.Background(), mox.ConfigStaticPath, true, true, false)
if len(errs) > 1 {
log.Printf("multiple errors:")
for _, err := range errs {
Expand Down
4 changes: 2 additions & 2 deletions quickstart.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,8 @@ too many authentication failures).
xwritefile("config/domains.conf", []byte(dconfstr), 0660)

// Verify config.
skipCheckTLSKeyCerts := existingWebserver
mc, errs := mox.ParseConfig(context.Background(), "config/mox.conf", true, skipCheckTLSKeyCerts, false)
loadTLSKeyCerts := !existingWebserver
mc, errs := mox.ParseConfig(context.Background(), "config/mox.conf", true, loadTLSKeyCerts, false)
if len(errs) > 0 {
if len(errs) > 1 {
log.Printf("checking generated config, multiple errors:")
Expand Down

0 comments on commit f96310f

Please sign in to comment.