From a81e376fa73f1ff2497c796fc39823e7782c84fc Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Thu, 15 Oct 2026 11:40:49 +0200 Subject: [PATCH] Remove test certificates from published package The published version of `rustls-platform-verifier` contains a larger number of test-certificates, e.g https://crates.io/crates/rustls-platform-verifier/0.7.1/code/src/tests/verification_real_world/aws_amazon_com_valid_1.crt It would be good to exclude them from the published package to make reviewing the source code easier. This PR adds an explicit `include` statement to the `Cargo.toml` file to only include files that are needed to build the crate, not to run all tests. Specifically this PR removes the following files from the published package: ``` examples/update-certs.rs src/tests/ffi.rs src/tests/mod.rs src/tests/verification_mock/ca.go src/tests/verification_mock/go.mod src/tests/verification_mock/go.sum src/tests/verification_mock/mod.rs src/tests/verification_mock/root1-int1-ee_1-good.crt src/tests/verification_mock/root1-int1-ee_1-good.ocsp src/tests/verification_mock/root1-int1-ee_1-revoked.crt src/tests/verification_mock/root1-int1-ee_1-revoked.ocsp src/tests/verification_mock/root1-int1-ee_1-wrong_eku.crt src/tests/verification_mock/root1-int1-ee_127.0.0.1-good.crt src/tests/verification_mock/root1-int1-ee_127.0.0.1-good.ocsp src/tests/verification_mock/root1-int1-ee_127.0.0.1-revoked.crt src/tests/verification_mock/root1-int1-ee_127.0.0.1-revoked.ocsp src/tests/verification_mock/root1-int1-ee_127.0.0.1-wrong_eku.crt src/tests/verification_mock/root1-int1-ee_example.com-good.crt src/tests/verification_mock/root1-int1-ee_example.com-good.ocsp src/tests/verification_mock/root1-int1-ee_example.com-revoked.crt src/tests/verification_mock/root1-int1-ee_example.com-revoked.ocsp src/tests/verification_mock/root1-int1-ee_example.com-wrong_eku.crt src/tests/verification_mock/root1-int1.crt src/tests/verification_mock/root1.crt src/tests/verification_real_world/aws_amazon_com_valid_1.crt src/tests/verification_real_world/aws_amazon_com_valid_2.crt src/tests/verification_real_world/aws_amazon_com_valid_3.crt src/tests/verification_real_world/aws_amazon_com_valid_4.crt src/tests/verification_real_world/letsencrypt_org_valid_1.crt src/tests/verification_real_world/letsencrypt_org_valid_2.crt src/tests/verification_real_world/letsencrypt_org_valid_3.crt src/tests/verification_real_world/letsencrypt_org_valid_4.crt src/tests/verification_real_world/mod.rs src/tests/verification_real_world/revoked_badssl_com_1.crt src/tests/verification_real_world/revoked_badssl_com_1.ocsp src/tests/verification_real_world/revoked_badssl_com_2.crt ``` --- rustls-platform-verifier/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/rustls-platform-verifier/Cargo.toml b/rustls-platform-verifier/Cargo.toml index f2cfce5..989cc2b 100644 --- a/rustls-platform-verifier/Cargo.toml +++ b/rustls-platform-verifier/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/rustls/rustls-platform-verifier" license = "MIT OR Apache-2.0" edition = "2021" rust-version = "1.85" +include = ["Cargo.toml", "Cargo.lock", "README.md", "LICENSE-APACHE", "LICENSE-MIT", "src/**/*.rs", "!src/tests/"] [lib] name = "rustls_platform_verifier"