Skip to content

Commit

Permalink
Merge pull request #222 from ANSSI-FR/allow-unauthenticated-data
Browse files Browse the repository at this point in the history
Allow unauthenticated data
  • Loading branch information
commial authored Sep 3, 2024
2 parents ed4cba4 + 97039b1 commit eeac3c3
Show file tree
Hide file tree
Showing 4 changed files with 399 additions and 88 deletions.
7 changes: 6 additions & 1 deletion mla/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ impl From<bincode::ErrorKind> for Error {

impl From<Error> for io::Error {
fn from(error: Error) -> Self {
io::Error::new(io::ErrorKind::Other, format!("{error}"))
match error {
// On IOError, unwrap it (MLAError(IOError(err))) -> err
Error::IOError(err) => err,
// Otherwise, use a generic construction
_ => io::Error::new(io::ErrorKind::Other, format!("{error}")),
}
}
}

Expand Down
Loading

0 comments on commit eeac3c3

Please sign in to comment.