libsaml 2.20.5 → 2.20.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saml/bindings/http_redirect.rb +1 -1
- data/lib/saml/complex_types/role_descriptor_type.rb +11 -1
- data/lib/saml/config.rb +3 -0
- data/lib/saml/elements/key_info.rb +1 -1
- data/lib/saml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7a5bc6d4b39b33a25b99f8de2b19c909fc900a6
|
4
|
+
data.tar.gz: 9b49196c7e2f24300c8e5674d242c7f5b39feac4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b892f8c29b90e96ec3b5c867c412ab86618fe070fef6a747bb40d212fd8516fb0f04b0d8df64cb75bec2aa809adca251574c7a8220506219e05790c88a8eecad
|
7
|
+
data.tar.gz: ce074d548cefdee9d0074e9cf3247ee297ebabe733a649fd72ffe64c0b511c7ed00bc3c3d4bd37bbde3716b11b5896b616dc5a13624b59efa1f234f1a02179a7
|
@@ -75,7 +75,7 @@ module Saml
|
|
75
75
|
end
|
76
76
|
|
77
77
|
relay_state = params["RelayState"] ? "&RelayState=#{params['RelayState']}" : ""
|
78
|
-
"#{param_key}=#{params[
|
78
|
+
"#{param_key}=#{params[param_key]}#{relay_state}&SigAlg=#{params['SigAlg']}"
|
79
79
|
end
|
80
80
|
|
81
81
|
def encoded_message
|
@@ -27,9 +27,11 @@ module Saml
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def find_key_descriptor(key_name, use)
|
30
|
+
return key_descriptors.first unless key_name_or_use_specified?
|
31
|
+
|
30
32
|
key_descriptors_by_use = find_key_descriptors_by_use(use)
|
31
33
|
|
32
|
-
if key_name.present?
|
34
|
+
if key_name.present? && key_name_specified?
|
33
35
|
key_descriptors_by_use.find { |key| key.key_info.key_name == key_name }
|
34
36
|
else
|
35
37
|
key_descriptors_by_use.first
|
@@ -41,6 +43,14 @@ module Saml
|
|
41
43
|
def find_key_descriptors_by_use(use)
|
42
44
|
key_descriptors.select { |key| key.use == use || key.use.blank? }
|
43
45
|
end
|
46
|
+
|
47
|
+
def key_name_or_use_specified?
|
48
|
+
key_descriptors.any? { |key| key.use.present? || key.key_info.key_name.present? }
|
49
|
+
end
|
50
|
+
|
51
|
+
def key_name_specified?
|
52
|
+
key_descriptors.any? { |key| key.key_info.key_name.present? }
|
53
|
+
end
|
44
54
|
end
|
45
55
|
end
|
46
56
|
end
|
data/lib/saml/config.rb
CHANGED
@@ -19,7 +19,7 @@ module Saml
|
|
19
19
|
if cert
|
20
20
|
self.x509Data = X509Data.new(cert)
|
21
21
|
end
|
22
|
-
if self.x509Data && self.x509Data.x509certificate
|
22
|
+
if self.x509Data && self.x509Data.x509certificate && Saml::Config.generate_key_name
|
23
23
|
self.key_name = Digest::SHA1.hexdigest(self.x509Data.x509certificate.to_der)
|
24
24
|
end
|
25
25
|
end
|
data/lib/saml/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libsaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.20.
|
4
|
+
version: 2.20.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benoist Claassen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|