Skip to content

[stable35] feat(tsa): let administrators choose the hash algorithm of the timestamp query - #8283

Merged
vitormattos merged 3 commits into
stable35from
backport/8276/stable35
Sep 6, 2026
Merged

[stable35] feat(tsa): let administrators choose the hash algorithm of the timestamp query#8283
vitormattos merged 3 commits into
stable35from
backport/8276/stable35

Conversation

@backportbot-libresign

@backportbot-libresign backportbot-libresign Bot commented Sep 6, 2026

Copy link
Copy Markdown

Backport of #8276

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.

The hash of the timestamp query was never configurable: JSignPdf decided it
alone, and #8145 reports authorities rejecting the request because of that
choice. It belongs to the TSA settings, next to the URL, the policy OID and
the authentication, so every tenant that configures its own authority can
also say what that authority expects.

SHA256 is the default and keeps what JSignPdf 3.1.0 already does. SHA1 is
not offered: it is the algorithm the authorities in the report refuse.

Signed-off-by: André Maia <andrefnkmm@gmail.com>
Assisted-by: Claude Code:claude-opus-5
…uthority

JSignPdf decided the timestamp hash by itself, and the authorities in #8145
answer HTTP 400 when that choice is not the one they expect. Send
--tsa-hash-algorithm from the TSA policy instead, spelled the way JSignPdf
wants it (SHA-256, with the hyphen, unlike --hash-algorithm).

The resolver answers this hash on its own, never from the signature one:
that one follows the PDF version and would ask for SHA1 on any document
older than PDF 1.6, which is the request the authority rejects.

The php native engine reads the same policy, so it stops being pinned to
SHA-256 and follows what the administrator chose.

Signed-off-by: André Maia <andrefnkmm@gmail.com>
Assisted-by: Claude Code:claude-opus-5
The algorithm of the timestamp query is now part of the TSA policy, so it
belongs next to the URL, the policy OID and the authentication: the
administrator who knows which authority is being used is the one who knows
what it accepts.

The select offers SHA-256, SHA-384 and SHA-512, spelled the way the
authorities document them, and defaults to SHA-256.

Signed-off-by: André Maia <andrefnkmm@gmail.com>
Assisted-by: Claude Code:claude-opus-5
@vitormattos
vitormattos force-pushed the backport/8276/stable35 branch from b599a8d to de4510a Compare September 6, 2026 17:34
@vitormattos
vitormattos marked this pull request as ready for review September 6, 2026 17:52
@vitormattos
vitormattos merged commit 5b7cae5 into stable35 Sep 6, 2026
65 of 67 checks passed
@github-project-automation github-project-automation Bot moved this from 0. Backlog to 4. to release in Roadmap Sep 6, 2026
@vitormattos
vitormattos deleted the backport/8276/stable35 branch September 6, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

2 participants