168件ヒット
[101-168件を表示]
(0.090秒)
別のキーワード
種類
- インスタンスメソッド (120)
- クラス (24)
- 特異メソッド (24)
ライブラリ
- openssl (60)
-
rexml
/ document (108)
クラス
-
OpenSSL
:: X509 :: Request (36) -
REXML
:: Attribute (60) -
REXML
:: Element (48)
キーワード
- Attribute (12)
- Request (12)
-
add
_ attributes (12) - attributes (12)
- attributes= (12)
-
delete
_ attribute (12) - namespace (12)
- new (24)
- prefix (12)
-
to
_ string (12)
検索結果
先頭5件
-
REXML
:: Attribute . new(attribute _ to _ clone , parent = nil) -> REXML :: Attribute (3106.0) -
新たな属性オブジェクトを生成します。
...新たな属性オブジェクトを生成します。
2種類の初期化が可能です。
REXML::Attribute オブジェクトを渡した場合は、
属性名とその値がそれから複製されます。
parent で新たに作られる属性オブジェクトが属する
要素が指定で......省略した場合は nil が設定されます。
通常はこのメソッドは直接は使わず、REXML::Element#add_attribute などを
使うでしょう。
@param attribute_to_clone 複製元の REXML::Attribute オブジェクト
@param attribute 属性名
@param value 属性の値
@param......parent 生成される属性が所属する要素(REXML::Element)... -
REXML
:: Attribute # prefix -> String (3012.0) -
属性の名前空間を返します。
...ます。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "elns"
a = REXML::Attribute.new... -
OpenSSL
:: X509 :: Attribute (3006.0) -
X.509 証明書署名要求の attribute を表すクラスです。
...X.509 証明書署名要求の attribute を表すクラスです。
OpenSSL::X509::Request#attributes で取り出すことや、
OpenSSL::X509::Request#add_attribute で追加することができます。... -
OpenSSL
:: X509 :: Request (3006.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',......, 'Example Name')
csr.subject = name
# バージョンを 0 (v1.7) に
csr.version = 0
# 公開鍵を CSR に設定
csr.public_key = rsa.public_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.sign(rsa, "sha1")
# PEM 形式で標準出力に出力
puts csr.to_pem... -
OpenSSL
:: X509 :: Request # attributes=(attrs) (3006.0) -
CSR の attribute をクリアして新しい attribute を設定します。
...CSR の attribute をクリアして新しい attribute を設定します。
@param attrs 新たに設定する attribute(OpenSSL::X509::Attribute の
インスタンス)の配列
@see OpenSSL::X509::Request#attribute
OpenSSL::X509::Request#add_attribute... -
REXML
:: Attribute # to _ string -> String (3006.0) -
"name='value'" という形式の文字列を返します。
..."name='value'" という形式の文字列を返します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").to_string # => "ns:r='rval'"
//}...