るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.017秒)

別のキーワード

  1. response new
  2. net/http response
  3. http get_response
  4. net/http get_response
  5. imap add_response_handler

検索結果

OpenSSL::OCSP::BasicResponse#verify(certs, store, flags=0) -> bool (63310.0)

署名を検証します。

...ます。
* OpenSSL::OCSP::TRUSTOTHER
* OpenSSL::OCSP::NOSIGS
* OpenSSL::OCSP::NOVERIFY
* OpenSSL::OCSP::NOINTERN

TRUSTOTHER を有効にすると certs で指定した証明書を検証せずに信頼します。

@param certs 検証に用いる追加的な証明書(OpenSSL::X509::Certific...
...ate オブジェクトの配列)
@param store 検証に用いる証明書ストア(OpenSSL::X509::Store オブジェクト)
@param flags フラグ(整数)...

OpenSSL::OCSP (151.0)

OCSP(Online Certificate Status Protocol)を取り扱うための モジュールです。OCSP は 2560 で定義されています。

...示する
require 'openssl'
require 'net/http'
# ...
subject # 問い合わせ対象の証明書(Certificate オブジェクト)
issuer # subject の発行者の証明書(Certificate オブジェクト)
store # 信頼している証明書ストア
cid = OpenSSL::OCSP::CertificateId.new...
...issuer)
req = OpenSSL::OCSP::Request.new
req.add_certid(cid)
req.add_nonce

http = Net::HTTP.new('ocsp.example.com', 80)
httpres = http.post("/", req.to_der, 'content-type' => 'application/ocsp-request')
raise "HTTP error" if !httpres.kind_of?(Net::HTTPOK)
res = OpenSSL::OCSP::Respon...
...se.new(httpres.body)

puts "Response status: #{res.status_string}"
exit if res.status != OpenSSL::OCSP::RESPONSE_STATUS_SUCCESSFUL

basic_resp = res.basic
raise "nonce error" unless [-1, 1].include?(req.check_nonce(basic_resp))
unless basic_resp.verify([], store)
puts "verify respons...