Sha256: 782a5ac4d05cd70fe2f7b848144906d51639d59fde1aaea3c79a2f470448789d
Contents?: true
Size: 923 Bytes
Versions: 21
Compression:
Stored size: 923 Bytes
Contents
require 'openssl' unless defined?(OpenSSL::PKey::EC) puts "Skipping tests for ecdh-sha2-nistp521 key exchange" else 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
21 entries across 21 versions & 5 rubygems