Skip to content

Commit

Permalink
verify_cert: remove unused build_degenerate_chain arg
Browse files Browse the repository at this point in the history
The budget argument for `build_degenerate_chain` is no longer necessary.
We always use the default budget with this helper.
  • Loading branch information
cpu committed Sep 18, 2023
1 parent 0de1705 commit 5575fa2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/verify_cert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ mod tests {
fn build_degenerate_chain(
intermediate_count: usize,
trust_anchor: ChainTrustAnchor,
budget: Option<Budget>,
) -> ControlFlow<Error, Error> {
let ca_cert = make_issuer("Bogus Subject");
let ca_cert_der = CertificateDer::from(ca_cert.serialize_der().unwrap());
Expand Down Expand Up @@ -547,7 +546,7 @@ mod tests {
&trust_anchor,
&intermediates,
&make_end_entity(&issuer),
budget,
None,
)
.unwrap_err()
}
Expand All @@ -556,7 +555,7 @@ mod tests {
#[cfg(feature = "alloc")]
fn test_too_many_signatures() {
assert!(matches!(
build_degenerate_chain(5, ChainTrustAnchor::NotInChain, None),
build_degenerate_chain(5, ChainTrustAnchor::NotInChain),
ControlFlow::Break(Error::MaximumSignatureChecksExceeded)
));
}
Expand All @@ -565,7 +564,7 @@ mod tests {
#[cfg(feature = "alloc")]
fn test_too_many_path_calls() {
assert!(matches!(
dbg!(build_degenerate_chain(10, ChainTrustAnchor::InChain, None)),
dbg!(build_degenerate_chain(10, ChainTrustAnchor::InChain)),
ControlFlow::Break(Error::MaximumPathBuildCallsExceeded)
));
}
Expand Down

0 comments on commit 5575fa2

Please sign in to comment.