Page MenuHomePhabricator

D6942.diff
No OneTemporary

D6942.diff

diff --git a/native/native_rust_library/src/identity_client.rs b/native/native_rust_library/src/identity_client.rs
--- a/native/native_rust_library/src/identity_client.rs
+++ b/native/native_rust_library/src/identity_client.rs
@@ -204,7 +204,7 @@
user_id: String,
signing_public_key: String,
siwe_message: String,
- siwe_signature: Vec<u8>,
+ siwe_signature: String,
) -> Result<String, Status> {
// Create a LoginRequest channel and use ReceiverStream to turn the
// MPSC receiver into a Stream for outbound messages
diff --git a/native/native_rust_library/src/lib.rs b/native/native_rust_library/src/lib.rs
--- a/native/native_rust_library/src/lib.rs
+++ b/native/native_rust_library/src/lib.rs
@@ -82,7 +82,7 @@
user_id: String,
signing_public_key: String,
siwe_message: String,
- siwe_signature: Vec<u8>,
+ siwe_signature: String,
) -> Result<String>;
// Tunnelbroker Service Client
@@ -171,7 +171,7 @@
user_id: String,
signing_public_key: String,
siwe_message: String,
- siwe_signature: Vec<u8>,
+ siwe_signature: String,
) -> Result<String, Status> {
RUNTIME.block_on(identity_client::login_user_wallet(
client,
diff --git a/services/identity/src/service.rs b/services/identity/src/service.rs
--- a/services/identity/src/service.rs
+++ b/services/identity/src/service.rs
@@ -335,7 +335,7 @@
user_id: &str,
signing_public_key: &str,
siwe_message: &str,
- siwe_signature: Vec<u8>,
+ siwe_signature: &str,
) -> Result<(), Status> {
if user_id.is_empty() || signing_public_key.is_empty() {
error!(
@@ -352,7 +352,7 @@
}
};
match siwe_message.verify(
- match siwe_signature.try_into() {
+ match siwe_signature.as_bytes().try_into() {
Ok(s) => s,
Err(e) => {
error!("Conversion to SIWE signature failed: {:?}", e);
@@ -383,7 +383,7 @@
&wallet_login_request.user_id,
&wallet_login_request.signing_public_key,
&wallet_login_request.siwe_message,
- wallet_login_request.siwe_signature,
+ &wallet_login_request.siwe_signature,
)?;
client
.update_users_table(
diff --git a/shared/protos/identity.proto b/shared/protos/identity.proto
--- a/shared/protos/identity.proto
+++ b/shared/protos/identity.proto
@@ -84,7 +84,7 @@
// ed25519 key for the given user's device
string signingPublicKey = 2;
string siweMessage = 3;
- bytes siweSignature = 4;
+ string siweSignature = 4;
// Information specific to a user's device needed to open a new channel of
// communication with this user
SessionInitializationInfo sessionInitializationInfo = 5;

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 7:47 AM (15 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2694037
Default Alt Text
D6942.diff (2 KB)

Event Timeline