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 3ca5d0af71
commit 4e7acd9091
7 changed files with 128 additions and 34 deletions

View File

@ -25,6 +25,14 @@ func (vault *Vault) GetBridgeTLSKey() []byte {
return vault.get().Certs.Bridge.Key
}
// 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
}