From cae55de7bf25d60f4f504c658b936bbbd94ff464 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 21 Jun 2013 10:51:35 -0700 Subject: fix ecdsa ssh key comparison --- lib/leap_cli/commands/node.rb | 2 +- lib/leap_cli/ssh_key.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/leap_cli/commands/node.rb b/lib/leap_cli/commands/node.rb index 2ced2ee..7a8dc0e 100644 --- a/lib/leap_cli/commands/node.rb +++ b/lib/leap_cli/commands/node.rb @@ -166,7 +166,7 @@ module LeapCli; module Commands public_key = get_public_key_for_ip(address, port) pub_key_path = Path.named_path([:node_ssh_pub_key, node.name]) if Path.exists?(pub_key_path) - if public_key == SshKey.load_from_file(pub_key_path) + if public_key == SshKey.load(pub_key_path) log :trusted, "- Public SSH host key for #{node.name} matches previously saved key", :indent => 1 else bail! do diff --git a/lib/leap_cli/ssh_key.rb b/lib/leap_cli/ssh_key.rb index 4b3c985..a525128 100644 --- a/lib/leap_cli/ssh_key.rb +++ b/lib/leap_cli/ssh_key.rb @@ -82,6 +82,7 @@ module LeapCli def_delegator :@key, :private_encrypt, :private_encrypt def_delegator :@key, :private_decrypt, :private_decrypt def_delegator :@key, :params, :params + def_delegator :@key, :to_text, :to_text def public_key SshKey.new(@key.public_key) -- cgit v1.2.3