You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Aleksandr Beliakov (Jira)" <ji...@apache.org> on 2024/10/17 14:57:00 UTC
[jira] [Created] (PDFBOX-5888) Replace IOException on PDF decryption
Aleksandr Beliakov created PDFBOX-5888:
------------------------------------------
Summary: Replace IOException on PDF decryption
Key: PDFBOX-5888
URL: https://issues.apache.org/jira/browse/PDFBOX-5888
Project: PDFBox
Issue Type: Improvement
Affects Versions: 2.0.32
Reporter: Aleksandr Beliakov
This ticket is continuation of PDFBOX-5805, with the idea to extend generic _IOException_ with new exception classes and return a specialized exception in case of error on processing.
If the previous error concerned an issue on PDF parsing, this one throws an exception on an error of decrypting an encrypted PDF:
{code:java}
Caused by: java.io.IOException: Provided decryption material is not compatible with the document - did you pass a null keyStore?
at org.apache.pdfbox.pdmodel.encryption.PublicKeySecurityHandler.prepareForDecryption(PublicKeySecurityHandler.java:127)
at org.apache.pdfbox.pdfparser.COSParser.prepareDecryption(COSParser.java:2993)
at org.apache.pdfbox.pdfparser.COSParser.retrieveTrailer(COSParser.java:286)
at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:171)
at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:231)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1235)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1171) {code}
Could you please take a look on both of the issues?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org