From 3f1088afe24ec5521e0e323e01d65855a42886ba Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Wed, 18 Nov 2026 11:01:52 -0500 Subject: [PATCH] Keep the OCSP parity oracle independent for embedded certificates --- crates/sign/src/revocation.rs | 2 +- crates/sign/src/x509.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/sign/src/revocation.rs b/crates/sign/src/revocation.rs index 9638c021cd..89d9e87a04 100644 --- a/crates/sign/src/revocation.rs +++ b/crates/sign/src/revocation.rs @@ -266,7 +266,7 @@ impl OcspResponse { if t.tag == tag::ctx(0) { for c in t.children()? { if c.tag == tag::SEQUENCE - && let Ok(cert) = Certificate::parse(c.raw) + && let Ok(cert) = Certificate::parse_legacy(c.raw) { responder_cert.get_or_insert(cert); } diff --git a/crates/sign/src/x509.rs b/crates/sign/src/x509.rs index c7232304dd..91f74ff214 100644 --- a/crates/sign/src/x509.rs +++ b/crates/sign/src/x509.rs @@ -335,7 +335,7 @@ impl Certificate { // Original certificate reader retained as an independent parity oracle; see source history. #[cfg(test)] - fn parse_legacy(raw: &[u8]) -> Result { + pub(crate) fn parse_legacy(raw: &[u8]) -> Result { let cert = Tlv::parse_all(raw)?.expect(tag::SEQUENCE, "Certificate")?; let parts = cert.children()?; let [tbs, sig_alg, sig] = parts.as_slice() else { return Err(SignError::Malformed("Certificate".into())) };