Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Target
artcraft-android/pdfcraft-androidmainvksp2k7/pdfcraft-androidfeat/digital-signature-upstream-portf94bc3eaed0134b86782a68427eed972c9705a96Summary
This ports the upstream (
storytold/pdfcraft) digital-signature implementation into the Android fork and completes the Android-side validation/trust flow. In particular, trusting a signer now invalidates the engine and Android rendering caches, so the signature appearance changes immediately from unverified to validated without reopening the document.Validated signatures use the same visual style as Adobe Acrobat (green check / tick mark overlaid in the signature widget). This matches the appearance users expect from Acrobat (see issue 79). A simple background tick circle is intentionally avoided because some users require the same style as Acrobat’s tick sign.
Scope relative to upstream PR 2808:
This Android PR is not a port of that desktop PR and does not claim to supersede or fully re-implement everything it does. Upstream PR 2808 focuses on desktop named-layer status redraw (n1/n3/n4), Lucide icons, multi-language captions, ActualText extraction changes, redaction interactions with outline captions, and a hardened signature-field walk. This branch instead:
It therefore solves the same core user-visible problem that PR 2808 targets on desktop (validated appearance updates live after trust, matching Acrobat) for the Android product, plus the full signing/validation port that Android was missing. It does not include the desktop-only layers of PR 2808 (named-layer detection heuristics, Lucide embedding into page content, ActualText/redaction changes, field-walk memory caps, etc.).
What changed
pdfcraft-cos::Documentfunctionality required by signature validation:User-visible behavior
Verification
Passed:
cargo fmt --all -- --checkgit diff --checkcargo test -p pdfcraft-coscargo test -p pdfcraft-signcargo test -p pdfcraft-automation./gradlew testDebugUnitTest --no-daemonassembleReleaseusing a temporary sample PKCS#12 release keyThe following targeted signature regressions now pass normally rather than being ignored:
Known unrelated workspace issues
"auick brown fox jumps over the lazy dog"instead of the expected"quick brown fox jumps over the lazy dog". The failure is unrelated to the signature changes; the other 217 engine tests passed in the full run.clippy::items-after-test-modulelint incrates/cos/src/lib.rs. This is unrelated to the signature changes and is not introduced by this branch.Review notes
The Android trust-refresh change is intentionally small: it refreshes the open document after
sign_trustupdates the engine. The signature-validation and cache-correctness behavior is covered by the cos and signing regression tests listed above.The appearance work here deliberately follows Acrobat’s green-tick style for the same user requirement that motivated the upstream desktop work; it is the Android-side solution to the live validated-appearance problem, not a re-implementation of every detail of the desktop PR.