use user system config to store tls artifacts

This commit is contained in:
A.Unger
2021-06-07 15:00:52 +02:00
parent e11e286d33
commit 2508ce0ef7
10 changed files with 90 additions and 40 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ func Server(opts ...Option) (http.Service, error) {
if os.IsNotExist(certErr) || os.IsNotExist(keyErr) {
options.Logger.Info().Msgf("Generating certs")
if err := crypto.GenCert(options.Logger); err != nil {
if err := crypto.GenCert(options.Config.HTTP.TLSCert, options.Config.HTTP.TLSKey, options.Logger); err != nil {
options.Logger.Fatal().Err(err).Msg("Could not setup TLS")
os.Exit(1)
}