feat(GODT-2374): Import TLS certs via shell

This commit is contained in:
James Houlahan
2023-02-17 14:02:39 +01:00
parent cac0cf35f6
commit 54c013012e
8 changed files with 104 additions and 13 deletions

View File

@ -51,7 +51,9 @@ func WithVault(locations *locations.Locations, fn func(*vault.Vault, bool, bool)
if installed := encVault.GetCertsInstalled(); !installed {
logrus.Debug("Installing certificates")
if err := certs.NewInstaller().InstallCert(encVault.GetBridgeTLSCert()); err != nil {
certPEM, _ := encVault.GetBridgeTLSCert()
if err := certs.NewInstaller().InstallCert(certPEM); err != nil {
return fmt.Errorf("failed to install certs: %w", err)
}