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