mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust/pvsecret: verify.rs: fix clippy finding
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
committed by
Steffen Eiden
parent
636d2d571b
commit
5648b924d6
@@ -13,7 +13,7 @@ use crate::cli::VerifyOpt;
|
||||
/// read the content of a DER or PEM x509 and return the public key
|
||||
fn read_sgn_key(path: &str) -> Result<PKey<Public>> {
|
||||
read_certs(&read_file(path, "user-signing key")?)?
|
||||
.get(0)
|
||||
.first()
|
||||
.ok_or(anyhow!("File does not contain a X509 certificate"))?
|
||||
.public_key()
|
||||
.map_err(anyhow::Error::new)
|
||||
|
||||
Reference in New Issue
Block a user