mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-13 12:32:48 +02:00
tls_manager.go: handle case when either TLS pair files exist
This commit is contained in:
parent
24de03d766
commit
76b0701745
1 changed files with 2 additions and 2 deletions
|
|
@ -208,8 +208,8 @@ func (t *TLSManager) generateOrRenewCert() (*tls.Config, error) {
|
|||
// is already written to disk, this function overwrites the plaintext key with
|
||||
// the encrypted form.
|
||||
func (t *TLSManager) generateCertPair(keyRing keychain.SecretKeyRing) error {
|
||||
// Ensure we create TLS key and certificate if they don't exist.
|
||||
if lnrpc.FileExists(t.cfg.TLSCertPath) ||
|
||||
// Ensure we create TLS key and certificate if they don't both exist.
|
||||
if lnrpc.FileExists(t.cfg.TLSCertPath) &&
|
||||
lnrpc.FileExists(t.cfg.TLSKeyPath) {
|
||||
|
||||
// Handle discrepencies related to the TLSEncryptKey setting.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue