bug fix on client requested protocol

This commit is contained in:
citronneur
2014-07-19 09:33:28 +02:00
parent 5d1a929d7c
commit f51ef15865
3 changed files with 4 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ from rdpy.protocol.rdp import rdp
class TestServerFactory(rdp.ServerFactory): class TestServerFactory(rdp.ServerFactory):
def __init__(self): 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): def startedConnecting(self, connector):
pass pass

View File

@@ -139,6 +139,7 @@ class MCS(LayerAutomata):
self._clientSettings.getBlock(gcc.MessageType.CS_CORE).serverSelectedProtocol.value = self._transport._selectedProtocol self._clientSettings.getBlock(gcc.MessageType.CS_CORE).serverSelectedProtocol.value = self._transport._selectedProtocol
self.sendConnectInitial() self.sendConnectInitial()
else: else:
self._serverSettings.getBlock(gcc.MessageType.SC_CORE).clientRequestedProtocol.value = self._transport._requestedProtocol
self.setNextState(self.recvConnectInitial) self.setNextState(self.recvConnectInitial)
def connectNextChannel(self): def connectNextChannel(self):

View File

@@ -282,7 +282,6 @@ class ClientTLSContext(ssl.ClientContextFactory):
""" """
def getContext(self): def getContext(self):
context = SSL.Context(SSL.TLSv1_METHOD) 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_DONT_INSERT_EMPTY_FRAGMENTS)
context.set_options(SSL.OP_TLS_BLOCK_PADDING_BUG) context.set_options(SSL.OP_TLS_BLOCK_PADDING_BUG)
return context return context
@@ -297,9 +296,8 @@ class ServerTLSContext(ssl.DefaultOpenSSLContextFactory):
class TPDUSSLContext(SSL.Context): class TPDUSSLContext(SSL.Context):
def __init__(self, method): def __init__(self, method):
SSL.Context.__init__(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_DONT_INSERT_EMPTY_FRAGMENTS)
self.set_options(SSL.OP_TLS_BLOCK_PADDING_BUG) 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)