libsaml 3.5.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saml/response.rb +2 -2
- data/lib/saml/util.rb +6 -2
- data/lib/saml/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: 9eea4c36aa9fc6f404ff5e6283c2ef39c1cb0e328652edc5e5fda2ceb7b21416
|
4
|
+
data.tar.gz: d76324210f3fe2863f82f89ac7b7317bc295798ec10982b903f2e3b2700dd62f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40a5e18247a43f3e215ce6045d51feeb2774a86e649b4702a64533555b4c5c98b83dad3927b3238929d141f0c49a1078903a278b2ccd76cdf6c29d6188f71839
|
7
|
+
data.tar.gz: 0eda4d5265000e0da3fc7d2650b69064cda9de9914a287cecb2974e077f42d4c76d05e30e7025a56f6ba7173128c63a652b185f0253424715e6e62227f5bdb45
|
data/lib/saml/response.rb
CHANGED
@@ -28,10 +28,10 @@ module Saml
|
|
28
28
|
!success? && status.status_code.unknown_principal?
|
29
29
|
end
|
30
30
|
|
31
|
-
def encrypt_assertions(certificate)
|
31
|
+
def encrypt_assertions(certificate, include_certificate: false)
|
32
32
|
@encrypted_assertions = []
|
33
33
|
assertions.each do |assertion|
|
34
|
-
@encrypted_assertions << Saml::Util.encrypt_assertion(assertion, certificate)
|
34
|
+
@encrypted_assertions << Saml::Util.encrypt_assertion(assertion, certificate, include_certificate: include_certificate)
|
35
35
|
end
|
36
36
|
assertions.clear
|
37
37
|
end
|
data/lib/saml/util.rb
CHANGED
@@ -60,7 +60,7 @@ module Saml
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
def encrypt_assertion(assertion, key_descriptor_or_certificate)
|
63
|
+
def encrypt_assertion(assertion, key_descriptor_or_certificate, include_certificate: false)
|
64
64
|
case key_descriptor_or_certificate
|
65
65
|
when OpenSSL::X509::Certificate
|
66
66
|
certificate = key_descriptor_or_certificate
|
@@ -80,7 +80,11 @@ module Saml
|
|
80
80
|
encrypted_key = encrypted_data.encrypt(assertion.to_s)
|
81
81
|
encrypted_key.set_encryption_method(algorithm: 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p',
|
82
82
|
digest_method_algorithm: 'http://www.w3.org/2000/09/xmldsig#sha1')
|
83
|
-
encrypted_key.
|
83
|
+
encrypted_key.key_info = if include_certificate || key_name
|
84
|
+
key_info = Saml::Elements::KeyInfo.new(include_certificate ? certificate.to_pem : nil)
|
85
|
+
key_info.key_name = key_name
|
86
|
+
key_info
|
87
|
+
end
|
84
88
|
encrypted_key.encrypt(certificate.public_key)
|
85
89
|
|
86
90
|
Saml::Elements::EncryptedAssertion.new(encrypted_data: encrypted_data, encrypted_keys: encrypted_key)
|
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: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benoist Claassen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|