tanker-core 4.2.1 → 4.3.0.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tanker/c_tanker/c_verification.rb +8 -2
- data/lib/tanker/c_tanker.rb +1 -0
- data/lib/tanker/core/encryption.rb +7 -0
- data/lib/tanker/core/verification.rb +12 -0
- data/lib/tanker/core/verification_method.rb +2 -0
- data/lib/tanker/core/version.rb +1 -1
- data/vendor/tanker/darwin-aarch64/libctanker.dylib +0 -0
- data/vendor/tanker/darwin-x86_64/libctanker.dylib +0 -0
- data/vendor/tanker/linux-x86_64/libctanker.so +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 646aacdef995028da941416820f722d17a21ea374d08b2a736914b09df78acd0
|
4
|
+
data.tar.gz: 67f254c17c13353fc60d1d41fbbc046fedb9fec3cf2d36207d06de81c6019c1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3b57594fac7d9b78deec0aced563b7eee7ef1a0a27a754d587994af17d6fdc53e855310f75210747b8bc0dfad95264f6943285051ad8ccb55796902ed64faa3
|
7
|
+
data.tar.gz: ab8e10d48c28de75a40a2860bb1d4f346fd23a081d839722b3cc8a69c95b90fca10a7268a582a3b2b398927d42879af3962465e69386505edeefbb9423f3f40d
|
@@ -93,7 +93,8 @@ module Tanker
|
|
93
93
|
:preverified_email, :pointer,
|
94
94
|
:preverified_phone_number, :pointer,
|
95
95
|
:preverified_oidc, COIDCVerification,
|
96
|
-
:oidc_authorization_code_verification, COIDCAuthorizationCodeVerification
|
96
|
+
:oidc_authorization_code_verification, COIDCAuthorizationCodeVerification,
|
97
|
+
:prehashed_and_encrypted_passphrase, :pointer
|
97
98
|
|
98
99
|
TYPE_EMAIL = 1
|
99
100
|
TYPE_PASSPHRASE = 2
|
@@ -105,6 +106,7 @@ module Tanker
|
|
105
106
|
TYPE_E2E_PASSPHRASE = 8
|
106
107
|
TYPE_PREVERIFIED_OIDC = 9
|
107
108
|
TYPE_OIDC_AUTHORIZATION_CODE = 10
|
109
|
+
TYPE_PREHASHED_AND_ENCRYPTED_PASSPHRASE = 11
|
108
110
|
|
109
111
|
def initialize(verification) # rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity Not relevant for a case/when
|
110
112
|
super()
|
@@ -157,11 +159,15 @@ module Tanker
|
|
157
159
|
verification.authorization_code,
|
158
160
|
verification.state
|
159
161
|
)
|
162
|
+
when Tanker::PrehashedAndEncryptedPassphraseVerification
|
163
|
+
@prehashed_and_encrypted_passphrase = CTanker.new_cstring verification.prehashed_and_encrypted_passphrase
|
164
|
+
self[:type] = TYPE_PREHASHED_AND_ENCRYPTED_PASSPHRASE
|
165
|
+
self[:prehashed_and_encrypted_passphrase] = @prehashed_and_encrypted_passphrase
|
160
166
|
else
|
161
167
|
raise ArgumentError, 'Unknown Tanker::Verification type!'
|
162
168
|
end
|
163
169
|
|
164
|
-
self[:version] =
|
170
|
+
self[:version] = 9
|
165
171
|
end
|
166
172
|
end
|
167
173
|
|
data/lib/tanker/c_tanker.rb
CHANGED
@@ -90,6 +90,7 @@ module Tanker
|
|
90
90
|
blocking_attach_function :tanker_http_handle_response, [CHttpRequest, CHttpResponse], :void
|
91
91
|
|
92
92
|
blocking_attach_function :tanker_prehash_password, [:string], CFuture
|
93
|
+
blocking_attach_function :tanker_prehash_and_encrypt_password, [:string, :string], CFuture
|
93
94
|
|
94
95
|
blocking_attach_function :tanker_authenticate_with_idp, [:session_pointer, :string, :string], CFuture
|
95
96
|
blocking_attach_function :tanker_free_authenticate_with_idp_result, [:pointer], :void
|
@@ -79,6 +79,13 @@ module Tanker
|
|
79
79
|
CTanker.tanker_prehash_password(str).get_string
|
80
80
|
end
|
81
81
|
|
82
|
+
def self.prehash_and_encrypt_password(password, public_key)
|
83
|
+
ASSERT_UTF8.call(password)
|
84
|
+
ASSERT_UTF8.call(public_key)
|
85
|
+
|
86
|
+
CTanker.tanker_prehash_and_encrypt_password(password, public_key).get_string
|
87
|
+
end
|
88
|
+
|
82
89
|
private
|
83
90
|
|
84
91
|
def encrypt_common(data, encryption_options)
|
@@ -139,4 +139,16 @@ module Tanker
|
|
139
139
|
@e2e_passphrase = e2e_passphrase
|
140
140
|
end
|
141
141
|
end
|
142
|
+
|
143
|
+
class PrehashedAndEncryptedPassphraseVerification < Verification
|
144
|
+
attr_reader :prehashed_and_encrypted_passphrase
|
145
|
+
|
146
|
+
def initialize(prehashed_and_encrypted_passphrase)
|
147
|
+
super()
|
148
|
+
|
149
|
+
ASSERT_UTF8.call(prehashed_and_encrypted_passphrase)
|
150
|
+
|
151
|
+
@prehashed_and_encrypted_passphrase = prehashed_and_encrypted_passphrase
|
152
|
+
end
|
153
|
+
end
|
142
154
|
end
|
data/lib/tanker/core/version.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tanker-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.3.0.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanker team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -104,9 +104,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
104
|
version: 3.1.0
|
105
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - ">"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: 1.3.1
|
110
110
|
requirements: []
|
111
111
|
rubygems_version: 3.4.10
|
112
112
|
signing_key:
|