summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-05-06 01:27:38 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-05-06 01:27:38 +0000
commit2eb0c1eb999666fae548f33bb5f75aa19dd16645 (patch)
treee56f5c9a66f6d73cde55a9eed062d91c1ca0ddbf /src
parentd496714c148baaa8f14aa752f2ec25f747b3d0f9 (diff)
downloadbcfg2-2eb0c1eb999666fae548f33bb5f75aa19dd16645.tar.gz
bcfg2-2eb0c1eb999666fae548f33bb5f75aa19dd16645.tar.bz2
bcfg2-2eb0c1eb999666fae548f33bb5f75aa19dd16645.zip
SSL: disable cert authentication if no CA is available
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5195 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/XMLRPC.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/Server/XMLRPC.py b/src/lib/Server/XMLRPC.py
index acc28517d..4e97271bc 100644
--- a/src/lib/Server/XMLRPC.py
+++ b/src/lib/Server/XMLRPC.py
@@ -31,6 +31,7 @@ class bcfg2_server(Component,
Bcfg2.Server.Core.Core.__init__(self, setup['repo'], setup['plugins'],
setup['password'],
setup['encoding'], setup['filemonitor'])
+ self.ca = setup['ca']
self.process_initial_fam_events()
def process_initial_fam_events(self):
@@ -149,7 +150,12 @@ class bcfg2_server(Component,
return "<ok/>"
def authenticate(self, cert, user, password, address):
- return self.metadata.AuthenticateConnection(cert, user, password, address)
+ if self.ca:
+ acert = cert
+ else:
+ # no ca, so no cert validation can be done
+ acert = None
+ return self.metadata.AuthenticateConnection(acert, user, password, address)
@exposed
def GetDecisionList(self, address, mode):