[ 
https://issues.apache.org/jira/browse/PDFBOX-5423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Datta updated PDFBOX-5423:
--------------------------
    Description: 
Hi
I am using pdfbox-2.024.jar and java is 1.8. 
I am unable download the pdf.
Even after adding the unlimited jce policy it is not working. throwing same 
error. 
Kindly advice the fix for the same. I am blocked as I am unable to download the 
content.
Execption:-
WARNING: JCE unlimited strength jurisdiction policy files are not installed
2022-04-25 14:43:15 [p: default-threadpool; w: Idle] ERROR Trace:58 - Errors 
occurred on downloading care plan.
java.io.IOException: java.security.InvalidKeyException: Illegal key size
at 
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareEncryptionDictRev6(StandardSecurityHandler.java:474)
 ~[pdfbox-app-2.0.24.jar:2.0.24]
at 
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareDocumentForEncryption(StandardSecurityHandler.java:378)
 ~[pdfbox-app-2.0.24.jar:2.0.24]

 

Code:-


*int keyLength=256;*
*final* StandardProtectionPolicy policy = *new* StandardProtectionPolicy("pdf",

        "", accessPermission);

    policy.setEncryptionKeyLength(keyLength);

    policy.setPreferAES(*true*);

    policy.setPermissions(accessPermission);

    *return* policy;

 

  was:
Hi
I am using pdfbox-2.024.jar and java is 1.8. 
I am unable download the pdf.
Even after adding the unlimited jce policy it is not working. throwing same 
error. 
Kindly advice the fix for the same. I am blocked as I am unable to download the 
content.
Execption:-
WARNING: JCE unlimited strength jurisdiction policy files are not installed
2022-04-25 14:43:15 [p: default-threadpool; w: Idle] ERROR Trace:58 - Errors 
occurred on downloading care plan.
java.io.IOException: java.security.InvalidKeyException: Illegal key size
        at 
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareEncryptionDictRev6(StandardSecurityHandler.java:474)
 ~[pdfbox-app-2.0.24.jar:2.0.24]
        at 
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareDocumentForEncryption(StandardSecurityHandler.java:378)
 ~[pdfbox-app-2.0.24.jar:2.0.24]


> org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler 
> logIfStrongEncryptionMissing
> -----------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-5423
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5423
>             Project: PDFBox
>          Issue Type: Task
>          Components: Crypto
>    Affects Versions: 2.0.24
>            Reporter: Datta
>            Priority: Blocker
>
> Hi
> I am using pdfbox-2.024.jar and java is 1.8. 
> I am unable download the pdf.
> Even after adding the unlimited jce policy it is not working. throwing same 
> error. 
> Kindly advice the fix for the same. I am blocked as I am unable to download 
> the content.
> Execption:-
> WARNING: JCE unlimited strength jurisdiction policy files are not installed
> 2022-04-25 14:43:15 [p: default-threadpool; w: Idle] ERROR Trace:58 - Errors 
> occurred on downloading care plan.
> java.io.IOException: java.security.InvalidKeyException: Illegal key size
> at 
> org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareEncryptionDictRev6(StandardSecurityHandler.java:474)
>  ~[pdfbox-app-2.0.24.jar:2.0.24]
> at 
> org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareDocumentForEncryption(StandardSecurityHandler.java:378)
>  ~[pdfbox-app-2.0.24.jar:2.0.24]
>  
> Code:-
> *int keyLength=256;*
> *final* StandardProtectionPolicy policy = *new* 
> StandardProtectionPolicy("pdf",
>         "", accessPermission);
>     policy.setEncryptionKeyLength(keyLength);
>     policy.setPreferAES(*true*);
>     policy.setPermissions(accessPermission);
>     *return* policy;
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to