From 3377f174bdd0bcf3f6212038dbc51cdb922e5481 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Fri, 13 Jul 2007 18:16:04 +0000 Subject: Add checker support to Component git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3441 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Component.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib/Component.py') 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: -- cgit v1.2.3-1-g7c22