diff options
| -rw-r--r-- | lib/net/hippie/client.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/net/hippie/client.rb b/lib/net/hippie/client.rb index bcf3a1c..4e7a059 100644 --- a/lib/net/hippie/client.rb +++ b/lib/net/hippie/client.rb @@ -18,6 +18,7 @@ module Net @default_headers = headers @key = key @mapper = mapper + @passphrase = passphrase end def execute(uri, request) @@ -68,11 +69,7 @@ module Net http.set_debug_output(Net::Hippie.logger) http.cert = OpenSSL::X509::Certificate.new(certificate) if certificate if key - http.key = if passphrase - OpenSSL::PKey::RSA.new(key, passphrase) - else - OpenSSL::PKey::RSA.new(key) - end + http.key = passphrase ? OpenSSL::PKey::RSA.new(key, passphrase) : OpenSSL::PKey::RSA.new(key) end http end |
