xmldsig 0.5.1 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66b03c3cd566858ca1c6a1c421de06622caeee89
4
- data.tar.gz: e2089e041db7143409d8eba14f4ca3bcbd321e64
3
+ metadata.gz: 24b0b911fc3ff8735e115e84958d7ed67cb30201
4
+ data.tar.gz: 4216c7d6b5a608c9e0e6f60af86a2b3abaaedb0d
5
5
  SHA512:
6
- metadata.gz: 1b9c325f69ed37f8fb5bc6e27ce19abe152d578d27d8d7f35d8b04a8399c7719ce4a4a0908778671cfb446d8fdfd5b31cf06b48a2dd72820df123295ec6fafeb
7
- data.tar.gz: a51acd4b6f20f70226700ad11fb35e4c2734f2856c8f34e0d78c20a8cc2ac97cf04f3b174b39ae0b35020dba89585d55c204710a5827809747641adcdbcfe7c8
6
+ metadata.gz: 526a3a043f0040e45dbcca923a1b7311fa760e435ef997200bdbbb1be91dd09a83614f4ee97c7dd3a5ff27cbeae438c10b3e86d6a898e8fafd17a1103abf05ae
7
+ data.tar.gz: f23638284559286c0665a76f9104ad909b5e3401caf019f4695843348fa3a88bb8de67ebf2d4b575b74b88f2675877e25628cc202f2c151e79385858ce9d208e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ v0.6.1
4
+ - Using strict base64 encoding
5
+
3
6
  v0.4.1 22-03-2015
4
7
  - Added support for SHA256, SHA384 and SHA512
5
8
 
data/README.md CHANGED
@@ -58,12 +58,12 @@ end
58
58
  # Validation
59
59
 
60
60
  signed_document = Xmldsig::SignedDocument.new(signed_xml)
61
- signed_document.validate(certificate)
61
+ document_validates = signed_document.validate(certificate)
62
62
 
63
63
  # With block
64
64
  signed_document = Xmldsig::SignedDocument.new(signed_xml)
65
65
  signed_document.validate do |signature_value, data|
66
- certificate.public_key.verify(OpenSSL::Digest::SHA256.new, signature_value, data)
66
+ document_validates = certificate.public_key.verify(OpenSSL::Digest::SHA256.new, signature_value, data)
67
67
  end
68
68
 
69
69
  # Custom ID attribute
@@ -69,7 +69,7 @@ module Xmldsig
69
69
 
70
70
  def digest_value=(digest_value)
71
71
  reference.at_xpath("descendant::ds:DigestValue", NAMESPACES).content =
72
- Base64.encode64(digest_value).chomp
72
+ Base64.strict_encode64(digest_value).chomp
73
73
  end
74
74
 
75
75
  def transforms
@@ -85,7 +85,7 @@ module Xmldsig
85
85
 
86
86
  def signature_value=(signature_value)
87
87
  signature.at_xpath("descendant::ds:SignatureValue", NAMESPACES).content =
88
- Base64.encode64(signature_value).chomp
88
+ Base64.strict_encode64(signature_value).chomp
89
89
  end
90
90
 
91
91
  def validate_schema
@@ -1,3 +1,3 @@
1
1
  module Xmldsig
2
- VERSION = '0.5.1'
2
+ VERSION = '0.6.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmldsig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - benoist
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-21 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri