handle errors
This commit is contained in:
parent
3ea08410bb
commit
acfe506f51
@ -38,8 +38,7 @@ impl KnownKeys {
|
||||
let mut content = Vec::with_capacity(2048);
|
||||
let helper = &*self;
|
||||
let mut v = Verifier::<&KnownKeys>::from_reader(r, helper, None)
|
||||
.map_err(|e| dbg!(e))
|
||||
.unwrap();
|
||||
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, "Failed to verify signature"))?;
|
||||
if v.read_to_end(&mut content).is_err() {
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::InvalidData,
|
||||
|
Loading…
x
Reference in New Issue
Block a user