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

Svante Schubert commented on ODFTOOLKIT-403:
--------------------------------------------

Hi Damjan,

sorry for the long delay, work occupied me and obvious others. I am back at the 
ODF Toolkit and would love to have a regression test. Afterwards, I would work 
myself into your further questions.

At the beginning of the week, I fixed the ordering of two encryption related 
elements in the manifest.xml so the ODF document is valid again.

Thanks for your help so far and again my apologies for the long absense (the 
latter part one year parental absence!)
Svante

> ODF decryption errors
> ---------------------
>
>                 Key: ODFTOOLKIT-403
>                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-403
>             Project: ODF Toolkit
>          Issue Type: Bug
>          Components: odfdom
>            Reporter: Damjan Jovanovic
>         Attachments: decryption.patch
>
>
> Patching my way through ODFTOOLKIT-401 and ODFTOOLKIT-402, I now get one of 
> these errors when it come to decrypting the file:
> {quote}
> Aug 02, 2015 10:51:12 AM org.odftoolkit.odfdom.pkg.OdfPackage decryptData
> SEVERE: null
> java.security.InvalidAlgorithmParameterException: Wrong IV length: must be 8 
> bytes long
>       at com.sun.crypto.provider.CipherCore.init(CipherCore.java:430)
>       at 
> com.sun.crypto.provider.BlowfishCipher.engineInit(BlowfishCipher.java:222)
>       at javax.crypto.Cipher.implInit(Cipher.java:796)
>       at javax.crypto.Cipher.chooseProvider(Cipher.java:854)
>       at javax.crypto.Cipher.init(Cipher.java:1374)
>       at javax.crypto.Cipher.init(Cipher.java:1308)
>       at 
> org.odftoolkit.odfdom.pkg.OdfPackage.decryptData(OdfPackage.java:1897)
>       at org.odftoolkit.odfdom.pkg.OdfPackage.getBytes(OdfPackage.java:1729)
>       at 
> org.odftoolkit.odfdom.pkg.OdfPackage.getInputStream(OdfPackage.java:2018)
>       at org.odftoolkit.odfdom.pkg.OdfFileDom.initialize(OdfFileDom.java:210)
>       at 
> org.odftoolkit.odfdom.dom.OdfContentDom.initialize(OdfContentDom.java:60)
>       at org.odftoolkit.odfdom.pkg.OdfFileDom.<init>(OdfFileDom.java:105)
>       at org.odftoolkit.odfdom.dom.OdfContentDom.<init>(OdfContentDom.java:50)
>       at org.odftoolkit.odfdom.pkg.OdfFileDom.newFileDom(OdfFileDom.java:157)
>       at 
> org.odftoolkit.odfdom.pkg.OdfPackageDocument.getFileDom(OdfPackageDocument.java:323)
>       at 
> org.odftoolkit.odfdom.dom.OdfSchemaDocument.getFileDom(OdfSchemaDocument.java:405)
>       at 
> org.odftoolkit.odfdom.dom.OdfSchemaDocument.getContentDom(OdfSchemaDocument.java:206)
>       at org.odftoolkit.simple.Document.getContentRoot(Document.java:870)
>       at 
> org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:327)
>       at 
> org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:114)
>       at local.Main.main(Main.java:22)
> Exception in thread "main" java.lang.NullPointerException
>       at org.odftoolkit.simple.Document.getContentRoot(Document.java:872)
>       at 
> org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:327)
>       at 
> org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:114)
>       at local.Main.main(Main.java:22)
> {quote}
> or this one (when the password is wrong):
> {quote}
> Aug 02, 2015 10:56:21 AM org.odftoolkit.odfdom.pkg.OdfPackage decryptData
> SEVERE: null
> org.odftoolkit.odfdom.pkg.OdfDecryptedException: The given password is wrong, 
> please check it.
>       at 
> org.odftoolkit.odfdom.pkg.OdfPackage.decryptData(OdfPackage.java:1914)
>       at org.odftoolkit.odfdom.pkg.OdfPackage.getBytes(OdfPackage.java:1729)
>       at 
> org.odftoolkit.odfdom.pkg.OdfPackage.getInputStream(OdfPackage.java:2018)
>       at org.odftoolkit.odfdom.pkg.OdfFileDom.initialize(OdfFileDom.java:210)
>       at 
> org.odftoolkit.odfdom.dom.OdfContentDom.initialize(OdfContentDom.java:60)
>       at org.odftoolkit.odfdom.pkg.OdfFileDom.<init>(OdfFileDom.java:105)
>       at org.odftoolkit.odfdom.dom.OdfContentDom.<init>(OdfContentDom.java:50)
>       at org.odftoolkit.odfdom.pkg.OdfFileDom.newFileDom(OdfFileDom.java:157)
>       at 
> org.odftoolkit.odfdom.pkg.OdfPackageDocument.getFileDom(OdfPackageDocument.java:323)
>       at 
> org.odftoolkit.odfdom.dom.OdfSchemaDocument.getFileDom(OdfSchemaDocument.java:405)
>       at 
> org.odftoolkit.odfdom.dom.OdfSchemaDocument.getContentDom(OdfSchemaDocument.java:206)
>       at org.odftoolkit.simple.Document.getContentRoot(Document.java:870)
>       at 
> org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:327)
>       at 
> org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:114)
>       at local.Main.main(Main.java:22)
> Exception in thread "main" java.lang.NullPointerException
>       at org.odftoolkit.simple.Document.getContentRoot(Document.java:872)
>       at 
> org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:327)
>       at 
> org.odftoolkit.simple.TextDocument.getContentRoot(TextDocument.java:114)
>       at local.Main.main(Main.java:22)
> {quote}
> Note how both actually come through as NullPointerException, while the 
> original exception is logged earlier.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to