Skip to content

Commit 57a2d16

Browse files
committed
tests: add LE chain test to verification_real_world
In particular this testcase ensures that we can validate a chain from EE->intermediate->trust anchor for a chain where one or more certificates (in this case, the intermediate) are missing an authority information access (AIA) extension that specifies an OCSP access method and URI.
1 parent 3a052e0 commit 57a2d16

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/tests/verification_real_world/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ const VALID_UNRELATED_CHAIN: &[&[u8]] = &[
7777
include_bytes!("agilebits_com_valid_4.crt"),
7878
];
7979

80+
const LETSENCRYPT_ORG: &str = "letsencrypt.org";
81+
82+
const VALID_LETSENCRYPT_ORG_CHAIN: &[&[u8]] = &[
83+
include_bytes!("letsencrypt_org_valid_1.crt"),
84+
include_bytes!("letsencrypt_org_valid_2.crt"),
85+
include_bytes!("letsencrypt_org_valid_3.crt"),
86+
];
87+
8088
macro_rules! real_world_test_cases {
8189
{ $( $name:ident => $test_case:expr ),+ , } => {
8290
real_world_test_cases!(@ $($name => $test_case),+,);
@@ -202,6 +210,13 @@ real_world_test_cases! {
202210
expected_result: Err(TlsError::InvalidCertificate(CertificateError::NotValidForName)),
203211
other_error: no_error!(),
204212
},
213+
letsencrypt => TestCase {
214+
reference_id: LETSENCRYPT_ORG,
215+
chain: VALID_LETSENCRYPT_ORG_CHAIN,
216+
stapled_ocsp: None,
217+
expected_result: Ok(()),
218+
other_error: no_error!(),
219+
},
205220

206221
// OCSP stapling works.
207222
//

0 commit comments

Comments
 (0)