saml-kit 1.0.26 → 1.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saml/kit/configuration.rb +12 -1
- data/lib/saml/kit/null_assertion.rb +2 -2
- data/lib/saml/kit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28c26014b0ce54fbd8aeb84d2dd6ee4b3d1355459278fc57afc1a3d98b4bffb0
|
4
|
+
data.tar.gz: d84ea523535edd6d033eecbbe4e7b865d7d3d69b7080c400b3aba6c913800c93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f2510eab2be6b8e4e16dd6fc3adeed53094a88b6f6cfa992780138fc7e53e25f10cb5872702da0a93f6dc5fb3b0b0b998198b9dafc399055d794d15b98e2fc9
|
7
|
+
data.tar.gz: 1a520702f958b5ba2af029bad9b49d4766acdef5291093c81083e028999db2d0897c14832016ecff51c00cd3a25df5f5e012184e01b2bf9b3e88472dfdddc68f
|
@@ -90,7 +90,7 @@ module Saml
|
|
90
90
|
# @param use [Symbol] the type of key pair to return
|
91
91
|
# `nil`, `:signing` or `:encryption`
|
92
92
|
def key_pairs(use: nil)
|
93
|
-
use.present? ?
|
93
|
+
use.present? ? active_key_pairs.find_all { |xxx| xxx.for?(use) } : active_key_pairs
|
94
94
|
end
|
95
95
|
|
96
96
|
# Return each certificate for a specific use.
|
@@ -122,6 +122,17 @@ module Saml
|
|
122
122
|
error_message = 'Use must be either :signing or :encryption'
|
123
123
|
raise ArgumentError, error_message
|
124
124
|
end
|
125
|
+
|
126
|
+
def active_key_pairs
|
127
|
+
@key_pairs.find_all { |x| active?(x) }.sort_by { |x| x.certificate.not_after }.reverse
|
128
|
+
end
|
129
|
+
|
130
|
+
def active?(key_pair)
|
131
|
+
key_pair.certificate.active?
|
132
|
+
rescue OpenSSL::X509::CertificateError => error
|
133
|
+
Saml::Kit.logger.error(error)
|
134
|
+
false
|
135
|
+
end
|
125
136
|
end
|
126
137
|
end
|
127
138
|
end
|
data/lib/saml/kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saml-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mo khan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|