tls_manager.go: handle case when either TLS pair files exist
This commit is contained in:
1 parent
c9dea6d621
commit
c7fe6425f3
1 file changed
+2
-2
+2
-2
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user