omniauth-suomifi 0.4.0 → 0.4.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f13147094a51b1011e54a3b72e31352b17ce876fad5598156b5b1f6ada977b2
|
4
|
+
data.tar.gz: 3ab984607001ce46573290197e49390f7e9b27bc098a7c1f48a4f24717609065
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58af0b760126edc00ee2f114f90fd8c632271f1a60bc80938c70e61dbfb536c7e7032da6cd3cb91515bb239d68872c44ec3784c1498930f121e2bd139e63ff5d
|
7
|
+
data.tar.gz: a6367ec02b859f4e18e84bc9e739d3b44314a299b00730092c52c65a657b44b57b7ac80149cd2fd067023a200f1e25dc537647bd33e155b2bc4d5573fac7e39d
|
@@ -30,31 +30,35 @@ OneLogin::RubySaml::Utils.class_eval do
|
|
30
30
|
# @return [String] The deciphered text
|
31
31
|
def self.retrieve_plaintext(cipher_text, symmetric_key, algorithm)
|
32
32
|
case algorithm
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
33
|
+
when 'http://www.w3.org/2001/04/xmlenc#tripledes-cbc' then cipher = OpenSSL::Cipher.new('DES-EDE3-CBC').decrypt
|
34
|
+
when 'http://www.w3.org/2001/04/xmlenc#aes128-cbc' then cipher = OpenSSL::Cipher.new('AES-128-CBC').decrypt
|
35
|
+
when 'http://www.w3.org/2001/04/xmlenc#aes192-cbc' then cipher = OpenSSL::Cipher.new('AES-192-CBC').decrypt
|
36
|
+
when 'http://www.w3.org/2001/04/xmlenc#aes256-cbc' then cipher = OpenSSL::Cipher.new('AES-256-CBC').decrypt
|
37
|
+
when 'http://www.w3.org/2009/xmlenc11#aes128-gcm' then auth_cipher = OpenSSL::Cipher.new('AES-128-GCM').decrypt
|
38
|
+
when 'http://www.w3.org/2009/xmlenc11#aes192-gcm' then auth_cipher = OpenSSL::Cipher.new('AES-192-GCM').decrypt
|
39
|
+
when 'http://www.w3.org/2009/xmlenc11#aes256-gcm' then auth_cipher = OpenSSL::Cipher.new('AES-256-GCM').decrypt
|
40
|
+
when 'http://www.w3.org/2001/04/xmlenc#rsa-1_5' then rsa = symmetric_key
|
41
|
+
when 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p' then oaep = symmetric_key
|
42
42
|
end
|
43
43
|
|
44
44
|
if cipher
|
45
45
|
iv_len = cipher.iv_len
|
46
46
|
data = cipher_text[iv_len..-1]
|
47
|
-
cipher.padding
|
47
|
+
cipher.padding = 0
|
48
|
+
cipher.key = symmetric_key
|
49
|
+
cipher.iv = cipher_text[0..iv_len - 1]
|
48
50
|
assertion_plaintext = cipher.update(data)
|
49
51
|
assertion_plaintext << cipher.final
|
50
52
|
elsif auth_cipher
|
51
|
-
iv_len
|
52
|
-
|
53
|
+
iv_len = auth_cipher.iv_len
|
54
|
+
text_len = cipher_text.length
|
55
|
+
tag_len = 16
|
56
|
+
data = cipher_text[iv_len..text_len - 1 - tag_len]
|
53
57
|
auth_cipher.padding = 0
|
54
58
|
auth_cipher.key = symmetric_key
|
55
|
-
auth_cipher.iv = cipher_text[0..iv_len-1]
|
59
|
+
auth_cipher.iv = cipher_text[0..iv_len - 1]
|
56
60
|
auth_cipher.auth_data = ''
|
57
|
-
auth_cipher.auth_tag = cipher_text[text_len-tag_len..-1]
|
61
|
+
auth_cipher.auth_tag = cipher_text[text_len - tag_len..-1]
|
58
62
|
assertion_plaintext = auth_cipher.update(data)
|
59
63
|
assertion_plaintext << auth_cipher.final
|
60
64
|
elsif rsa
|
@@ -609,8 +609,8 @@ module OmniAuth
|
|
609
609
|
case options.mode
|
610
610
|
when :test
|
611
611
|
'https://testi.apro.tunnistus.fi/static/metadata/idp-metadata.xml'
|
612
|
-
else
|
613
|
-
'https://tunnistus.suomi.fi/static/metadata/idp-metadata-
|
612
|
+
else # :production
|
613
|
+
'https://tunnistus.suomi.fi/static/metadata/idp-metadata-tunnistautuminen.xml'
|
614
614
|
end
|
615
615
|
end
|
616
616
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-suomifi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antti Hukkanen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-saml
|