33件ヒット
[1-33件を表示]
(0.129秒)
検索結果
先頭3件
-
OpenSSL
:: X509 :: ExtensionFactory # create _ extension(oid , value , critical=false) -> OpenSSL :: X509 :: Extension (21303.0) -
OpenSSL::X509::Extension のインスタンスを生成して返します。
...OpenSSL::X509::Extension のインスタンスを生成して返します。
引数の個数が1個である場合、それが配列、ハッシュ、文字列のいずれかである
ならば、
OpenSSL::X509::ExtensionFactory#create_ext_from_array、
OpenSSL::X509::ExtensionFactory#create_ext_fr......om_hash、
OpenSSL::X509::ExtensionFactory#create_ext_from_string、
がそれぞれ呼びだされてオブジェクトを生成します。
引数が2個以上である場合は、
OpenSSL::X509::ExtensionFactory#create_ext が呼びだされて
オブジェクトを生成します。
@param obj......拡張領域のデータ。配列、ハッシュ、文字列のいずれか
@param oid 拡張領域の識別子を表す文字列
@param value 拡張領域の値を表す文字列
@param critical 重要度(真偽値)... -
OpenSSL
:: X509 :: ExtensionFactory # create _ extension(obj) -> OpenSSL :: X509 :: Extension (21203.0) -
OpenSSL::X509::Extension のインスタンスを生成して返します。
...OpenSSL::X509::Extension のインスタンスを生成して返します。
引数の個数が1個である場合、それが配列、ハッシュ、文字列のいずれかである
ならば、
OpenSSL::X509::ExtensionFactory#create_ext_from_array、
OpenSSL::X509::ExtensionFactory#create_ext_fr......om_hash、
OpenSSL::X509::ExtensionFactory#create_ext_from_string、
がそれぞれ呼びだされてオブジェクトを生成します。
引数が2個以上である場合は、
OpenSSL::X509::ExtensionFactory#create_ext が呼びだされて
オブジェクトを生成します。
@param obj......拡張領域のデータ。配列、ハッシュ、文字列のいずれか
@param oid 拡張領域の識別子を表す文字列
@param value 拡張領域の値を表す文字列
@param critical 重要度(真偽値)... -
OpenSSL
:: X509 :: ExtensionFactory (3042.0) -
OpenSSL::X509::Extension を簡便に生成するための クラスです。
...OpenSSL::X509::Extension を簡便に生成するための
クラスです。
例
require 'openssl'
# ca_cert: CA の証明書オブジェクト
# req: CSR オブジェクト
# newcert: 新たに生成する証明書のオブジェクト
ca_cert = OpenSSL::X509::Certificate.new(File.read......を設定
factory = OpenSSL::X509::ExtensionFactory.new(ca_cert)
# CSR オブジェクトを設定
factory.subject_request = req
# basicConstraints 拡張領域を生成
p factory.create_extension("basicConstraints", "CA:FALSE")
# => basicConstraints = CA:FALSE
# subjectKeyIdentifier......ctory.create_extension("subjectKeyIdentifier", "hash")
# => subjectKeyIdentifier = 99:E7:A1:.....
# authorityKeyIdentifier 拡張領域を生成
# この値は CA の証明書オブジェクトから生成される
p factory.create_extension("authorityKeyIdentifier", "keyid,issuer:always"...