Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable29] feat: allow to change signature hash algorithm #4191

Merged
merged 6 commits into from
Dec 24, 2024

Conversation

backportbot-libresign[bot]
Copy link

@backportbot-libresign backportbot-libresign bot commented Dec 24, 2024

Backport of #4183

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

Todo

  • Review and resolve any conflicts
  • Remove all the empty commits
  • 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.

When we make a patch at a signature request, the signature method need
to be always returned and this continue was removing the signature
methods from return object.

Signed-off-by: Vitor Mattos <[email protected]>
Signed-off-by: Vitor Mattos <[email protected]>
The default hash algorithm of JSignPdf is SHA1 and with this change was
defined SHA256 as default hash algorithm and make possible choose
between the allowed algorithms: SHA1, SHA256, SHA384, SHA512, RIPEMD160.

To don't throw the follow message, was implemented a logic to identify the
right algorithm to sign the document depending of PDF version but the
implemented algorithm usign the prefix of PDF file, isn't effective. The
best way to identify the pdf version is using the command pdfinfo of
poppler-utils.

Signed-off-by: Vitor Mattos <[email protected]>
@vitormattos vitormattos force-pushed the backport/4183/stable29 branch from 34f8596 to c663c0a Compare December 24, 2024 03:49
@vitormattos vitormattos merged commit 52dcdbc into stable29 Dec 24, 2024
59 checks passed
@vitormattos vitormattos deleted the backport/4183/stable29 branch December 24, 2024 04:01
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.

1 participant