Page MenuHomePhabricator

D6039.diff
No OneTemporary

D6039.diff

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
@@ -7,6 +7,7 @@
mod crypto_tools;
mod identity_client;
+mod tunnelbroker_client;
mod identity {
tonic::include_proto!("identity");
}
diff --git a/native/native_rust_library/src/tunnelbroker_client.rs b/native/native_rust_library/src/tunnelbroker_client.rs
new file mode 100644
--- /dev/null
+++ b/native/native_rust_library/src/tunnelbroker_client.rs
@@ -0,0 +1,17 @@
+use crate::TunnelbrokerClient;
+
+use crate::tunnelbroker::SessionSignatureRequest;
+
+pub async fn get_nonce_to_sign(
+ mut client: Box<TunnelbrokerClient>,
+ device_id: String,
+) -> Result<String, tonic::Status> {
+ Ok(
+ client
+ .tunnelbroker_client
+ .session_signature(SessionSignatureRequest { device_id })
+ .await?
+ .into_inner()
+ .to_sign,
+ )
+}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 7:47 PM (20 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2688897
Default Alt Text
D6039.diff (950 B)

Event Timeline