mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-18 18:15:34 +00:00
Merge pull request #7786 from storytold/test/ocsp-independent-oracle-20261118
test(sign): keep embedded OCSP certificate oracle independent
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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())) };
|
||||
|
||||
Reference in new issue
Block a user