Entropy/SocketHostInterface:
- some misc updates git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2230 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
@@ -12537,7 +12537,7 @@ class SocketHostInterface:
|
||||
# closed down correctly.
|
||||
allow_reuse_address = True
|
||||
|
||||
def __init__(self, server_address, RequestHandlerClass, processor, HostInterface):
|
||||
def __init__(self, server_address, RequestHandlerClass, processor, HostInterface, authorized_clients_only = False):
|
||||
|
||||
self.alive = True
|
||||
self.socket = self.socket_mod
|
||||
@@ -12546,6 +12546,7 @@ class SocketHostInterface:
|
||||
self.HostInterface = HostInterface
|
||||
self.SSL = self.HostInterface.SSL
|
||||
self.real_sock = None
|
||||
self.ssl_authorized_clients_only = authorized_clients_only
|
||||
|
||||
if self.SSL:
|
||||
self.SocketServer.BaseServer.__init__(self, server_address, RequestHandlerClass)
|
||||
@@ -12562,12 +12563,12 @@ class SocketHostInterface:
|
||||
def load_ssl_context(self):
|
||||
# setup an SSL context.
|
||||
self.context = self.SSL['m'].Context(self.SSL['m'].SSLv23_METHOD)
|
||||
#self.context.set_verify(self.SSL['m'].VERIFY_PEER, self.verify_ssl_cb) # ask for a certificate
|
||||
#self.context.set_options(self.SSL['m'].OP_NO_SSLv2)
|
||||
self.context.set_verify(self.SSL['m'].VERIFY_PEER, self.verify_ssl_cb) # ask for a certificate
|
||||
self.context.set_options(self.SSL['m'].OP_NO_SSLv2)
|
||||
# load up certificate stuff.
|
||||
self.context.use_privatekey_file(self.SSL['key'])
|
||||
self.context.use_certificate_file(self.SSL['cert'])
|
||||
#self.context.load_verify_locations(self.SSL['ca_cert'])
|
||||
self.context.load_verify_locations(self.SSL['ca_cert'])
|
||||
self.HostInterface.updateProgress('SSL context loaded, key: %s - cert: %s, CA cert: %s, CA pkey: %s' % (
|
||||
self.SSL['key'],
|
||||
self.SSL['cert'],
|
||||
|
||||
Reference in New Issue
Block a user