Franz Forsthofer created CAMEL-7320:
---------------------------------------

             Summary: PGP Data Format: EOFException: Unexpected end of ZIP 
input stream
                 Key: CAMEL-7320
                 URL: https://issues.apache.org/jira/browse/CAMEL-7320
             Project: Camel
          Issue Type: Bug
          Components:  camel-crypto
    Affects Versions: 2.13.0, 2.12.3
            Reporter: Franz Forsthofer
             Fix For: 2.12.4, 2.13.1, 2.14.0
         Attachments: 0001-pgp-EOF-exception-for-Encrypted-Data-Packet.patch

If you call the PGP Data Format unmarshaller with a PGP message containing a 
PGP Encrypted Data packet and a Singature packet then you get the following 
exception

java.io.EOFException: Unexpected end of ZIP input stream
        at org.bouncycastle.openpgp.PGPCompressedData$1.fill(Unknown Source)
        at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
        at org.bouncycastle.bcpg.BCPGInputStream.read(Unknown Source)
        at 
org.bouncycastle.bcpg.BCPGInputStream$PartialInputStream.read(Unknown Source)
        at org.bouncycastle.bcpg.BCPGInputStream.read(Unknown Source)
        at org.bouncycastle.util.io.Streams.readFully(Unknown Source)
        at org.bouncycastle.bcpg.BCPGInputStream.readFully(Unknown Source)
        at org.bouncycastle.bcpg.BCPGInputStream.readFully(Unknown Source)
        at org.bouncycastle.bcpg.MPInteger.<init>(Unknown Source)
        at org.bouncycastle.bcpg.SignaturePacket.<init>(Unknown Source)
        at org.bouncycastle.bcpg.BCPGInputStream.readPacket(Unknown Source)
        at org.bouncycastle.openpgp.PGPSignature.<init>(Unknown Source)
        at org.bouncycastle.openpgp.PGPObjectFactory.nextObject(Unknown Source)
        at 
org.apache.camel.converter.crypto.PGPKeyAccessDataFormat.verifySignature(PGPKeyAccessDataFormat.java:474)
        at 
org.apache.camel.converter.crypto.PGPKeyAccessDataFormat.unmarshal(PGPKeyAccessDataFormat.java:405)

The provided patch is for 2.13 and 2.14. The patch must be adapted for 2.12.

The problem also occurs with the other compression algorithms ZLIB and BZIP2.
Regards Franz



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to