kzk / webhdfs

Ruby client for Hadoop WebHDFS
Other
81 stars 46 forks source link

Client-cert parameters #25

Closed shouta-dev closed 8 years ago

shouta-dev commented 8 years ago

This patch adds client-cert and ssl-version parameters of Net::HTTP.

require 'webhdfs'
require 'openssl'

client = WebHDFS::Client.new(localhost, 14000)
client.ssl = true
client.ssl_version = :TLSv1
client.ssl_key = OpenSSL::PKey::RSA.new(open('/path/to/key.pem'))
client.ssl_cert = OpenSSL::X509::Certificate.new(open('/path/to/cert.pem'))
tagomoris commented 8 years ago

@shouta-dev LGTM. Does it work for you now? And, could you add "Usage" to README?

shouta-dev commented 8 years ago

@tagomoris

Does it work for you now?

Yes!

And, could you add "Usage" to README?

I've updated README.

Thank you.

tagomoris commented 8 years ago

@shouta-dev I see. Thank you for great patch!

tagomoris commented 8 years ago

v0.7.4 released with this feature!