Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3507222
D6039.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
950 B
Referenced Files
None
Subscribers
None
D6039.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D6039: [native/rust_library] Tunnelbroker client - Adding of the `get_nonce_to_sign` function
Attached
Detach File
Event Timeline
Log In to Comment