diff options
author | bju <bju@maxi.fritz.box> | 2017-04-22 15:56:41 +0200 |
---|---|---|
committer | bju <bju@maxi.fritz.box> | 2017-04-22 15:56:41 +0200 |
commit | 6502c169013854525b5103a668bc7d5644f2028d (patch) | |
tree | f979786e7077f457ef5b9ff58983675e6d003b2a /vdr-vdrmanager/vdrmanagerthread.cpp | |
parent | 20d03e5a34d6cbd71b76c09a9203fcd1fb342a66 (diff) | |
download | vdr-manager-6502c169013854525b5103a668bc7d5644f2028d.tar.gz vdr-manager-6502c169013854525b5103a668bc7d5644f2028d.tar.bz2 |
Fix handling of multiple certificate files
Diffstat (limited to 'vdr-vdrmanager/vdrmanagerthread.cpp')
-rw-r--r-- | vdr-vdrmanager/vdrmanagerthread.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vdr-vdrmanager/vdrmanagerthread.cpp b/vdr-vdrmanager/vdrmanagerthread.cpp index b0c37ba..3eaae36 100644 --- a/vdr-vdrmanager/vdrmanagerthread.cpp +++ b/vdr-vdrmanager/vdrmanagerthread.cpp @@ -68,14 +68,19 @@ bool cVdrManagerThread::Init() #if VDRMANAGER_USE_SSL cVdrmanagerServerSocket * sslSock; - if (!access(certFile, R_OK) && !access(keyFile, R_OK)) { + bool certFileOk = !access(certFile, R_OK); + bool keyFileOk = !access(keyFile, R_OK); + if (certFileOk && keyFileOk) { sslSock = new cVdrmanagerServerSocket(); if (sslSock == NULL || !sslSock->Create(sslPort, password, forceCheckSvdrp, compressionMode, certFile, keyFile)) { return false; } } else { sslSock = NULL; - esyslog("[vdrmanager] SSL key files %s and %s can't be read. SSL disabled.", certFile, keyFile); + if (!certFileOk) + esyslog("[vdrmanager] SSL cert file %s can't be read (errno %d). SSL disabled.", certFile, errno); + if (!keyFileOk) + esyslog("[vdrmanager] SSL key file %s can't be read (errno %d). SSL disabled.", keyFile, errno); } // register server sockets |