Page MenuHomePhabricator

D7200.id24225.diff
No OneTemporary

D7200.id24225.diff

diff --git a/shared/comm-opaque2/src/error.rs b/shared/comm-opaque2/src/error.rs
--- a/shared/comm-opaque2/src/error.rs
+++ b/shared/comm-opaque2/src/error.rs
@@ -14,6 +14,12 @@
}
}
+impl Into<ProtocolError> for OpaqueError {
+ fn into(self) -> ProtocolError {
+ self.0
+ }
+}
+
impl From<ProtocolError> for OpaqueError {
fn from(error: ProtocolError) -> OpaqueError {
OpaqueError(error)
diff --git a/shared/comm-opaque2/src/grpc.rs b/shared/comm-opaque2/src/grpc.rs
--- a/shared/comm-opaque2/src/grpc.rs
+++ b/shared/comm-opaque2/src/grpc.rs
@@ -1,7 +1,12 @@
+use crate::error::OpaqueError;
use log::info;
use opaque_ke::errors::ProtocolError;
use tonic::Status;
+pub fn opaque_error_to_grpc_status(error: OpaqueError) -> tonic::Status {
+ protocol_error_to_grpc_status(error.into())
+}
+
pub fn protocol_error_to_grpc_status(error: ProtocolError) -> tonic::Status {
match error {
ProtocolError::IdentityGroupElementError => {

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 5:24 PM (11 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2707726
Default Alt Text
D7200.id24225.diff (964 B)

Event Timeline