Page MenuHomePhabricator

D4801.id15565.diff
No OneTemporary

D4801.id15565.diff

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

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)

Event Timeline