tanker-core 4.2.1 → 4.3.0.alpha.2
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/lib/tanker/core.rb +0 -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 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f707da22c3fe58482a8324ef101febd1404a981e3c0edb3d852caaffd445233
|
4
|
+
data.tar.gz: 1aef05aa1997a2f161fc54771d9bbae03a50d42c6cd000bfa2681ee75b077dcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb99d079a0bd15a60f15488f0924678fa0725b22f286e03bcdca41fc329e1bc7e49fc33a0b8015e722469c8008d86c90d6bd320a5dc3dc5e67ad3499f173be41
|
7
|
+
data.tar.gz: 3a770be3e676a9a922a6621dcc77b735b4c5e87223a5a34dccb3d726332bccf8894c1123d57684bfc0383618e678267178d561fcbba44df649e36bf902e41cf4
|
@@ -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
data/lib/tanker/core.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tanker-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2
|
4
|
+
version: 4.3.0.alpha.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanker team
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-03 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: faraday
|
@@ -47,7 +46,6 @@ dependencies:
|
|
47
46
|
description: |
|
48
47
|
Ruby bindings for the Tanker SDK.
|
49
48
|
Tanker is a platform as a service that allows you to easily protect your users' data with end-to-end encryption through a SDK
|
50
|
-
email:
|
51
49
|
executables: []
|
52
50
|
extensions: []
|
53
51
|
extra_rdoc_files: []
|
@@ -87,13 +85,11 @@ files:
|
|
87
85
|
- vendor/tanker/darwin-aarch64/libctanker.dylib
|
88
86
|
- vendor/tanker/darwin-x86_64/libctanker.dylib
|
89
87
|
- vendor/tanker/linux-x86_64/libctanker.so
|
90
|
-
homepage:
|
91
88
|
licenses:
|
92
89
|
- Apache-2.0
|
93
90
|
metadata:
|
94
91
|
rubygems_mfa_required: 'true'
|
95
92
|
source_code_uri: https://github.com/TankerHQ/sdk-ruby
|
96
|
-
post_install_message:
|
97
93
|
rdoc_options: []
|
98
94
|
require_paths:
|
99
95
|
- lib
|
@@ -101,15 +97,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
97
|
requirements:
|
102
98
|
- - ">="
|
103
99
|
- !ruby/object:Gem::Version
|
104
|
-
version: 3.
|
100
|
+
version: 3.2.0
|
105
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
102
|
requirements:
|
107
103
|
- - ">="
|
108
104
|
- !ruby/object:Gem::Version
|
109
105
|
version: '0'
|
110
106
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
112
|
-
signing_key:
|
107
|
+
rubygems_version: 3.6.2
|
113
108
|
specification_version: 4
|
114
109
|
summary: Ruby SDK for Tanker
|
115
110
|
test_files: []
|