Skip to content

Commit a17a2df

Browse files
authored
Merge pull request #212 from ilsaloving-gander/main
fixed static cert setting on init
2 parents caad4b4 + 8c4eb17 commit a17a2df

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

internal/data/init.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,11 @@ func (d *database) loadInitialSettings() error {
489489

490490
if config.Values.Webserver.Tunnel.CertificatePath != "" {
491491
tunnelWebserverConfig.CertificatePEM, tunnelWebserverConfig.PrivateKeyPEM, err = d.readTLSPems(config.Values.Webserver.Tunnel.CertificatePath, config.Values.Webserver.Tunnel.PrivateKeyPath)
492+
492493
if err != nil {
493494
log.Printf("WARNING, failed to read tunnel TLS material: %s", err)
495+
} else {
496+
tunnelWebserverConfig.StaticCerts=true
494497
}
495498
}
496499

@@ -507,8 +510,11 @@ func (d *database) loadInitialSettings() error {
507510

508511
if config.Values.Webserver.Public.CertificatePath != "" {
509512
publicWebserverConfig.CertificatePEM, publicWebserverConfig.PrivateKeyPEM, err = d.readTLSPems(config.Values.Webserver.Public.CertificatePath, config.Values.Webserver.Public.PrivateKeyPath)
513+
510514
if err != nil {
511515
log.Printf("WARNING, failed to read public webserver TLS material: %s", err)
516+
} else {
517+
publicWebserverConfig.StaticCerts=true
512518
}
513519
}
514520

@@ -526,8 +532,11 @@ func (d *database) loadInitialSettings() error {
526532
if config.Values.Webserver.Management.CertificatePath != "" {
527533

528534
managementWebserverConfig.CertificatePEM, managementWebserverConfig.PrivateKeyPEM, err = d.readTLSPems(config.Values.Webserver.Management.CertificatePath, config.Values.Webserver.Management.PrivateKeyPath)
535+
529536
if err != nil {
530537
log.Printf("WARNING, failed to read public webserver TLS material: %s", err)
538+
} else {
539+
managementWebserverConfig.StaticCerts=true
531540
}
532541
}
533542

0 commit comments

Comments
 (0)