xmldsig 0.2.4 → 0.2.5

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,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YzhmMTQ0MGFkNzgzOGY5ZDg0M2IwYWQ5ZTUxYjAyMjk2MDU5MzJmYw==
5
- data.tar.gz: !binary |-
6
- MDBjYTQzMTM5OTExYzYwYmVhZjY4MTUwODk0OTVlMmU2YzQ4M2U0Zg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- M2MzOTVlMWRhNDhhYTA1ZDA5MjY0YTcxZjVlYjRkZGQ1ZjQ3NWNhNzIxZTBi
10
- NGUzMmEzZGViNGYxNTViNmNkMjg4ZjJlNjNkOTM3N2JmNTM0MmZjNjNkMDY1
11
- OTNhNTJiZWQ1YjVlNjYyMjBiNzhkYTkxYmMyMGQ5YTdlODdiNWY=
12
- data.tar.gz: !binary |-
13
- ZTlhMDUyMWNhNDRjMTZmNDVkMmZmZTg2YzAxYjBkMGI4MjMxMzgwMDhiZjMx
14
- ZGZhZjgyZGY1Y2MxYzJlZTk1NjZmYjIzOWM2Yjc0ODBhMWFlNzU0NmFkYjU5
15
- Mzg5Y2I4MDM3YzNkNGE0YWFiOGFiZjIwNmU1MWUwNTkzNDQzMDQ=
2
+ SHA1:
3
+ metadata.gz: 98aac2a76000eb71d7ffa6c40da165f06be77e8c
4
+ data.tar.gz: 0d27d369a535d97ba1df2f9569046af06ca7e794
5
+ SHA512:
6
+ metadata.gz: 5eb81ff2508010a34823abf06e2ab49ee79e8dc7b190a2bc4a8a96ab9a58ba8120a5442fb304ee46e842cd8c9d35e2e1f5e6405db231df9c1a997d317e96c305
7
+ data.tar.gz: 23763f54372e453c23b29f75037389ab318874469a0e14296cedcaa2b9a946dea3c299156acd2185171a98ee700cf3633827ed9039769b707579c53f0b5ee19a
data/README.md CHANGED
@@ -67,6 +67,10 @@ signed_document.validate do |signature_value, data|
67
67
  end
68
68
  ```
69
69
 
70
+ ## Known issues
71
+
72
+ 1. Windows in app purchase verification requires extra whitespace removal: https://github.com/benoist/xmldsig/issues/13
73
+
70
74
  ## Contributing
71
75
 
72
76
  1. Fork it
@@ -3,7 +3,7 @@ module Xmldsig
3
3
  attr_accessor :document
4
4
 
5
5
  def initialize(document, options = {})
6
- @document = Nokogiri::XML::Document.parse(document)
6
+ @document = Nokogiri::XML(document, nil, nil, Nokogiri::XML::ParseOptions::STRICT)
7
7
  end
8
8
 
9
9
  def validate(certificate = nil, &block)
@@ -1,3 +1,3 @@
1
1
  module Xmldsig
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
@@ -14,6 +14,18 @@ describe Xmldsig::SignedDocument do
14
14
  document = described_class.new(signed_xml)
15
15
  document.document.should be_a(Nokogiri::XML::Document)
16
16
  end
17
+
18
+ it "raises on badly formed XML" do
19
+ badly_formed = <<-EOXML
20
+ <root>
21
+ <open>foo
22
+ <closed>bar</closed>
23
+ </root>
24
+ EOXML
25
+ expect {
26
+ described_class.new(badly_formed)
27
+ }.to raise_error
28
+ end
17
29
  end
18
30
 
19
31
  describe "#signatures" do
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmldsig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - benoist
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-19 00:00:00.000000000 Z
11
+ date: 2014-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description: This gem is a (partial) implementation of the XMLDsig specification
@@ -31,9 +31,9 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - .gitignore
35
- - .rspec
36
- - .travis.yml
34
+ - ".gitignore"
35
+ - ".rspec"
36
+ - ".travis.yml"
37
37
  - CHANGELOG.md
38
38
  - Gemfile
39
39
  - Guardfile
@@ -86,17 +86,17 @@ require_paths:
86
86
  - lib
87
87
  required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ! '>='
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.0.6
99
+ rubygems_version: 2.2.1
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: This gem is a (partial) implementation of the XMLDsig specification (http://www.w3.org/TR/xmldsig-core)