[ 
https://issues.apache.org/jira/browse/PDFBOX-2460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14190606#comment-14190606
 ] 

John Hewson edited comment on PDFBOX-2460 at 10/30/14 6:54 PM:
---------------------------------------------------------------

Mystery solved, I had TestPublicKeyEncryption set in my IDE to run against 
Apple's JDK 6 which does have unlimited security. Usually I use JDK 7 for tests.

There's still something odd going on though, having switched to JDK 7 for that 
test, I now get "InvalidKeyException: Illegal key size or default parameters" 
in PublicKeySecurityHandler#prepareDocumentForEncryption, as expected, however 
the "keyLength" variable in that method is 40 and on my JDK 7 
Cipher.getMaxAllowedKeyLength("AES") is 128.


was (Author: jahewson):
Mystery solved, I had TestPublicKeyEncryption set in my IDE to run against 
Apple's JDK 6 which does have unlimited security. Usually I use JDK 7 for tests.

There's still something odd going on though, I now get "InvalidKeyException: 
Illegal key size or default parameters" in 
PublicKeySecurityHandler#prepareDocumentForEncryption, as expected, however the 
"keyLength" variable in that method is 40 and on my JDK 7 
Cipher.getMaxAllowedKeyLength("AES") is 128.

> fix TestPublicKeyEncryption.java
> --------------------------------
>
>                 Key: PDFBOX-2460
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2460
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.0.0
>         Environment: java7 , deb7
>            Reporter: Ralf Hauser
>            Assignee: Tilman Hausherr
>             Fix For: 2.0.0
>
>         Attachments: patch2460Decryption.txt, patch2460DecryptionVerbose.txt, 
> patch2460PublicKeyTestCaseOnError.txt
>
>
> as reported by Tilman in PDFBOX-2456



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to