Feat/support jsignpdf 3 - #59
Merged
Merged
Conversation
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
…ration group Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
YvesCesar
marked this pull request as ready for review
September 2, 2026 14:11
vitormattos
requested changes
Sep 2, 2026
vitormattos
reviewed
Sep 2, 2026
vitormattos
reviewed
Sep 2, 2026
vitormattos
reviewed
Sep 2, 2026
vitormattos
reviewed
Sep 2, 2026
…stant Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
… path Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
…meters Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
… a plain executable Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
vitormattos
requested changes
Sep 3, 2026
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
vitormattos
reviewed
Sep 4, 2026
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
…ut of them Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
vitormattos
approved these changes
Sep 4, 2026
Contributor
|
Excellent work! |
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.
Related issue #52
Updates the wrapper to the current stable JSignPdf (3.1.0) and keeps every password out of the command line.
CLI differences between 2.3 and 3.1
--enable-stdin-passwordsplus-as the option value, read one line each in the fixed order-ksp,-kp,-opwd,-upwd,-tscp,-tspexec()toproc_open(), writing the passwords to stdinlib/directorycom.intoolswetrust.jsignpdf.Bootstrap), keeping-jaras a fallback for 3.0.x--overwritewas added and-akept as a no-opexample/index.phpnow passes--overwrite--versionoutput and theFinished: Signature succesfully created.messageWhat changed
Every value reaching the shell goes through
escapeshellarg(): the java binary, the jar or classpath, the PDF,-ksfand-d.No password is passed as an argument any more. Besides
setPassword(), the key, owner, user and TSA passwords have their own setters and are sent through stdin:Passing them to
setJSignParameters()as a list works too — the value is taken out of the command line just the same.setJSignParameters()accepts a list of options and values, which the package escapes.jsignpdf-3.1.0-minimal.zip.Compatibility
setJSignPdfDownloadUrl()orsetjSignPdfJarPath()at a 2.x release stops working. JSignPdf 3.x needs a Java 21+ runtime.--overwriteor a hash algorithm the PDF version supports.setJSignParameters()is still passed through unparsed, so a password written there does reach the command line. The README points to the setters and to the list form instead.Testing
integrationgroup runs the real JSignPdf — version, signing, visible signature with page and coordinates, explicit hash algorithm, more than one password on stdin, and the pre-1.6 failure. It runs in its own CI job and is excluded fromtest:unitand from coverage.