diff options
| author | mo <mo@mokhan.ca> | 2018-05-07 16:20:11 -0600 |
|---|---|---|
| committer | mo <mo@mokhan.ca> | 2018-05-07 16:20:11 -0600 |
| commit | f828908044c26422f646814a222a3bc9db357948 (patch) | |
| tree | 96e8cecb1d889f0790c6946be4fae7c788c02c27 | |
| parent | a7ff82b96fc264b8587cc105b23516f60a0d4cfe (diff) | |
assign passphrase.
| -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 |
