|
|
|
@ -34,11 +34,16 @@ type keychain struct { |
|
|
|
|
emailKey, cookieAuthKey, cookieKey []byte |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func initKeyPaths(app *app) { |
|
|
|
|
emailKeyPath = filepath.Join(app.cfg.Server.KeysParentDir, emailKeyPath) |
|
|
|
|
cookieAuthKeyPath = filepath.Join(app.cfg.Server.KeysParentDir, cookieAuthKeyPath) |
|
|
|
|
cookieKeyPath = filepath.Join(app.cfg.Server.KeysParentDir, cookieKeyPath) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func initKeys(app *app) error { |
|
|
|
|
var err error |
|
|
|
|
app.keys = &keychain{} |
|
|
|
|
|
|
|
|
|
emailKeyPath = filepath.Join(app.cfg.Server.KeysParentDir, emailKeyPath) |
|
|
|
|
if debugging { |
|
|
|
|
log.Info(" %s", emailKeyPath) |
|
|
|
|
} |
|
|
|
@ -47,7 +52,6 @@ func initKeys(app *app) error { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cookieAuthKeyPath = filepath.Join(app.cfg.Server.KeysParentDir, cookieAuthKeyPath) |
|
|
|
|
if debugging { |
|
|
|
|
log.Info(" %s", cookieAuthKeyPath) |
|
|
|
|
} |
|
|
|
@ -56,7 +60,6 @@ func initKeys(app *app) error { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cookieKeyPath = filepath.Join(app.cfg.Server.KeysParentDir, cookieKeyPath) |
|
|
|
|
if debugging { |
|
|
|
|
log.Info(" %s", cookieKeyPath) |
|
|
|
|
} |
|
|
|
|