diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-07-13 18:16:04 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-07-13 18:16:04 +0000 |
commit | 3377f174bdd0bcf3f6212038dbc51cdb922e5481 (patch) | |
tree | f6454b237c2b4b67788f9273bead3027fce67404 /src/lib/Component.py | |
parent | bef026fd845d90b4b347f18ee0282302dbcb0e72 (diff) | |
download | bcfg2-3377f174bdd0bcf3f6212038dbc51cdb922e5481.tar.gz bcfg2-3377f174bdd0bcf3f6212038dbc51cdb922e5481.tar.bz2 bcfg2-3377f174bdd0bcf3f6212038dbc51cdb922e5481.zip |
Add checker support to Component
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3441 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Component.py')
-rw-r--r-- | src/lib/Component.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Component.py b/src/lib/Component.py index 34dfbddc2..71df6d68b 100644 --- a/src/lib/Component.py +++ b/src/lib/Component.py @@ -60,11 +60,12 @@ class CobaltXMLRPCRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): class TLSServer(Bcfg2.tlslite.api.TLSSocketServerMixIn, BaseHTTPServer.HTTPServer): '''This class is an tlslite-using SSLServer''' - def __init__(self, address, keyfile, handler): + def __init__(self, address, keyfile, handler, checker=None): self.sc = Bcfg2.tlslite.api.SessionCache() x509 = Bcfg2.tlslite.api.X509() s = open(keyfile).read() x509.parse(s) + self.checker = checker try: self.key = Bcfg2.tlslite.api.parsePEMKey(s, private=True) except: @@ -83,7 +84,8 @@ class TLSServer(Bcfg2.tlslite.api.TLSSocketServerMixIn, try: tlsConnection.handshakeServer(certChain=self.chain, privateKey=self.key, - sessionCache=self.sc) + sessionCache=self.sc, + checher=self.checker) tlsConnection.ignoreAbruptClose = True return True except Bcfg2.tlslite.errors.TLSError, error: |