diff --git a/src/presentation/reader.rs b/src/presentation/reader.rs index 8dde4595..4d3c6c57 100644 --- a/src/presentation/reader.rs +++ b/src/presentation/reader.rs @@ -418,21 +418,21 @@ pub fn find_anchor( Ok(root_cert) => root_cert.tbs_certificate.subject == leaf_issuer, Err(_) => false, } - }, + } TrustAnchor::Custom(certificate, _ruleset) => { match x509_cert::Certificate::from_der(&certificate.bytes) { Ok(root_cert) => root_cert.tbs_certificate.subject == leaf_issuer, Err(_) => false, } - }, + } TrustAnchor::Aamva(certificate) => { match x509_cert::Certificate::from_der(&certificate.bytes) { Ok(root_cert) => root_cert.tbs_certificate.subject == leaf_issuer, Err(_) => false, } } - }) - else { + }) + else { return Err(Error::MdocAuth( "The certificate issuer does not match any known trusted issuer".to_string(), ));