Sha256: f1b9cd3da9fd2bf2e15d3c9339e79523c7ac34ec6613d525fc0ccfc9f1a08937

Contents?: true

Size: 1014 Bytes

Versions: 5

Compression:

Stored size: 1014 Bytes

Contents

require "net/ssh/test"

class Net::SSH::Test::Packet
  alias :original_types :types
  def types
    @types ||= case @type
      when CHANNEL_EXTENDED_DATA then [:long, :long, :string]
      else original_types
      end
  end
end

class Net::SSH::Test::Script
  def gets_channel_extended_data(channel, data)
    events << Net::SSH::Test::RemotePacket.new(:channel_extended_data, channel.local_id, 1, data)
  end
end

class Net::SSH::Test::Channel
  def gets_extended_data(data)
    script.gets_channel_extended_data(self, data)
  end
end

class Net::SSH::Test::Kex
  def exchange_keys
    result = Net::SSH::Buffer.from(:byte, NEWKEYS)
    @connection.send_message(result)

    buffer = @connection.next_message
    raise Net::SSH::Exception, "expected NEWKEYS" unless buffer.type == NEWKEYS

    { :session_id        => "abc-xyz",
      :server_key        => OpenSSL::PKey::RSA.new(512),
      :shared_secret     => OpenSSL::BN.new("1234567890", 10),
      :hashing_algorithm => OpenSSL::Digest::SHA1 }
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
soloist-1.0.3 spec/helpers/net_ssh_test_patch.rb
soloist-1.0.2 spec/helpers/net_ssh_test_patch.rb
soloist-1.0.1 spec/helpers/net_ssh_test_patch.rb
soloist-rvm-0.0.1 spec/helpers/net_ssh_test_patch.rb
soloist-1.0.0 spec/helpers/net_ssh_test_patch.rb