feat(GODT-2509): Migrate TLS cert from v1/v2 location during upgrade to v3

This commit is contained in:
James Houlahan
2023-03-20 14:55:49 +01:00
committed by Leander Beernaert
parent bb770f3871
commit f1989193c0
7 changed files with 131 additions and 32 deletions

View File

@ -53,6 +53,14 @@ func (vault *Vault) SetBridgeTLSCertPath(certPath, keyPath string) error {
})
}
// SetBridgeTLSCertKey sets the path to PEM-encoded certificates for the bridge.
func (vault *Vault) SetBridgeTLSCertKey(cert, key []byte) error {
return vault.mod(func(data *Data) {
data.Certs.Bridge.Cert = cert
data.Certs.Bridge.Key = key
})
}
func (vault *Vault) GetCertsInstalled() bool {
return vault.get().Certs.Installed
}