#NEWLINE# def ssh_KEX_DH_GEX_REQUEST_OLD( self , packet ) : #NEWLINE# #INDENT# '\n        This represents different key exchange methods that share the same\n        integer value.  If the message is determined to be a KEXDH_INIT,\n        C{_ssh_KEXDH_INIT} is called to handle it.  Otherwise, for\n        KEX_DH_GEX_REQUEST_OLD payload::\n\n                integer ideal (ideal size for the Diffie-Hellman prime)\n\n            We send the KEX_DH_GEX_GROUP message with the group that is\n            closest in size to ideal.\n\n        If we were told to ignore the next key exchange packet by ssh_KEXINIT,\n        drop it on the floor and return.\n\n        @type packet: L{bytes}\n        @param packet: The message data.\n        ' #NEWLINE# if self . ignoreNextPacket : #NEWLINE# #INDENT# self . ignoreNextPacket = 0 #NEWLINE# return #NEWLINE# #UNINDENT# if _kex . isFixedGroup ( self . kexAlg ) : #NEWLINE# #INDENT# return self . _ssh_KEXDH_INIT ( packet ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . dhGexRequest = packet #NEWLINE# ideal = struct . unpack ( '>L' , packet ) [ 0 ] #NEWLINE# ( self . g , self . p ) = self . factory . getDHPrime ( ideal ) #NEWLINE# self . sendPacket ( MSG_KEX_DH_GEX_GROUP , ( MP ( self . p ) + MP ( ideal . g ) ) )