From e41b04accafc5bd8f654f9d15158915634baa3e3 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 2 Sep 2024 13:48:58 +0200 Subject: [PATCH 1/2] Clean up trailing whitespace --- .../src/tests/verification_real_world/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rustls-platform-verifier/src/tests/verification_real_world/mod.rs b/rustls-platform-verifier/src/tests/verification_real_world/mod.rs index cc111b8..ceab620 100644 --- a/rustls-platform-verifier/src/tests/verification_real_world/mod.rs +++ b/rustls-platform-verifier/src/tests/verification_real_world/mod.rs @@ -11,7 +11,7 @@ //! limitations of what we can do when using real-world certificates. We //! accept that the benefit of having these tests outweigh this downside. //! If we encounter cases where these tests are flaky we'll spend additional -//! effort +//! effort //! //! * If these certificates are ever revoked then it is possible that, even if //! with the measures mentioned in the next paragraphs, the operating system @@ -33,7 +33,7 @@ //! a networking error causes the fetch of the OCSP response to fail, then //! they will continue roughly as though they received a "Good" response. //! Thus we don't expect these tests to be flaky w.r.t. that, except for -//! potentially poor performance. +//! potentially poor performance. use super::TestCase; use crate::tests::{assert_cert_error_eq, ensure_global_state, verification_time}; use crate::Verifier; From 0316d769dcd075a6c4861a482453849405edcabe Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 2 Sep 2024 13:49:11 +0200 Subject: [PATCH 2/2] Fix build on FreeBSD --- .../src/tests/verification_mock/mod.rs | 8 ++++++-- .../src/tests/verification_real_world/mod.rs | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/rustls-platform-verifier/src/tests/verification_mock/mod.rs b/rustls-platform-verifier/src/tests/verification_mock/mod.rs index 25d5039..59e322a 100644 --- a/rustls-platform-verifier/src/tests/verification_mock/mod.rs +++ b/rustls-platform-verifier/src/tests/verification_mock/mod.rs @@ -111,8 +111,12 @@ pub(super) fn verification_without_mock_root() { // runner fails to find any roots with openssl-probe we need to provide webpki-root-certs here // or the test will fail with the `OtherError` instead of the expected `CertificateError`. #[cfg(target_os = "freebsd")] - let verifier = - Verifier::new_with_extra_roots(webpki_root_certs::TLS_SERVER_ROOT_CERTS.iter().cloned()); + let verifier = Verifier::new_with_extra_roots( + webpki_root_certs::TLS_SERVER_ROOT_CERTS + .iter() + .cloned() + .collect(), + ); #[cfg(not(target_os = "freebsd"))] let verifier = Verifier::new(); diff --git a/rustls-platform-verifier/src/tests/verification_real_world/mod.rs b/rustls-platform-verifier/src/tests/verification_real_world/mod.rs index ceab620..532be9e 100644 --- a/rustls-platform-verifier/src/tests/verification_real_world/mod.rs +++ b/rustls-platform-verifier/src/tests/verification_real_world/mod.rs @@ -128,8 +128,12 @@ fn real_world_test(test_case: &TestCase) { // On BSD systems openssl-probe fails to find the system CA bundle, // so we must provide extra roots from webpki-root-cert. #[cfg(target_os = "freebsd")] - let verifier = - Verifier::new_with_extra_roots(webpki_root_certs::TLS_SERVER_ROOT_CERTS.iter().cloned()); + let verifier = Verifier::new_with_extra_roots( + webpki_root_certs::TLS_SERVER_ROOT_CERTS + .iter() + .cloned() + .collect(), + ); #[cfg(not(target_os = "freebsd"))] let verifier = Verifier::new();