mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-13 11:09:23 +01:00
lnd: reload cert data after renewal
After renewing the certificate, the new certificate wasn't actually loaded and used, causing the old one to be used until lnd was restarted. This fixes that by reloading it after it has been written.
This commit is contained in:
parent
f7a85e07b0
commit
ba38bda5f0
1 changed files with 6 additions and 0 deletions
6
lnd.go
6
lnd.go
|
@ -757,6 +757,12 @@ func getTLSConfig(tlsCertPath string, tlsKeyPath string, tlsExtraIPs,
|
|||
return nil, nil, "", err
|
||||
}
|
||||
rpcsLog.Infof("Done renewing TLS certificates")
|
||||
|
||||
// Reload the certificate data.
|
||||
certData, _, err = cert.LoadCert(tlsCertPath, tlsKeyPath)
|
||||
if err != nil {
|
||||
return nil, nil, "", err
|
||||
}
|
||||
}
|
||||
|
||||
tlsCfg := cert.TLSConfFromCert(certData)
|
||||
|
|
Loading…
Add table
Reference in a new issue