[stable33] fix(jsignpdf): improve the diagnosis of TSA failures - #8277
Merged
Conversation
checkTsaError() and checkHashAlgorithmError() throw before the logger->error() call in signWrapper(), so the original message from JSignPdf never reached nextcloud.log. That message is the only place where the real cause of a signing failure is described: the reporter of #8145 found it by running JSignPdf by hand. Log first, then translate the error into the friendly message the user sees. Signed-off-by: André Maia <andrefnkmm@gmail.com> Assisted-by: Claude Code:claude-opus-5
checkTsaError() triggers on TSAClientBouncyCastle, UnknownHostException and Invalid TSA, and always asked the admin to check DNS, network and firewall connectivity. When the authority answers with an HTTP status the server was reached and rejected the request, so that hint points at the wrong place: Certum replies 400 to a SHA-1 timestamp query, and #8145 reports the connectivity message for it. Report the status and the endpoint that answered in those cases, and point at what the authority expects. UnknownHostException and Invalid TSA keep the current message, where the connectivity hint is correct. Signed-off-by: André Maia <andrefnkmm@gmail.com> Assisted-by: Claude Code:claude-opus-5
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.
Backport of PR #8274