Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3573062
D4801.id15565.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4801.id15565.diff
View Options
diff --git a/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs b/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs
--- a/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs
+++ b/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs
@@ -121,3 +121,28 @@
})
.map(|res| res.message)
}
+
+fn pake_login_finish(
+ credential_response_bytes: &[u8],
+ client_login: Option<ClientLogin<Cipher>>,
+) -> Result<CredentialFinalization<Cipher>, Status> {
+ client_login
+ .ok_or_else(|| {
+ error!("PAKE client_login not found");
+ Status::aborted("Login not found")
+ })?
+ .finish(
+ CredentialResponse::deserialize(credential_response_bytes).map_err(
+ |e| {
+ error!("Could not deserialize credential response bytes: {}", e);
+ Status::aborted("Invalid response bytes")
+ },
+ )?,
+ ClientLoginFinishParameters::default(),
+ )
+ .map_err(|e| {
+ error!("Failed to finish PAKE login: {}", e);
+ Status::aborted("PAKE failure")
+ })
+ .map(|res| res.message)
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 29, 1:52 PM (6 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2732448
Default Alt Text
D4801.id15565.diff (1 KB)
Attached To
Mode
D4801: [native] helper for pake login on client side
Attached
Detach File
Event Timeline
Log In to Comment