[#11481] - PDF export with security/encryption results in exception

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Feature
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

Either enabling PDF security in Jaspersoft Studio 6.6.0 (Comm. Ed.) preferences or adding following 4 properties
<property name="net.sf.jasperreports.export.pdf.encrypted" value="True"/>
<property name="net.sf.jasperreports.export.pdf.128.bit.key" value="True"/>
<property name="net.sf.jasperreports.export.pdf.user.password" value="mySuperPass"/>
<property name="net.sf.jasperreports.export.pdf.owner.password" value="mySuperPass"/>
results in following exception when exporting pdf, or preview:

java.lang.VerifyError: (class: com/lowagie/text/pdf/PdfPublicKeySecurityHandler, method: createDERForRecipient signature: ([BLjava/security/cert/X509Certificate;)Lorg/bouncycastle/asn1/ASN1Primitive;) Incompatible argument to function
at com.lowagie.text.pdf.PdfEncryption.<init>(Unknown Source)
at com.lowagie.text.pdf.PdfWriter.setEncryption(Unknown Source)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:720)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:552)
at com.jaspersoft.studio.editor.preview.actions.export.AExportAction.exportWithProgress(AExportAction.java:223)
at com.jaspersoft.studio.editor.preview.actions.export.AExportAction.doPreview(AExportAction.java:347)
at com.jaspersoft.studio.editor.preview.actions.export.AExportAction$3.run(AExportAction.java:191)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

The bug should be fixed in the library, server etc., too, if it exists (not yet tested).

See also: https://community.jaspersoft.com/questions/1112691/pdf-encryption-proper...

v6.6
franky4's picture
40
Joined: Jan 5 2016 - 2:15am
Last seen: 3 days 1 hour ago
Feedback