Skip to content

Commit

Permalink
Store intermediates in a Vec rather than a hash set (#10136)
Browse files Browse the repository at this point in the history
There's no particular need for a hash set
  • Loading branch information
alex authored Jan 5, 2024
1 parent 98b6354 commit b208cbc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/rust/cryptography-x509-verification/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub mod policy;
pub mod trust_store;
pub mod types;

use std::collections::HashSet;
use std::vec;

use cryptography_x509::extensions::{DuplicateExtensionsError, Extensions};
Expand Down Expand Up @@ -171,7 +170,7 @@ pub fn verify<'chain, B: CryptoOps>(
}

struct ChainBuilder<'a, 'chain, B: CryptoOps> {
intermediates: HashSet<VerificationCertificate<'chain, B>>,
intermediates: Vec<VerificationCertificate<'chain, B>>,
policy: &'a Policy<'a, B>,
store: &'a Store<'chain, B>,
}
Expand All @@ -197,7 +196,7 @@ impl ApplyNameConstraintStatus {

impl<'a, 'chain, B: CryptoOps> ChainBuilder<'a, 'chain, B> {
fn new(
intermediates: HashSet<VerificationCertificate<'chain, B>>,
intermediates: Vec<VerificationCertificate<'chain, B>>,
policy: &'a Policy<'a, B>,
store: &'a Store<'chain, B>,
) -> Self {
Expand Down

0 comments on commit b208cbc

Please sign in to comment.