Keep the OCSP parity oracle independent for embedded certificates

This commit is contained in:
Dylan M. Taylor committed 2026-11-18 11:01:52 -05:00
1 parent 209c040cce
commit 3f1088afe2
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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<Certificate, SignError> {
pub(crate) fn parse_legacy(raw: &[u8]) -> Result<Certificate, SignError> {
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())) };