summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-07-13 17:45:21 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-07-13 17:45:21 +0000
commit3f3257a6a0af296efbfa798bbee053d43648f3c1 (patch)
tree91b0099b8f66edec59dafd396090424c34bddd2a /src
parent740c75f1b3372eccbdb459043582ff032cfcac1e (diff)
downloadbcfg2-3f3257a6a0af296efbfa798bbee053d43648f3c1.tar.gz
bcfg2-3f3257a6a0af296efbfa798bbee053d43648f3c1.tar.bz2
bcfg2-3f3257a6a0af296efbfa798bbee053d43648f3c1.zip
Improve error handling when key improperly specified on server (Reported by nicely)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5321 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/SSLServer.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/SSLServer.py b/src/lib/SSLServer.py
index 2ad69218b..d22706822 100644
--- a/src/lib/SSLServer.py
+++ b/src/lib/SSLServer.py
@@ -100,17 +100,17 @@ class SSLServer (SocketServer.TCPServer, object):
self.socket.settimeout(timeout)
self.keyfile = keyfile
if keyfile != None:
- if not os.path.exists(keyfile):
+ if keyfile == False or not os.path.exists(keyfile):
self.logger.error("Keyfile %s does not exist" % keyfile)
raise Exception, "keyfile doesn't exist"
self.certfile = certfile
if certfile != None:
- if not os.path.exists(certfile):
+ if certfile == False or not os.path.exists(certfile):
self.logger.error("Certfile %s does not exist" % certfile)
raise Exception, "certfile doesn't exist"
self.ca = ca
if ca != None:
- if not os.path.exists(ca):
+ if ca == False or not os.path.exists(ca):
self.logger.error("CA %s does not exist" % ca)
raise Exception, "ca doesn't exist"
self.reqCert = reqCert