るりまサーチ

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

別のキーワード

  1. object false
  2. _builtin false
  3. rb_false
  4. false object

検索結果

<< 1 2 3 ... > >>

OpenSSL::X509::Extension.new(oid, value, critical=false) -> OpenSSL::X509::Extension (115.0)

OpenSSL::X509::Extension オブジェクトを生成します。

...OpenSSL::X509::Extension オブジェクトを生成します。

引数が1つの場合は DER 形式の文字列を渡します。

引数が2つ以上の場合は、oid には拡張領域の OID の ドット区切り表記、
short name、long name のいずれかである文字列を与えま...
...す。
value にはその値を表す DER 形式の文字列、もしくは
OpenSSL
::ASN1::ASN1Data のサブクラスを与えます。

例;

require 'openssl'
include OpenSSL
oid = "subjectKeyIdentifier"
val = "\004\024\206\312\245\"\201b\357\255\n\211\274\255rA,)I\364\206V"
ex = X509:...
...01\x01\xFF")
p ex2.oid # => "basicConstrains"
ex3 = X509::Extension.new("basicConstraints", ASN1.Sequence([ASN1::Boolean(false)]))
p ex3 # => basicConstraints = CA:FALSE

@param der DER形式の文字列
@param oid OIDを表す文字列(ドット区切り、short name, long nameのいずれか...

OpenSSL::BN.pseudo_rand(bits, fill=0, odd=false) -> OpenSSL::BN (103.0)

乱数を生成し、返します。

...@param bits 発生させる数のビット数
@param fill 上位ビットの性質を決める整数
@param odd 真なら発生させる数は奇数のみとなる
@raise OpenSSL::BNError 乱数の生成に失敗した場合に発生します
@see OpenSSL::BN.rand, OpenSSL::BN.pseudo_rand_range...

OpenSSL::BN.rand(bits, fill=0, odd=false) -> OpenSSL::BN (103.0)

暗号論的に強い擬似乱数を生成し、返します。

...@param bits 発生させる数のビット数
@param fill 上位ビットの性質を決める整数
@param odd 真なら発生させる数は奇数のみとなる
@raise OpenSSL::BNError 乱数の生成に失敗した場合に発生します
@see OpenSSL::BN.pseudo_rand, OpenSSL::BN.rand_range...

OpenSSL::X509::ExtensionFactory#create_ext(oid, value, critical = false) -> OpenSSL::X509::Extension (103.0)

OpenSSL::X509::Extension のインスタンスを生成して返します。

...OpenSSL::X509::Extension のインスタンスを生成して返します。

@param oid 拡張領域の識別子を表す文字列
@param value 拡張領域の値を表す文字列
@param critical 重要度(真偽値)...

OpenSSL::X509::ExtensionFactory#create_extension(oid, value, critical=false) -> OpenSSL::X509::Extension (103.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...

絞り込み条件を変える

OpenSSL::ASN1 (26.0)

ASN.1(Abstract Syntax Notation One) のデータを取り扱うためのモジュールです。

...ASN.1(Abstract Syntax Notation One)
のデータを取り扱うためのモジュールです。

OpenSSL
で証明書などを取り扱うのに必要になります。

このモジュールには、ASN.1関連のモジュール関数や定数、
ASN.1 のデータ型に対応するクラスが定...
...において、
ASN.1 のデータ型は OpenSSL::ASN1::ASN1Data および
そのサブクラスにマップされています。

ASN.1 の単純型(simple type)は OpenSSL::ASN1::Primitive の
各サブクラスに、構造型(structured type)は OpenSSL::ASN1::Constructive
の各サブクラス...
...ータ
y = OpenSSL::ASN1::Sequence.new([OpenSSL::ASN1::Boolean.new(true),
OpenSSL
::ASN1::Integer.new(-12)])
# APPLICATION タグクラスのタグ2番でタグ付けられたデータ
z = OpenSSL::ASN1::ASN1Data.new([OpenSSL::ASN1::Boolean.new(false)],...

OpenSSL::X509::ExtensionFactory (20.0)

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

...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 = OpenSSL::X509::Certificate.new
# 新しい ExtensionFactory オブジェクトを生成し、 CA の証明書オブジェクト
# を設定
factory = OpenSSL::X509::ExtensionFactory.new(ca_cert)
# CSR オ...
...factory.subject_request = req
# basicConstraints 拡張領域を生成
p factory.create_extension("basicConstraints", "CA:FALSE")
# => basicConstraints = CA:FALSE

# subjectKeyIdentifier 拡張領域を生成
# この値は CSR オブジェクトの公開鍵から生成される
p fac...

OpenSSL::X509::StoreContext#error=(error) (20.0)

エラーコードを設定します。

...エラーコードを設定します。

OpenSSL
::X509::StoreContext#verify を呼びだし、
証明書チェインの各証明書を検証した
コールバック(OpenSSL::X509::Store#verify_callback=)が呼び出され、
StoreContext オブジェクトが渡されますが、このメソッド...
...ックの返り値を false にすると、最終的なエラーコードが
ここで設定したものになります。OpenSSL::X509::StoreContext#error_string
もその値に応じた文字列が返るようになります。

例:
require 'openssl'

store = OpenSSL::X509::Store.new
store...
....set_default_paths
cert = OpenSSL::X509::Certificate.new(...)
store.verify(cert, chain){|ok,ctx|
ctx.error = OpenSSL::X509::V_ERR_APPLICATION_VERIFICATION;
false
} # => false
p store.error # => OpenSSL::X509::V_ERR_APPLICATION_VERIFICATION
p store.error_string # => "application verif...

OpenSSL::X509::Extension.new(der) -> OpenSSL::X509::Extension (15.0)

OpenSSL::X509::Extension オブジェクトを生成します。

...OpenSSL::X509::Extension オブジェクトを生成します。

引数が1つの場合は DER 形式の文字列を渡します。

引数が2つ以上の場合は、oid には拡張領域の OID の ドット区切り表記、
short name、long name のいずれかである文字列を与えま...
...す。
value にはその値を表す DER 形式の文字列、もしくは
OpenSSL
::ASN1::ASN1Data のサブクラスを与えます。

例;

require 'openssl'
include OpenSSL
oid = "subjectKeyIdentifier"
val = "\004\024\206\312\245\"\201b\357\255\n\211\274\255rA,)I\364\206V"
ex = X509:...
...01\x01\xFF")
p ex2.oid # => "basicConstrains"
ex3 = X509::Extension.new("basicConstraints", ASN1.Sequence([ASN1::Boolean(false)]))
p ex3 # => basicConstraints = CA:FALSE

@param der DER形式の文字列
@param oid OIDを表す文字列(ドット区切り、short name, long nameのいずれか...

OpenSSL::BN#negative? -> bool (14.0)

自身が負である場合に true を返します。Ruby 2.5, OpenSSL 2.1.0 から利用できます。

...自身が負である場合に true を返します。Ruby 2.5, OpenSSL 2.1.0 から利用できます。

//emlist[][ruby]{
require 'openssl'
p 15.to_bn.negative? # => false
p 0.to_bn.negative? # => false
p (-5).to_bn.negative? # => true
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>