diff --git a/src/tests/verification_real_world/letsencrypt_org_valid_1.crt b/src/tests/verification_real_world/letsencrypt_org_valid_1.crt new file mode 100644 index 00000000..4dbed56c Binary files /dev/null and b/src/tests/verification_real_world/letsencrypt_org_valid_1.crt differ diff --git a/src/tests/verification_real_world/letsencrypt_org_valid_2.crt b/src/tests/verification_real_world/letsencrypt_org_valid_2.crt new file mode 100644 index 00000000..2d66ea72 Binary files /dev/null and b/src/tests/verification_real_world/letsencrypt_org_valid_2.crt differ diff --git a/src/tests/verification_real_world/letsencrypt_org_valid_3.crt b/src/tests/verification_real_world/letsencrypt_org_valid_3.crt new file mode 100644 index 00000000..79a33ba5 Binary files /dev/null and b/src/tests/verification_real_world/letsencrypt_org_valid_3.crt differ diff --git a/src/tests/verification_real_world/mod.rs b/src/tests/verification_real_world/mod.rs index 80314d76..6af3fc74 100644 --- a/src/tests/verification_real_world/mod.rs +++ b/src/tests/verification_real_world/mod.rs @@ -77,6 +77,14 @@ const VALID_UNRELATED_CHAIN: &[&[u8]] = &[ include_bytes!("agilebits_com_valid_4.crt"), ]; +const LETSENCRYPT_ORG: &str = "letsencrypt.org"; + +const VALID_LETSENCRYPT_ORG_CHAIN: &[&[u8]] = &[ + include_bytes!("letsencrypt_org_valid_1.crt"), + include_bytes!("letsencrypt_org_valid_2.crt"), + include_bytes!("letsencrypt_org_valid_3.crt"), +]; + macro_rules! real_world_test_cases { { $( $name:ident => $test_case:expr ),+ , } => { real_world_test_cases!(@ $($name => $test_case),+,); @@ -202,6 +210,13 @@ real_world_test_cases! { expected_result: Err(TlsError::InvalidCertificate(CertificateError::NotValidForName)), other_error: no_error!(), }, + letsencrypt => TestCase { + reference_id: LETSENCRYPT_ORG, + chain: VALID_LETSENCRYPT_ORG_CHAIN, + stapled_ocsp: None, + expected_result: Ok(()), + other_error: no_error!(), + }, // OCSP stapling works. //