bug fix on client requested protocol
This commit is contained in:
@@ -11,7 +11,7 @@ from rdpy.protocol.rdp import rdp
|
||||
|
||||
class TestServerFactory(rdp.ServerFactory):
|
||||
def __init__(self):
|
||||
rdp.ServerFactory.__init__(self, "/home/speyrefitte/dev/certificate/rdpy.key", "/home/speyrefitte/dev/certificate/rdpy.crt")
|
||||
rdp.ServerFactory.__init__(self, "/home/sylvain/dev/certificate/rdpy.key", "/home/sylvain/dev/certificate/rdpy.crt")
|
||||
def startedConnecting(self, connector):
|
||||
pass
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@ class MCS(LayerAutomata):
|
||||
self._clientSettings.getBlock(gcc.MessageType.CS_CORE).serverSelectedProtocol.value = self._transport._selectedProtocol
|
||||
self.sendConnectInitial()
|
||||
else:
|
||||
self._serverSettings.getBlock(gcc.MessageType.SC_CORE).clientRequestedProtocol.value = self._transport._requestedProtocol
|
||||
self.setNextState(self.recvConnectInitial)
|
||||
|
||||
def connectNextChannel(self):
|
||||
|
||||
@@ -282,7 +282,6 @@ class ClientTLSContext(ssl.ClientContextFactory):
|
||||
"""
|
||||
def getContext(self):
|
||||
context = SSL.Context(SSL.TLSv1_METHOD)
|
||||
context.set_options(0x00020000)#SSL_OP_NO_COMPRESSION
|
||||
context.set_options(SSL.OP_DONT_INSERT_EMPTY_FRAGMENTS)
|
||||
context.set_options(SSL.OP_TLS_BLOCK_PADDING_BUG)
|
||||
return context
|
||||
@@ -297,9 +296,8 @@ class ServerTLSContext(ssl.DefaultOpenSSLContextFactory):
|
||||
class TPDUSSLContext(SSL.Context):
|
||||
def __init__(self, method):
|
||||
SSL.Context.__init__(method)
|
||||
self.set_options(0x00020000)#SSL_OP_NO_COMPRESSION
|
||||
self.set_options(SSL.OP_DONT_INSERT_EMPTY_FRAGMENTS)
|
||||
self.set_options(SSL.OP_TLS_BLOCK_PADDING_BUG)
|
||||
|
||||
ssl.DefaultOpenSSLContextFactory.__init__(self, privateKeyFileName, certificateFileName, SSL.TLSv1_METHOD, TPDUSSLContext)
|
||||
|
||||
ssl.DefaultOpenSSLContextFactory.__init__(self, privateKeyFileName, certificateFileName, SSL.SSLv23_METHOD, TPDUSSLContext)
|
||||
|
||||
Reference in New Issue
Block a user