Sha256: c4577dddeb8d6fe392094790f0ee342619559f31735a0e83e27444df685174de

Contents?: true

Size: 925 Bytes

Versions: 21

Compression:

Stored size: 925 Bytes

Contents

require 'openssl'

unless defined?(OpenSSL::PKey::EC)
  puts "Skipping tests for ecdh-sha2-nistp384 key exchange"
else
  module Transport; module Kex
    class TestEcdhSHA2NistP384 < 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::SHA384
      end

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

      def ecparam
        "secp384r1"
      end
    end
  end; end
  end

Version data entries

21 entries across 21 versions & 5 rubygems

Version Path
tnargav-1.3.3 vendor/bundle/ruby/1.9.1/gems/net-ssh-2.6.8/test/transport/kex/test_ecdh_sha2_nistp384.rb
vagrant-shell-0.2.9 demo/templates/vendor/bundle/ruby/1.9.1/gems/net-ssh-2.6.7/test/transport/kex/test_ecdh_sha2_nistp384.rb
tnargav-1.2.3 vendor/bundle/ruby/1.9.1/gems/net-ssh-2.6.8/test/transport/kex/test_ecdh_sha2_nistp384.rb
vagrant-shell-0.2.8 demo/templates/vendor/bundle/ruby/1.9.1/gems/net-ssh-2.6.7/test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.6.8 test/transport/kex/test_ecdh_sha2_nistp384.rb
minmb-net-ssh-2.5.1 test/transport/kex/test_ecdh_sha2_nistp384.rb
vagrant-shell-0.2.6 vendor/bundle/gems/net-ssh-2.6.7/test/transport/kex/test_ecdh_sha2_nistp384.rb
vagrant-shell-0.2.5 vendor/bundle/gems/net-ssh-2.6.7/test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.6.7 test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.6.6 test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.6.5 test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.6.4 test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.6.3 test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.6.2 test/transport/kex/test_ecdh_sha2_nistp384.rb
abiquo-installer-tests-20121026.1 vendor/net-ssh-2.5.2/test/transport/kex/test_ecdh_sha2_nistp384.rb
abiquo-installer-tests-20121023.3 vendor/net-ssh-2.5.2/test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.6.1 test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.6.0 test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.5.2 test/transport/kex/test_ecdh_sha2_nistp384.rb
net-ssh-2.5.1 test/transport/kex/test_ecdh_sha2_nistp384.rb