Skip to content

Commit

Permalink
policy: clippage
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <[email protected]>
  • Loading branch information
woodruffw committed Oct 24, 2023
1 parent 2232868 commit d91f976
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/rust/cryptography-x509-validation/src/policy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,12 @@ impl<'a, B: CryptoOps> Policy<'a, B> {
.chain(self.ee_extension_policies.iter())
.map(|p| p.oid.clone())
.collect::<HashSet<_>>();
let unchecked_extensions = critical_extensions
.difference(&checked_extensions)
.collect::<Vec<_>>();

if !unchecked_extensions.is_empty() {
if !critical_extensions
.difference(&checked_extensions)
.next()
.is_none()
{
// TODO: Render the OIDs here.
return Err("certificate contains unaccounted-for critical extensions".into());
}
Expand Down

0 comments on commit d91f976

Please sign in to comment.