Class: SignedXml::Signature
- Inherits:
-
Object
- Object
- SignedXml::Signature
- Includes:
- DigestMethodResolution, Fingerprinting, Logging
- Defined in:
- lib/signed_xml/signature.rb
Instance Attribute Summary collapse
-
#certificate_store ⇒ Object
writeonly
Sets the attribute certificate_store.
-
#here ⇒ Object
Returns the value of attribute here.
-
#public_key ⇒ Object
writeonly
Sets the attribute public_key.
Instance Method Summary collapse
-
#initialize(here) ⇒ Signature
constructor
A new instance of Signature.
- #is_verified? ⇒ Boolean
- #sign(private_key, certificate = nil) ⇒ Object
Methods included from Logging
Methods included from Fingerprinting
Methods included from DigestMethodResolution
Constructor Details
#initialize(here) ⇒ Signature
Returns a new instance of Signature.
13 14 15 |
# File 'lib/signed_xml/signature.rb', line 13 def initialize(here) @here = here end |
Instance Attribute Details
#certificate_store=(value) ⇒ Object
Sets the attribute certificate_store
11 12 13 |
# File 'lib/signed_xml/signature.rb', line 11 def certificate_store=(value) @certificate_store = value end |
#here ⇒ Object
Returns the value of attribute here.
9 10 11 |
# File 'lib/signed_xml/signature.rb', line 9 def here @here end |
#public_key=(value) ⇒ Object
Sets the attribute public_key
10 11 12 |
# File 'lib/signed_xml/signature.rb', line 10 def public_key=(value) @public_key = value end |
Instance Method Details
#is_verified? ⇒ Boolean
17 18 19 |
# File 'lib/signed_xml/signature.rb', line 17 def is_verified? is_signed_info_verified? && are_reference_digests_verified? end |
#sign(private_key, certificate = nil) ⇒ Object
21 22 23 24 25 |
# File 'lib/signed_xml/signature.rb', line 21 def sign(private_key, certificate = nil) compute_digests_for_references sign_signed_info(private_key) set_certificate_data(certificate) end |