eet_signer 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e069ff06ff3147ba7f9520b38827bf504a40421f
4
- data.tar.gz: 5f6e4549a1253d3c2424ca42223cb36554595a9e
3
+ metadata.gz: 81304f4cda8289736ee1d706bb6427cbb3022cf2
4
+ data.tar.gz: 436fba9de4cc4018c39c2920933d86105190a450
5
5
  SHA512:
6
- metadata.gz: cee8321399e31116b5bea49e1cde1466c30e983b3dbee449dd6cf63667857f16151a5fefd668c0eb503cdee4e27d436b598766391fd49a1d59614154f8704a36
7
- data.tar.gz: 50f2844ea8a306237e5d8ece4023259fe7fe3db4a362c47e48c613a57ac37965f5c9e3b8a12403739f4880c251f257e7ef570488d96049b62cbf9da88059ef14
6
+ metadata.gz: bf7355737c474a039d4dc6190c7ba153c72fdd2a8e56bce1b6f76fc8dc2aa6f300b266818dccc272bac330d7cc439f1321e934c4baaaca00b304649996098763
7
+ data.tar.gz: d20372d76222cea9c6e9d6f27f357a1af7a8843ccf5fd18cec5eda4a6c53395700c2a84655f7034280c65f9082c10705f26996b02d5547c122e6812c70ff4966
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Signer
2
2
 
3
- This is a fork of original [Signer](https://badge.fury.io/rb/signer.svg) gem with applied patch for explicit signature namespaces.
3
+ This is a fork of original [Signer](https://badge.fury.io/rb/signer.svg) gem with applied patch for explicit signature namespaces and some defaults changes.
4
4
 
5
5
  ## Why?
6
6
 
@@ -14,7 +14,7 @@ gem install eet_signer
14
14
 
15
15
  ## Usage
16
16
 
17
- For usage please see original gem's documentation. This gem should be rebased with the original gem at regularly.
17
+ For usage please see original gem's documentation. This gem should be rebased with the original gem regularly.
18
18
 
19
19
  ### Explicit signature namespaces
20
20
 
@@ -85,6 +85,7 @@ class Signer
85
85
  @signature_node = security_node.at_xpath('ds:Signature', ds: DS_NAMESPACE)
86
86
  unless @signature_node
87
87
  @signature_node = Nokogiri::XML::Node.new('Signature', document)
88
+ @signature_node['Id'] = "SIG-#{security_token_id.split('-').last}"
88
89
  set_namespace_for_node(@signature_node, DS_NAMESPACE, ds_namespace_prefix)
89
90
  security_node.add_child(@signature_node)
90
91
  end
@@ -249,7 +250,7 @@ class Signer
249
250
  transforms_node.add_child(transform_node)
250
251
 
251
252
  digest_method_node = Nokogiri::XML::Node.new('DigestMethod', document)
252
- digest_method_node['Algorithm'] = @digester.digest_id
253
+ digest_method_node['Algorithm'] = 'http://www.w3.org/2001/04/xmlenc#sha256'
253
254
  reference_node.add_child(digest_method_node)
254
255
  set_namespace_for_node(digest_method_node, DS_NAMESPACE, ds_namespace_prefix)
255
256
 
@@ -303,8 +304,8 @@ class Signer
303
304
 
304
305
  # Reset digest algorithm for signature creation and signature algorithm identifier
305
306
  def set_default_signature_method!
306
- self.signature_digest_algorithm = :sha1
307
- self.signature_algorithm_id = 'http://www.w3.org/2000/09/xmldsig#rsa-sha1'
307
+ self.signature_digest_algorithm = :sha256
308
+ self.signature_algorithm_id = 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256'
308
309
  end
309
310
 
310
311
  ##
@@ -1,3 +1,3 @@
1
1
  class Signer
2
- VERSION = '1.5.0'
2
+ VERSION = '1.6.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eet_signer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgars Beigarts