libsaml 3.9.1 → 3.9.2
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 +6 -2
- data/lib/saml/util.rb +6 -1
- 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: 80a144ab0df42eeb447e74d6df3f3a19a7d89e72cf5527277403b229eb87216c
|
4
|
+
data.tar.gz: cd41e41d4f0492e98c52ea9c6865e958a0896c0522f987b58175c69e2d23eaac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 258f442a035b8e06cb9896ed2faf0c5e88d4d58c63ddfcbcd19b14b937fed2de1482aa89bd92bf3b8bcff20f32e5c65b0f92355eefcb1abe0944f2c14a470b45
|
7
|
+
data.tar.gz: faa732f728819578d2e75a73129148da7e74eefca3d5ef7a033b7926d2266c417f9c52666dae8c0eef5f3c6fa06032b6da2bdf7eb5118ba4fb9758d127d8f626
|
data/lib/saml/response.rb
CHANGED
@@ -28,10 +28,14 @@ module Saml
|
|
28
28
|
!success? && status.status_code.unknown_principal?
|
29
29
|
end
|
30
30
|
|
31
|
-
def encrypt_assertions(
|
31
|
+
def encrypt_assertions(key_descriptor_or_certificate, include_certificate: false, include_key_retrieval_method: false)
|
32
32
|
@encrypted_assertions = []
|
33
33
|
assertions.each do |assertion|
|
34
|
-
@encrypted_assertions << Saml::Util.encrypt_assertion(
|
34
|
+
@encrypted_assertions << Saml::Util.encrypt_assertion(
|
35
|
+
assertion, key_descriptor_or_certificate,
|
36
|
+
include_certificate: include_certificate,
|
37
|
+
include_key_retrieval_method: include_key_retrieval_method
|
38
|
+
)
|
35
39
|
end
|
36
40
|
assertions.clear
|
37
41
|
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, include_certificate: false)
|
63
|
+
def encrypt_assertion(assertion, key_descriptor_or_certificate, include_certificate: false, include_key_retrieval_method: false)
|
64
64
|
case key_descriptor_or_certificate
|
65
65
|
when OpenSSL::X509::Certificate
|
66
66
|
certificate = key_descriptor_or_certificate
|
@@ -87,6 +87,11 @@ module Saml
|
|
87
87
|
end
|
88
88
|
encrypted_key.encrypt(certificate.public_key)
|
89
89
|
|
90
|
+
if include_key_retrieval_method
|
91
|
+
encrypted_key.id = '_' + SecureRandom.uuid
|
92
|
+
encrypted_data.set_key_retrieval_method (Xmlenc::Builder::RetrievalMethod.new(uri: "##{encrypted_key.id}"))
|
93
|
+
end
|
94
|
+
|
90
95
|
Saml::Elements::EncryptedAssertion.new(encrypted_data: encrypted_data, encrypted_keys: encrypted_key)
|
91
96
|
end
|
92
97
|
|
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.9.
|
4
|
+
version: 3.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benoist Claassen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|