fix build issue
This commit is contained in:
@@ -324,10 +324,11 @@ class RDPServerController(pdu.layer.PDUServerListener):
|
||||
"""
|
||||
@summary: Controller use in server side mode
|
||||
"""
|
||||
def __init__(self, privateKeyFileName, certificateFileName, colorDepth):
|
||||
def __init__(self, colorDepth, privateKeyFileName = None, certificateFileName = None, rsaKeys = None):
|
||||
"""
|
||||
@param privateKeyFileName: file contain server private key
|
||||
@param certficiateFileName: file that contain public key
|
||||
@param rsaKeys: {Tuple(rsa.PublicKey, rsa.PrivateKey)} rsa crypto
|
||||
@param colorDepth: 15, 16, 24
|
||||
"""
|
||||
self._isReady = False
|
||||
@@ -336,11 +337,11 @@ class RDPServerController(pdu.layer.PDUServerListener):
|
||||
#build RDP protocol stack
|
||||
self._pduLayer = pdu.layer.Server(self)
|
||||
#secure layer
|
||||
self._secLayer = sec.Server(self._pduLayer)
|
||||
self._secLayer = sec.Server(self._pduLayer, rsaKeys)
|
||||
#multi channel service
|
||||
self._mcsLayer = mcs.Server(self._secLayer)
|
||||
#transport pdu layer
|
||||
self._x224Layer = x224.Server(self._mcsLayer, privateKeyFileName, certificateFileName)
|
||||
self._x224Layer = x224.Server(self._mcsLayer, privateKeyFileName, certificateFileName, False)
|
||||
#transport packet (protocol layer)
|
||||
self._tpktLayer = tpkt.TPKT(self._x224Layer)
|
||||
#fastpath stack
|
||||
@@ -553,7 +554,7 @@ class ServerFactory(layer.RawLayerServerFactory):
|
||||
@summary: Function call from twisted and build rdp protocol stack
|
||||
@param addr: destination address
|
||||
"""
|
||||
controller = RDPServerController(self._privateKeyFileName, self._certificateFileName, self._colorDepth)
|
||||
controller = RDPServerController(self._colorDepth, self._privateKeyFileName, self._certificateFileName)
|
||||
self.buildObserver(controller, addr)
|
||||
return controller.getProtocol()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user