diff options
author | Miklos Fazekas <mfazekas@szemafor.com> | 2018-11-27 15:06:32 +0100 |
---|---|---|
committer | Miklos Fazekas <mfazekas@szemafor.com> | 2018-11-27 15:06:32 +0100 |
commit | 603135fdb2cd3e805c06d3f4742634981b971bd4 (patch) | |
tree | 0fe464619eb3202a3828c6bef8457e5958a55ae0 /test | |
parent | 465a6dae696368998bed54ebab660d38b16813b8 (diff) | |
download | net-ssh-603135fdb2cd3e805c06d3f4742634981b971bd4.tar.gz |
Support new private key format for other than ed25519 keys
Diffstat (limited to 'test')
-rw-r--r-- | test/authentication/test_agent.rb | 6 | ||||
-rw-r--r-- | test/authentication/test_ed25519.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/authentication/test_agent.rb b/test/authentication/test_agent.rb index d5c2290..9ec93f4 100644 --- a/test/authentication/test_agent.rb +++ b/test/authentication/test_agent.rb @@ -1,4 +1,4 @@ -require 'common' +require_relative '../common' require 'net/ssh/authentication/agent' module Authentication @@ -324,7 +324,7 @@ EOF def test_add_ed25519_identity return unless Net::SSH::Authentication::ED25519Loader::LOADED - ed25519 = Net::SSH::Authentication::ED25519::PrivKey.new(ED25519, nil) + ed25519 = Net::SSH::Authentication::ED25519::PrivKey.read(ED25519, nil) socket.expect do |s,type,buffer| assert_equal SSH2_AGENT_ADD_IDENTITY, type assert_equal buffer.read_string, "ssh-ed25519" @@ -341,7 +341,7 @@ EOF def test_add_ed25519_cert_identity return unless Net::SSH::Authentication::ED25519Loader::LOADED - cert = make_cert(Net::SSH::Authentication::ED25519::PrivKey.new(ED25519, nil)) + cert = make_cert(Net::SSH::Authentication::ED25519::PrivKey.read(ED25519, nil)) socket.expect do |s,type,buffer| assert_equal SSH2_AGENT_ADD_IDENTITY, type assert_equal buffer.read_string, "ssh-ed25519-cert-v01@openssh.com" diff --git a/test/authentication/test_ed25519.rb b/test/authentication/test_ed25519.rb index 6c0bca5..10d3133 100644 --- a/test/authentication/test_ed25519.rb +++ b/test/authentication/test_ed25519.rb @@ -18,7 +18,7 @@ unless ENV['NET_SSH_NO_ED25519'] priv = private_key_no_pwd pub_key = Net::SSH::Authentication::ED25519::PubKey.new(pub_data) - priv_key = Net::SSH::Authentication::ED25519::PrivKey.new(priv,nil) + priv_key = Net::SSH::Authentication::ED25519::PrivKey.read(priv, nil) shared_secret = "Hello" signed = priv_key.ssh_do_sign(shared_secret) @@ -39,7 +39,7 @@ unless ENV['NET_SSH_NO_ED25519'] priv = private_key_pwd pub_key = Net::SSH::Authentication::ED25519::PubKey.new(pub_data) - priv_key = Net::SSH::Authentication::ED25519::PrivKey.new(priv,'pwd') + priv_key = Net::SSH::Authentication::ED25519::PrivKey.read(priv,'pwd') shared_secret = "Hello" signed = priv_key.ssh_do_sign(shared_secret) |