るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.058秒)
トップページ > ライブラリ:openssl[x] > バージョン:2.4.0[x] > クエリ:openssl[x] > クエリ:add_certid[x]

別のキーワード

  1. tracer add_filter
  2. logger add
  3. rexml/document add
  4. openssl add_extension
  5. socket ip_add_membership

クラス

キーワード

検索結果

OpenSSL::OCSP::Request#add_certid(cid) -> self (87382.0)

Request オブジェクトに問い合わせ対象の証明書情報を追加します。

...証明書情報は OpenSSL::OCSP::CertificateId の形で渡す必要があります。

@param cid 問い合わせ対象の証明書情報(OpenSSL::OCSP::CertificateId オブジェクト)
@raise OpenSSL::OCSP::OCSPError 追加に失敗した場合に発生します。
@see OpenSSL::OCSP::Request#ce...

OpenSSL::OCSP::Request#certid -> [OpenSSL::OCSP::CertificateId] (33346.0)

Request オブジェクトが保持している問い合わせ対象の証明書の情報を 配列で返します。

...Request オブジェクトが保持している問い合わせ対象の証明書の情報を
配列で返します。

@see OpenSSL::OCSP::Request#add_certid...

OpenSSL::OCSP (33205.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...