Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3540443
D7200.id24239.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
964 B
Referenced Files
None
Subscribers
None
D7200.id24239.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 27, 4:57 AM (8 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2707726
Default Alt Text
D7200.id24239.diff (964 B)
Attached To
Mode
D7200: [Comm-opaque2] Add grpc helper for wrapped protocol error
Attached
Detach File
Event Timeline
Log In to Comment