Skip to content

Instantly share code, notes, and snippets.

@yusukemihara
Created April 3, 2013 00:33
Show Gist options
  • Select an option

  • Save yusukemihara/5297487 to your computer and use it in GitHub Desktop.

Select an option

Save yusukemihara/5297487 to your computer and use it in GitHub Desktop.
nestfulでSSLクライアント認証する。
ops = {
:ssl_options => {
:use_ssl => true,
:vefify_mode => OpenSSL::SSL::VERIFY_PEER,
:cert => OpenSSL::X509::Certificate.new(File.read(CERT_FILE)),
:key => OpenSSL::PKey::RSA.new(File.read(KEY_FILE)),
:ca_file => CA_FILE
}
}
ops[:params] = {:id => 1, :data => 2}
Nestful.get(uri,ops)
こんな感じ。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment