Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3551

CLI Decrypt broken, only allows 1 argument

    Details

      Description

      This is about the Decrypt.java CLI wrapper fails when using certificates.

      Plain and simple. The following file just simply doesn't allow for more than one CLI argument: tools/src/main/java/org/apache/pdfbox/tools/Decrypt.java

      WHEN, I supply the argument keyStore and password, the usage documentation is thrown.

      WHEN, I hack the Decrypt.java CLI wrapper in tools, and allow the password AND keyStore arguments to BOTH be present, the decrypt works.

      The command I am trying to run:
      java -jar pdfbox-app-2.0.3.jar Decrypt -password password -keyStore keystore.p12 encrypted.pdf decrypted.pdf

      PDFBox CLI docs for decrypt WHERE clearly password AND keyStore need to be used together: http://pdfbox.apache.org/2.0/commandline.html#decrypt

      IN CLOSING, instead of fighting my case that the CLI Decrypt method is NOT working, I am choosing to keep it simple by stating fact that ONLY ONE argument is allowed OTHERWISE the usage docs are thrown.

      Thank you kindly. I have been able to rebuild the jar files with my own fix by using Maven to re-jar. I absolutely sure I am generating proper certs and p12 keyStore files and again I am successfully encrypting/decrypting with my update pdfbox.jar file

        Attachments

          Activity

            People

            • Assignee:
              msahyoun Maruan Sahyoun
              Reporter:
              ackerapple acker apple
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified