From c1d897188ffa3857192a9ba0e6575109c1578386 Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Mon, 11 Mar 2024 16:34:06 -0400 Subject: [PATCH 1/2] tests: include ref id in real world test log Previously the `real_world_test` macro only included the test case's expected result in its log output. This makes it tricky to differentiate between failures for testcases that share the same expected result (e.g. `Ok(())`). This commit updates the macro so the generated test fn includes the reference subject identifier name as well as the expected result. --- .../src/tests/verification_real_world/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ca9daca2..47323284 100644 --- a/rustls-platform-verifier/src/tests/verification_real_world/mod.rs +++ b/rustls-platform-verifier/src/tests/verification_real_world/mod.rs @@ -118,7 +118,11 @@ macro_rules! no_error { } fn real_world_test(test_case: &TestCase) { - log::info!("verifying {:?}", test_case.expected_result); + log::info!( + "verifying ref ID {:?} expected {:?}", + test_case.reference_id, + test_case.expected_result + ); // On BSD systems openssl-probe fails to find the system CA bundle, // so we must provide extra roots from webpki-roots. From 98725337daa56ebe98db7877670b3886884539e8 Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Mon, 11 Mar 2024 16:35:32 -0400 Subject: [PATCH 2/2] tests: update lets encrypt real world EE test cert * Updates the test cert for presently unknown reasons the previous EE cert is returning an error in the Android real world verification test suite that appears resolved by refreshing the EE cert. * Updates the mock verification timestamp to be newer than the LE EE cert's NotBefore date. --- rustls-platform-verifier/src/tests/mod.rs | 4 ++-- .../letsencrypt_org_valid_1.crt | Bin 1138 -> 1139 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rustls-platform-verifier/src/tests/mod.rs b/rustls-platform-verifier/src/tests/mod.rs index 3455f93c..5370f251 100644 --- a/rustls-platform-verifier/src/tests/mod.rs +++ b/rustls-platform-verifier/src/tests/mod.rs @@ -58,6 +58,6 @@ pub fn assert_cert_error_eq( /// we know the test certificates are valid. This must be updated if the mock certificates /// are regenerated. pub(crate) fn verification_time() -> pki_types::UnixTime { - // Wednesday, January 3, 2024 6:03:08 PM UTC - pki_types::UnixTime::since_unix_epoch(Duration::from_secs(1_704_304_988)) + // Monday, March 11, 2024 8:30:25 PM UTC + pki_types::UnixTime::since_unix_epoch(Duration::from_secs(1_710_189_025)) } diff --git a/rustls-platform-verifier/src/tests/verification_real_world/letsencrypt_org_valid_1.crt b/rustls-platform-verifier/src/tests/verification_real_world/letsencrypt_org_valid_1.crt index 5fd49ffc1b01a5ee942818c8b3e9f0c821a66112..78c79c699571515d454573702d3e32b168d11a6f 100644 GIT binary patch delta 683 zcmV;c0#yC-2=fRbFoFbcFoFYDpaTK{0s;~Qr@gwqX=i$+-$I$I_UHKBJCPws8ZbS#V?Ip@rR{^iD7ip^V>TtpCmC!vCar?b%=ugUa!FbxI? zDuzgg_YDC73k3iJf&l>lhSU`KYtC9%FD5S3-0m6@jHFzWQ5i8>b3E3@q(Y-He@m5w zph_DqzRb@4KkKtsS4AneB0mQN`Crzf?budh%kAB3>UV zVymV&C85wmwp!_%1ay#PCnGv$VW(!iD9wb)jCL zzd7Lp_$?FvMU77mQLAdEJdKqX+rl&Tv?K!bDmZ(bz};fDyr+{#LQ7POa$l8bfhgp> R$weNqTLlnctYkTdUwt&t%}8Z$95 zGB`3ZGB7eUS{Ds6G%zwUHZn0XFfucdgEB}!>%zkA^_I=aXs)n1VR(jp$z}oiR^YF6 zJl>@2L;x~LCYHnmSk0ruCo^$=p40Ue?8x3K28~%mSu_18WH7O#f&yhQf&yWY{YVrY zezwSs=lO$_V#~W&yU#Jkhx(+mSpfk77Xt4E?N1Oos@Fhl|%YfXFr=aTUQnYF#=Dti&;_?qM_rur<707QEl{)6 z%U0bif!Vvit2x+&a{vGVj2HyzhX4Qse**wVFhv3(0G|MpoU64F(A+ zhDe6@4FLfQ1potr0RaF6js%!bEYydpw8-w7lFJhj=;FzCB~#I$S-_<+~$7gZX^GP)U42+ zmH)IR5Bpjg86XGl08{15FzVW?U^LQW9J)7b@R9d} z@}ND7A^hYOzh@l`KRxDdG2!67<(=96G?(u`>Qi?+>k;o*@JM*u*1N+|2bi{u$R(@Y QFaoXM4=K}%M+%fZzu37f+5i9m