示例#1
0
 def __init__(self, conf, agent):
     from sslctx import svrctxinit
     import hacks, ticket
     self.conf = conf
     self.agent = agent
     self.tfactory = ticket.ticketfactory(conf.key)
     ctx = svrctxinit(conf.cert, conf.key, conf.cacert, "agentsslsvr")
     SSL.ThreadingSSLServer.allow_reuse_address = 1
     try:
         method = SSL.ThreadingSSLServer.__init__
         args = [ self, ("", conf.xmlsslport), agentsslhandler, ctx ]
         hacks.retryapply(method, args, 10, 1)
     except:
         raise "Could not bind to TCP port %d" % conf.xmlsslport
 def __init__(self, conf, nodemgr):
     from sslctx import svrctxinit
     import hacks, lease
     self.conf = conf
     self.dbthr = nodemgr.dbthr
     self.ip = nodemgr.ip
     self.nodemgr = nodemgr
     self.timesyncslack = 60 * 5
     self.lfactory = lease.leasefactory(conf.key)
     ctx = svrctxinit(conf.cert, conf.key, conf.cacert, "nodemgrsslsvr")
     SSL.ThreadingSSLServer.allow_reuse_address = 1
     try:
         method = SSL.ThreadingSSLServer.__init__
         args = [ self, ("", conf.xmlsslport), nodemgrsslhandler, ctx ]
         hacks.retryapply(method, args, 10, 1)
     except:
         raise "Could not bind to TCP port %d" % conf.xmlsslport
示例#3
0
 def __init__(self, conf, nodemgr):
     from sslctx import svrctxinit
     import hacks, lease
     self.conf = conf
     self.dbthr = nodemgr.dbthr
     self.ip = nodemgr.ip
     self.nodemgr = nodemgr
     self.timesyncslack = 60 * 5
     self.lfactory = lease.leasefactory(conf.key)
     ctx = svrctxinit(conf.cert, conf.key, conf.cacert, "nodemgrsslsvr")
     SSL.ThreadingSSLServer.allow_reuse_address = 1
     try:
         method = SSL.ThreadingSSLServer.__init__
         args = [self, ("", conf.xmlsslport), nodemgrsslhandler, ctx]
         hacks.retryapply(method, args, 10, 1)
     except:
         raise "Could not bind to TCP port %d" % conf.xmlsslport