Skip to content
Browse files

Return correct ECError class for PKey::EC key type

  • Loading branch information...
1 parent afc95da commit 7df9081900bb5c5bce1e14bf49aa54db94638fb4 @herrtreas herrtreas committed Jan 10, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/net/ssh/key_factory.rb
View
2 lib/net/ssh/key_factory.rb
@@ -61,7 +61,7 @@ def load_data_private_key(data, passphrase=nil, ask_passphrase=true, filename=""
error_class = OpenSSL::PKey::RSAError
elsif data.match(/-----BEGIN EC PRIVATE KEY-----/) && defined?(OpenSSL::PKey::EC)
key_type = OpenSSL::PKey::EC
- error_class = OpenSSL::PKey::RCError
+ error_class = OpenSSL::PKey::ECError
elsif data.match(/-----BEGIN (.+) PRIVATE KEY-----/)
raise OpenSSL::PKey::PKeyError, "not a supported key type '#{$1}'"
else

0 comments on commit 7df9081

Please sign in to comment.
Something went wrong with that request. Please try again.