Sha256: de5aecb65de231416287641fa40a77e98e3b0de0b4ea43dc3cc34165c021ebd8

Contents?: true

Size: 973 Bytes

Versions: 66

Compression:

Stored size: 973 Bytes

Contents

require 'openssl'

unless defined?(OpenSSL::PKey::EC)
  puts "Skipping tests for ecdh-sha2-nistp521 key exchange"
else
  require 'transport/kex/test_ecdh_sha2_nistp256'
  module Transport; module Kex
    class TestEcdhSHA2NistP521 < TestEcdhSHA2NistP256

      def setup
        @ecdh = @algorithms = @connection = @server_key = 
          @packet_data = @shared_secret = nil
      end

      def test_exchange_keys_should_return_expected_results_when_successful
        result = exchange!
        assert_equal session_id, result[:session_id]
        assert_equal server_host_key.to_blob, result[:server_key].to_blob
        assert_equal shared_secret, result[:shared_secret]
        assert_equal digester, result[:hashing_algorithm]
      end

      private

      def digester
        OpenSSL::Digest::SHA512
      end

      def subject
        Net::SSH::Transport::Kex::EcdhSHA2NistP521
      end

      def ecparam
        "secp521r1"
      end
    end
  end; end
end

Version data entries

66 entries across 56 versions & 8 rubygems

Version Path
savant-echo-1.0.4 bin/packaging/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-1.0.4 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-3.0.2/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-1.0.1 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-1.0.1 bin/packaging/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.91 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.91 bin/packaging/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.9 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.9 bin/packaging/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.6 bin/packaging/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.6 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.5 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.5 bin/packaging/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.4 bin/packaging/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.4 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.3 bin/packaging/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
savant-echo-0.1.3 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/net-ssh-3.2.0/test/transport/kex/test_ecdh_sha2_nistp521.rb
net-ssh-3.3.0.beta1 test/transport/kex/test_ecdh_sha2_nistp521.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/net-ssh-3.0.2/test/transport/kex/test_ecdh_sha2_nistp521.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/net-ssh-3.0.2/test/transport/kex/test_ecdh_sha2_nistp521.rb