Class: Xml::Kit::KeyInfo
- Inherits:
-
Object
show all
- Includes:
- Templatable
- Defined in:
- lib/xml/kit/key_info.rb,
lib/xml/kit/key_info/key_value.rb,
lib/xml/kit/key_info/rsa_key_value.rb,
lib/xml/kit/key_info/retrieval_method.rb
Overview
Defined Under Namespace
Classes: KeyValue, RSAKeyValue, RetrievalMethod
Instance Attribute Summary collapse
Attributes included from Templatable
#embed_signature, #encrypt, #encryption_certificate, #signing_key_pair
Instance Method Summary
collapse
#asymmetric_cipher, #encrypt_data_for, #encrypt_key_for, #encrypt_with, #encryption_for, #render, #sign_with, #signature_for, #symmetric_cipher, #to_xml
Constructor Details
#initialize(x509: nil) {|_self| ... } ⇒ KeyInfo
Returns a new instance of KeyInfo.
19
20
21
22
|
# File 'lib/xml/kit/key_info.rb', line 19
def initialize(x509: nil)
@x509_data = x509
yield self if block_given?
end
|
Instance Attribute Details
#encrypted_key ⇒ Object
17
18
19
|
# File 'lib/xml/kit/key_info.rb', line 17
def encrypted_key
@encrypted_key
end
|
#key_name ⇒ Object
15
16
17
|
# File 'lib/xml/kit/key_info.rb', line 15
def key_name
@key_name
end
|
#x509_data ⇒ Object
16
17
18
|
# File 'lib/xml/kit/key_info.rb', line 16
def x509_data
@x509_data
end
|
Instance Method Details
#key_value ⇒ Object
24
25
26
|
# File 'lib/xml/kit/key_info.rb', line 24
def key_value
@key_value ||= KeyValue.new
end
|
#retrieval_method ⇒ Object
28
29
30
|
# File 'lib/xml/kit/key_info.rb', line 28
def retrieval_method
@retrieval_method ||= RetrievalMethod.new
end
|
#subject_key_identifier ⇒ Object
32
33
34
35
36
37
|
# File 'lib/xml/kit/key_info.rb', line 32
def subject_key_identifier
ski = x509_data.extensions.find { |x| x.oid == 'subjectKeyIdentifier' }
return if ski.nil?
Base64.strict_encode64(ski.value)
end
|