Skip to content

Commit

Permalink
Fix error conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
samdealy committed Mar 23, 2023
1 parent 116637f commit 08f86c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions crypto/keys/src/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,7 @@ impl Ed25519Pair {

impl<D: Digest<OutputSize = U64>> DigestSigner<D, Ed25519Signature> for Ed25519Pair {
fn try_sign_digest(&self, digest: D) -> Result<Ed25519Signature, SignatureError> {
let sig = self
.0
.sign_prehashed(digest, None)?;
let sig = self.0.sign_prehashed(digest, None)?;
Ok(Ed25519Signature::new(sig.to_bytes()))
}
}
Expand Down
3 changes: 2 additions & 1 deletion fog/report/server/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub use crate::{config::Materials, SVC_COUNTERS};
use displaydoc::Display;
use grpcio::{RpcContext, RpcStatus, UnarySink};
use mc_common::logger::{self, log, Logger};
use mc_crypto_keys::SignatureError;
use mc_fog_api::{
report::{ReportRequest as ProtobufReportRequest, ReportResponse as ProtobufReportResponse},
report_grpc::ReportApi,
Expand All @@ -17,7 +18,7 @@ use mc_util_grpc::{
check_request_chain_id, rpc_database_err, rpc_internal_error, rpc_logger, send_result,
};
use prost::DecodeError;
use signature::Error as SignatureError;

#[derive(Clone)]
pub struct Service<R: ReportDb + Clone + Send + Sync> {
/// Access to the Report db is needed to retrieve the ingest report for
Expand Down

0 comments on commit 08f86c1

Please sign in to comment.