4件ヒット
[1-4件を表示]
(0.058秒)
検索結果
先頭4件
-
OpenSSL
:: PKCS12 # to _ der -> String (87346.0) -
自身を DER 形式の文字列に変換します。
...自身を DER 形式の文字列に変換します。
@raise OpenSSL::PKCS12::PKCS12Error 変換に失敗した場合に発生します... -
OpenSSL
:: PKey :: EC :: Group # to _ der -> String (87346.0) -
自身を DER 形式の文字列に変換します。
...自身を DER 形式の文字列に変換します。
@raise OpenSSL::PKey::EC::Group::Error 変換に失敗した場合に発生します。... -
OpenSSL
:: ASN1 . # decode(der) -> OpenSSL :: ASN1 :: ASN1Data (33538.0) -
DER 表現の文字列を解析し、そこにエンコードされている ASN.1 の値を OpenSSL::ASN1::ASN1Data のサブクラスのインスタンスとして返します。
...DER 表現の文字列を解析し、そこにエンコードされている ASN.1 の値を
OpenSSL::ASN1::ASN1Data のサブクラスのインスタンスとして返します。
複数の ASN.1 の値が含まれている場合、先頭の値だけを返します。
ASN.1 オブジェクトが......-e '
require "openssl"
require "pp"
pem = File.read(ARGV[0])
cert = OpenSSL::X509::Certificate.new(pem)
pp OpenSSL::ASN1.decode(cert.to_der)
' mycert.pem
#<OpenSSL::ASN1::Sequence:0x814e9fc
@tag=16,
@tag_class=:UNIVERSAL,
@tagging=nil,
@value=
[#<OpenSSL::ASN1::Sequence......@tag=16,
@tag_class=:UNIVERSAL,
@tagging=nil,
@value=
[#<OpenSSL::ASN1::ASN1Data:0x814f690
@tag=0,
@tag_class=:CONTEXT_SPECIFIC,
@value=
[#<OpenSSL::ASN1::Integer:0x814f6a4
@tag=2,
@tag_class=:UNIVERSAL,... -
OpenSSL
:: OCSP (33241.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...