libsaml 2.20.2 → 2.20.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saml/config.rb +23 -5
- data/lib/saml/util.rb +4 -6
- 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: d3f4ae4023005cf57f6570cddf132b20294ec6ff
|
4
|
+
data.tar.gz: ff7959e530c2db13bd031550eb5e531f41281499
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e3582842cd2a36beb40d06875f7731ef100e97313876ae68a29af840bb61b3ca79b9f309f1a84e5585d904e9bcdbfbaa1ff40a9638e14f253ffdca164237563
|
7
|
+
data.tar.gz: 6669b85141226fa1e25b50894833d39c2267cc8bd44739fd7dedb6644d59ce1d6fc746dc3d212251118d0cb82fcb46481f7102dca1a1c6f8d834db371a44c65a
|
data/lib/saml/config.rb
CHANGED
@@ -6,11 +6,11 @@ module Saml
|
|
6
6
|
mattr_accessor :max_issue_instant_offset
|
7
7
|
@@max_issue_instant_offset = 2
|
8
8
|
|
9
|
-
mattr_accessor :
|
10
|
-
@@
|
9
|
+
mattr_accessor :ssl_private_key
|
10
|
+
@@ssl_private_key = nil
|
11
11
|
|
12
|
-
mattr_accessor :
|
13
|
-
@@
|
12
|
+
mattr_accessor :ssl_certificate
|
13
|
+
@@ssl_certificate = nil
|
14
14
|
|
15
15
|
mattr_accessor :http_ca_file
|
16
16
|
@@http_ca_file = nil
|
@@ -27,7 +27,25 @@ module Saml
|
|
27
27
|
registered_stores[name] = store
|
28
28
|
self.default_store = name if options[:default]
|
29
29
|
end
|
30
|
-
|
31
30
|
module_function :register_store
|
31
|
+
|
32
|
+
def ssl_private_key_file=(private_key_file)
|
33
|
+
if private_key_file.present?
|
34
|
+
self.ssl_private_key = OpenSSL::PKey::RSA.new File.read(private_key_file)
|
35
|
+
else
|
36
|
+
self.ssl_private_key = nil
|
37
|
+
end
|
38
|
+
end
|
39
|
+
module_function :ssl_private_key_file=
|
40
|
+
|
41
|
+
def ssl_certificate_file=(certificate_file)
|
42
|
+
if certificate_file.present?
|
43
|
+
self.ssl_certificate = OpenSSL::X509::Certificate.new File.read(certificate_file)
|
44
|
+
else
|
45
|
+
self.ssl_certificate = nil
|
46
|
+
end
|
47
|
+
end
|
48
|
+
module_function :ssl_certificate_file=
|
49
|
+
|
32
50
|
end
|
33
51
|
end
|
data/lib/saml/util.rb
CHANGED
@@ -154,12 +154,10 @@ module Saml
|
|
154
154
|
end
|
155
155
|
|
156
156
|
def add_ssl_certificate_and_key(http)
|
157
|
-
return http unless Saml::Config.
|
158
|
-
return http unless Saml::Config.
|
159
|
-
|
160
|
-
|
161
|
-
http.cert = OpenSSL::X509::Certificate.new(cert)
|
162
|
-
http.key = OpenSSL::PKey::RSA.new(key)
|
157
|
+
return http unless Saml::Config.ssl_certificate.present?
|
158
|
+
return http unless Saml::Config.ssl_private_key.present?
|
159
|
+
http.key = Saml::Config.ssl_private_key
|
160
|
+
http.cert = Saml::Config.ssl_certificate
|
163
161
|
http
|
164
162
|
end
|
165
163
|
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.3
|
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-02-
|
11
|
+
date: 2016-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|