Key::list: Skip Certificate::new for empty buffers
This matches the C code behaviour.
This commit is contained in:
+4
-2
@@ -125,8 +125,10 @@ impl Key {
|
||||
}
|
||||
};
|
||||
|
||||
let cert = Certificate::new(buf)?;
|
||||
keys.push(Key { slot, cert });
|
||||
if !buf.is_empty() {
|
||||
let cert = Certificate::new(buf)?;
|
||||
keys.push(Key { slot, cert });
|
||||
}
|
||||
}
|
||||
|
||||
Ok(keys)
|
||||
|
||||
Reference in New Issue
Block a user