Skip to content

[stable35] fix(docmdp): accept DSS and document timestamp updates after certification - #9694

Merged
vitormattos merged 12 commits into
stable35from
backport/9556/stable35
Nov 24, 2026
Merged

vitormattos merged 12 commits into
stable35from
backport/9556/stable35

Conversation

@backportbot-libresign

@backportbot-libresign backportbot-libresign Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Backport of #9556

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

no84by and others added 11 commits November 24, 2026 13:07
…ation

ISO 32000-2 12.8.2.2.1 and ETSI EN 319 142-1 5.4 exempt incremental
updates that only add a DSS dictionary (VRI, Certs, CRLs, OCSPs) or a
document timestamp from DocMDP restrictions. The validation classified
such an update as an unknown modification, so a certified document
became invalid as soon as long-term validation data was added, at every
DocMDP level.

Before classifying the modification, parse the bytes after the certified
revision strictly as incremental updates: indirect objects, a classic
xref table listing exactly those objects at their offsets, a trailer
whose /Root, /Info and /Prev match the certified revision and has no
/Encrypt, and startxref. Xref streams, unlisted or unparsable bytes and
object streams mean the update is not validation data only. The
certified revision is read through its classic xref tables.

New objects must use numbers from the certified /Size on. Of the
existing objects, an update may only rewrite the catalog (/DSS,
/Extensions, /Version), the AcroForm (/SigFlags, timestamp fields
appended to /Fields), a page (timestamp fields appended to /Annots) and
the information dictionary (/ModDate, /Producer). A new field must be an
invisible document timestamp field (zero-area /Rect, no /Kids, /Parent,
/A or /AA) whose value is a new /DocTimeStamp with /SubFilter
/ETSI.RFC3161; any other new signature, field or annotation keeps the
update a violation.

Rewritten objects are compared in a canonical form (sorted keys, names
with #xx escapes decoded, strings by their bytes, duplicate keys
rejected, bounded nesting), since LTV tools rewrite the catalog and the
information dictionary with their own formatting.

Signed-off-by: no84by <50858621+no84by@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
fix(policy): keep group selector dropdown inside nested dialog

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>

[skip ci]
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>

Copy link
Copy Markdown
Member

Restored the complete DocMDP validation-data backport, preserved the stable branch APIs, removed the duplicate PDF fixture method, and restored the missing regression tests. The native signing/validation regression now runs in this stable branch's PHPUnit suite with isolated mocks.

Local validation against the regenerated scoped validator and the stable branch's locked signer: 81 DocMDP tests (153 assertions) and 8 native signing/validation tests (167 assertions) passed. PHP lint also passed. The new application commit is signed and DCO-compliant.

Merge dependency: LibreSign/3rdparty#168 (all dependency checks passed). This PR currently references that reviewed candidate's signed generated HEAD for integration testing. Merge the corresponding 3rdparty PR first and update this gitlink to the actual merged source commit; rerun application CI before merging. The application CI is running on the corrected HEAD.

The original backport commits are retained; no history rewrite or test suppression was used.

@vitormattos
vitormattos marked this pull request as ready for review November 24, 2026 13:51
@vitormattos
vitormattos requested a review from a team as a code owner November 24, 2026 13:51
@vitormattos
vitormattos merged commit 22f5e14 into stable35 Nov 24, 2026
64 checks passed
@vitormattos
vitormattos deleted the backport/9556/stable35 branch November 24, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants