ruby-saml-mod 0.3.0 → 0.3.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: 93bfa6aae98096c0f3de5695ba3fac7c0a743fd8
4
- data.tar.gz: ed79e42522a0a88ea1baebbff261b6234fe7f95e
3
+ metadata.gz: 57aab98162608000a1af2047f027e2ea7bbcce4e
4
+ data.tar.gz: e599ce0458d14e8b2c4138eafb16a54ad74afa79
5
5
  SHA512:
6
- metadata.gz: 8db250afccb39f56512ca96846e69c2745c9ee1bc18b9bf6f7f8113fc16a39d87ac47d391fc466e37dd5947ca1773af0c73fd415cce824998803c94269ecac82
7
- data.tar.gz: dfb5339a232fd2ef26a9a5bb384307fb89271b8a0ebf1d03e8176c62eeaf6d99e2440d41d7dc5ecab3ff9a6e47a123d5c688b270a520324bef49827bbf703ee6
6
+ metadata.gz: ab14a2681d552ff9b4efc08814d6bf7ee34f21b679df51262e6522592b15356b9284c45ec5c907d61d1eee0c254f436df450fa00be9878cba175db883209d894
7
+ data.tar.gz: 76e798ee082288f541db43db187170e6b8a912c42a5e2d78632e97ce0bc2344372e52a2b0c65fc2d185f0fe9a4443ac91d292e1f69751433996f527801a22a96
data/lib/xml_sec.rb CHANGED
@@ -359,7 +359,7 @@ module XMLSecurity
359
359
  fingerprint = Digest::SHA1.hexdigest(cert.to_der)
360
360
  expected_fingerprints = Array(idp_cert_fingerprint).map { |f| f.gsub(":", "").downcase }
361
361
  unless expected_fingerprints.include?(fingerprint)
362
- @validation_error = "Invalid fingerprint (expected #{expected_fingerprint}, got #{fingerprint})"
362
+ @validation_error = "Invalid fingerprint (expected one of [#{expected_fingerprints.join(', ')}], got #{fingerprint})"
363
363
  return false
364
364
  end
365
365
  end
@@ -28,6 +28,13 @@ describe Onelogin::Saml::Response do
28
28
  @response.should be_is_valid
29
29
  end
30
30
 
31
+ it "gives a decent error for a fingerprint problem" do
32
+ @settings.idp_cert_fingerprint = ['somethingold']
33
+ @response = Onelogin::Saml::Response.new(@xmlb64, @settings)
34
+ @response.should_not be_is_valid
35
+ @response.validation_error.should match(/somethingold/)
36
+ end
37
+
31
38
  it "should not be able to decrypt without the proper key" do
32
39
  @settings.xmlsec_privatekey = fixture_path("wrong-key.pem")
33
40
  XMLSecurity.mute do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-saml-mod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OneLogin LLC
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2016-04-28 00:00:00.000000000 Z
17
+ date: 2016-06-14 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: nokogiri
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.5.1
135
+ rubygems_version: 2.6.4
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Ruby library for SAML service providers
@@ -159,4 +159,3 @@ test_files:
159
159
  - spec/response_spec.rb
160
160
  - spec/spec_helper.rb
161
161
  - spec/support/test_server.rb
162
- has_rdoc: