Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-89

Better support for encrypted ZIP files

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0, 1.1
    • Fix Version/s: 1.1
    • Component/s: None
    • Labels:
      None

      Description

      Currently when the ZipArchiveInputStream or ZipFile encounters an encrypted zip it bails out with cryptic exceptions like: 'invalid block type'. I would like to have two things:

      1. an 'encrypted' flag in the ZipArchiveEntry class. It would be taken from the first bit of the 'general purpose flag'
      2. more descriptive error messages, both in ZipFile and ZipArchiveInputStream

      It might be useful in case someone wants to implement proper support for encrypted zips, with methods to supply passwords/encryption keys and proper encryption/decryption algorithms.

      For the time being I just need to know if a file is encrypted or not.

      I will post a patch with a proposal of a solution in near future.

        Attachments

        1. commons-compress-encrypted.patch
          16 kB
          Antoni Mylka
        2. ArchiveInputStream-canRead.patch
          4 kB
          Jukka Zitting
        3. apache-maven-2.2.1-encrypted-passhello.zip
          52 kB
          Antoni Mylka

          Activity

            People

            • Assignee:
              bodewig Stefan Bodewig
              Reporter:
              antheque Antoni Mylka
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: