Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Return correct ECError class for PKey::EC key type

  • Loading branch information...
commit 7df9081900bb5c5bce1e14bf49aa54db94638fb4 1 parent afc95da
@herrtreas herrtreas authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.