ライブラリ
- openssl (99)
クラス
モジュール
-
OpenSSL
:: ASN1 (33)
キーワード
- ASN1 (11)
-
NEWS for Ruby 2
. 0 . 0 (11) - Request (11)
- decode (11)
-
net
/ imap (11)
検索結果
先頭5件
- OpenSSL
:: ASN1 :: Sequence . new(value) -> OpenSSL :: ASN1 :: Sequence - OpenSSL
:: ASN1 :: Sequence . new(value , tag , tagging , tag _ class) -> OpenSSL :: ASN1 :: Sequence - OpenSSL
:: ASN1 . # Sequence(value) -> OpenSSL :: ASN1 :: Sequence -> OpenSSL :: ASN1 :: Sequence - OpenSSL
:: ASN1 . # Sequence(value , tag , tagging , tag _ class) -> OpenSSL :: ASN1 :: Sequence - OpenSSL
:: X509 :: Extension . new(der) -> OpenSSL :: X509 :: Extension
-
OpenSSL
:: ASN1 :: Sequence . new(value) -> OpenSSL :: ASN1 :: Sequence (32372.0) -
ASN.1 の Sequence 型の値を表現する OpenSSL::ASN1::Sequence オブジェクトを 生成します。
... Sequence 型の値を表現する OpenSSL::ASN1::Sequence オブジェクトを
生成します。
value 以外の引数を省略した場合はタグクラスは :UNIVERSAL、
タグ は OpenSSL::ASN1::SEQUENCE となります。
@param value ASN.1値を表すRubyのオブジェクト(OpenSSL::A... -
OpenSSL
:: ASN1 :: Sequence . new(value , tag , tagging , tag _ class) -> OpenSSL :: ASN1 :: Sequence (32372.0) -
ASN.1 の Sequence 型の値を表現する OpenSSL::ASN1::Sequence オブジェクトを 生成します。
... Sequence 型の値を表現する OpenSSL::ASN1::Sequence オブジェクトを
生成します。
value 以外の引数を省略した場合はタグクラスは :UNIVERSAL、
タグ は OpenSSL::ASN1::SEQUENCE となります。
@param value ASN.1値を表すRubyのオブジェクト(OpenSSL::A... -
OpenSSL
:: ASN1 . # Sequence(value) -> OpenSSL :: ASN1 :: Sequence -> OpenSSL :: ASN1 :: Sequence (29548.0) -
ASN.1 の Sequence 型の値を表現する Ruby のオブジェクトを 生成します。
...ASN.1 の Sequence 型の値を表現する Ruby のオブジェクトを
生成します。
OpenSSL::ASN1::Sequence.new と同じです。
@param value ASN.1値を表すRubyのオブジェクト(OpenSSL::ASN1::ASN1Dataの配列)
@param tag タグ番号
@param tagging タグ付けの方法(:IMPLIC... -
OpenSSL
:: ASN1 . # Sequence(value , tag , tagging , tag _ class) -> OpenSSL :: ASN1 :: Sequence (29348.0) -
ASN.1 の Sequence 型の値を表現する Ruby のオブジェクトを 生成します。
...ASN.1 の Sequence 型の値を表現する Ruby のオブジェクトを
生成します。
OpenSSL::ASN1::Sequence.new と同じです。
@param value ASN.1値を表すRubyのオブジェクト(OpenSSL::ASN1::ASN1Dataの配列)
@param tag タグ番号
@param tagging タグ付けの方法(:IMPLIC... -
OpenSSL
:: X509 :: Extension . new(der) -> OpenSSL :: X509 :: Extension (29262.0) -
OpenSSL::X509::Extension オブジェクトを生成します。
...OpenSSL::X509::Extension オブジェクトを生成します。
引数が1つの場合は DER 形式の文字列を渡します。
引数が2つ以上の場合は、oid には拡張領域の OID の ドット区切り表記、
short name、long name のいずれかである文字列を与えま......式の文字列、もしくは
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::Extension.new(oid, val)
p ex.value # => "8......:CA:A5:22:81:62:EF:AD:0A:89:BC:AD:72:41:2C:29:49:F4:86:56"
ex2 = X509::Extension.new("2.5.29.19", "0\x03\x01\x01\xFF")
p ex2.oid # => "basicConstrains"
ex3 = X509::Extension.new("basicConstraints", ASN1.Sequence([ASN1::Boolean(false)]))
p ex3 # => basicConstraints = CA:FALSE
@param der DER... -
OpenSSL
:: X509 :: Extension . new(oid , value , critical=false) -> OpenSSL :: X509 :: Extension (29262.0) -
OpenSSL::X509::Extension オブジェクトを生成します。
...OpenSSL::X509::Extension オブジェクトを生成します。
引数が1つの場合は DER 形式の文字列を渡します。
引数が2つ以上の場合は、oid には拡張領域の OID の ドット区切り表記、
short name、long name のいずれかである文字列を与えま......式の文字列、もしくは
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::Extension.new(oid, val)
p ex.value # => "8......:CA:A5:22:81:62:EF:AD:0A:89:BC:AD:72:41:2C:29:49:F4:86:56"
ex2 = X509::Extension.new("2.5.29.19", "0\x03\x01\x01\xFF")
p ex2.oid # => "basicConstrains"
ex3 = X509::Extension.new("basicConstraints", ASN1.Sequence([ASN1::Boolean(false)]))
p ex3 # => basicConstraints = CA:FALSE
@param der DER... -
OpenSSL
:: ASN1 (11420.0) -
ASN.1(Abstract Syntax Notation One) のデータを取り扱うためのモジュールです。
...ASN.1(Abstract Syntax Notation One)
のデータを取り扱うためのモジュールです。
OpenSSLで証明書などを取り扱うのに必要になります。
このモジュールには、ASN.1関連のモジュール関数や定数、
ASN.1 のデータ型に対応するクラスが定......す。
OpenSSL::ASN1::Primitive のタグ付けの情報を使うことで、
IMPLICIT or EXPLICIT なタグ付けを実現することもできます。
例:
require 'openssl'
# 単純型のデータ
x = OpenSSL::ASN1::UTF8String.new("foobar")
# 構造型のデータ
y = OpenSSL::ASN1::......字列をデコード
OpenSSL::ASN1.decode(x.to_der)
# => #<OpenSSL::ASN1::UTF8String:0x000000027cc700 @tag=12, @value="foobar", @tagging=nil, @tag_class=:UNIVERSAL>
OpenSSL::ASN1.decode(y.to_der)
# => #<OpenSSL::ASN1::Sequence:0x000000027c47d0 @tag=16, @value=[#<OpenSSL::ASN1::Boolean:0x000... -
OpenSSL
:: ASN1 . # decode(der) -> OpenSSL :: ASN1 :: ASN1Data (11183.0) -
DER 表現の文字列を解析し、そこにエンコードされている ASN.1 の値を OpenSSL::ASN1::ASN1Data のサブクラスのインスタンスとして返します。
...DER 表現の文字列を解析し、そこにエンコードされている ASN.1 の値を
OpenSSL::ASN1::ASN1Data のサブクラスのインスタンスとして返します。
複数の ASN.1 の値が含まれている場合、先頭の値だけを返します。
ASN.1 オブジェクトが......equire "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:0x814ea......@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
:: X509 :: Request (11084.0) -
X.509 の証明書署名要求(Certificate Signing Request, CSR)を表わす クラスです。
...成する例。
require 'openssl'
# ファイルから秘密鍵を読み込む
rsa = OpenSSL::PKey::RSA.new(File.read("privkey.pem"))
# 新しい CSR オブジェクトを生成
csr = OpenSSL::X509::Request.new
# DN を生成
name = OpenSSL::X509::Name.new
name.add_entry('C', 'JP')......key
# attribute を設定
factory = OpenSSL::X509::ExtensionFactory.new
exts = [ factory.create_ext("subjectAltName", "DNS:foo.example.com") ]
asn1exts = OpenSSL::ASN1::Set([OpenSSL::ASN1::Sequence(exts)])
csr.add_attribute(OpenSSL::X509::Attribute.new("extReq", asn1exts))
# 署名
csr... -
NEWS for Ruby 2
. 0 . 0 (6192.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......tionSequence.of to get the instruction sequence
from a method or a block.
* 追加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence#absolute_path,
RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#base_label,
RubyVM::InstructionSequence#fi......tSpace.#reachable_objects_from
* openssl
* Consistently raise an error when trying to encode nil values. All instances
of OpenSSL::ASN1::Primitive now raise TypeError when calling to_der on an
instance whose value is nil. All instances of OpenSSL::ASN1::Constructive
raise No...