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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87837a0136528b1b5aa4dfb2ed4acb70846ae2d8
4
- data.tar.gz: 16a38221b628e95e2e2899046f68a9f0c327b2f0
3
+ metadata.gz: d3f4ae4023005cf57f6570cddf132b20294ec6ff
4
+ data.tar.gz: ff7959e530c2db13bd031550eb5e531f41281499
5
5
  SHA512:
6
- metadata.gz: c5d64f0871f02694347288e850c80e0eca60b2c1ff9b49ae92fef3107b11771433d7ada24bd7fa517b14d4d7b3946ad7786294d578401e2f92c69cce40293228
7
- data.tar.gz: 8289e202bbca07d1a9fff86117c014b021f7c659a6efeb11bcb1bb6206e1120110c95f42ea0bdd12b8d9411bc18acf75b282ec60058e5181a6cbe34c8b6d1bc0
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 :ssl_private_key_file
10
- @@ssl_private_key_file = nil
9
+ mattr_accessor :ssl_private_key
10
+ @@ssl_private_key = nil
11
11
 
12
- mattr_accessor :ssl_certificate_file
13
- @@ssl_certificate_file = nil
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.ssl_certificate_file.present?
158
- return http unless Saml::Config.ssl_private_key_file.present?
159
- cert = File.read(Saml::Config.ssl_certificate_file)
160
- key = File.read(Saml::Config.ssl_private_key_file)
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
@@ -1,3 +1,3 @@
1
1
  module Saml
2
- VERSION = "2.20.2"
2
+ VERSION = '2.20.3'
3
3
  end
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.2
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-16 00:00:00.000000000 Z
11
+ date: 2016-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport