るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.137秒)
トップページ > 種類:クラス[x] > クエリ:A[x] > クエリ:ExtensionFactory[x]

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

ライブラリ

検索結果

OpenSSL::X509::ExtensionFactory (24019.0)

OpenSSL::X509::Extension を簡便に生成するための クラスです。

...require 'openssl'
# ca_cert: CA の証明書オブジェクト
# req: CSR オブジェクト
# newcert: 新たに生成する証明書のオブジェクト
ca_cert = OpenSSL::X509::Certificate.new(File.read('ca_cert.pem'))
req = OpenSSL::X509::Request.new(File.read('req.pem'))
newcert...
...ficate.new
# 新しい ExtensionFactory オブジェクトを生成し、 CA の証明書オブジェクト
# を設定
factory = OpenSSL::X509::ExtensionFactory.new(ca_cert)
# CSR オブジェクトを設定
factory.subject_request = req
# basicConstraints 拡張領域を生成
p fact...
...ate_extension("basicConstraints", "CA:FALSE")
# => basicConstraints = CA:FALSE

# subjectKeyIdentifier 拡張領域を生成
# この値は CSR オブジェクトの公開鍵から生成される
p factory.create_extension("subjectKeyIdentifier", "hash")
# => subjectKeyIdentifier = 99:E7:A...