Commit Graph

115 Commits

Author SHA1 Message Date
Nathan Moinvaziri
54dffe95e9 Version 2.7.1. 2018-11-01 10:40:24 -07:00
Nathan Moinvaziri
0bff08751b Fixed compiler errors and warnings on linux. 2018-10-30 15:31:49 -07:00
Nathan Moinvaziri
ea5e45dfe2 Initial support for other encodings. #330 2018-10-30 13:59:17 -07:00
Nathan Moinvaziri
1e21dc3a9b Added additional check for required signing. 2018-10-30 09:03:42 -07:00
Nathan Moinvaziri
a221da4ae0 Version 2.7.0. 2018-10-28 16:47:53 -07:00
Nathan Moinvaziri
703b3df3ef Added option to require a signature during extracting.
Added new sign error.
2018-10-28 16:41:20 -07:00
Nathan Moinvaziri
05e03cad8e Added additional error codes to aid in debugging. 2018-10-28 16:15:13 -07:00
Nathan Moinvaziri
619b2b3c8b Fixed compiler errors and warnings. 2018-10-28 12:36:15 -07:00
Nathan Moinvaziri
fac97955d1 Simplify search for matching signature hash. 2018-10-28 11:37:37 -07:00
Nathan Moinvaziri
37b4da07f1 Move zip cd logic into zip reader/writer.
Fixed compiler error due to #define.
2018-10-27 18:19:18 -07:00
Nathan Moinvaziri
cb9c40c23d Fixed bugs in cms generation corrupting the message in openssl.
Don't generate sha256 hash or sign when entry is a directory.
Fixed not printing adding file when new entry is added.
2018-10-27 15:32:28 -07:00
Nathan Moinvaziri
915c513abe Fixed winzip aes encryption with zero byte files.
Allow greater buffer to be passed in for hashing functions.
Fixed crc32 values not being stored in zip.
When reading zip get best hash to test against in signature.
Fixed formatting.
2018-10-26 20:00:52 -07:00
Nathan Moinvaziri
217cd65995 Fixed entry sign not using variables passed in.
Move more configurations to linux for better warnings in logs.
Fixed path to openssl in mac configuration.
Fixed compiler errors.
2018-10-26 01:29:34 -07:00
Nathan Moinvaziri
bc21a7456b Fixed compiler error in openssl crypto.
Fixed compiler warnings.
2018-10-26 01:10:20 -07:00
Nathan Moinvaziri
80d30e6bf8 Possibly fixed openssl travis configurations. 2018-10-26 00:49:33 -07:00
Nathan Moinvaziri
1770d3554e Fixed no encryption configuration.
Added more possible configurations.
2018-10-26 00:18:50 -07:00
Nathan Moinvaziri
6bde034147 Fixed compiler warnings. 2018-10-25 22:05:13 -07:00
Nathan Moinvaziri
f97c9f48b2 Fixed compiler warnings.
Fixed brg not compiling into project.
2018-10-25 21:50:15 -07:00
Nathan Moinvaziri
d2dc11ca57 Fixed compiler errors and warnings. 2018-10-25 21:36:35 -07:00
Nathan Moinvaziri
d45af6d6e9 Fixed compiler errors and warnings. 2018-10-25 21:31:23 -07:00
Nathan Moinvaziri
648f596a99 Implemented crypt using OpenSSL for linux/mac.
Renamed aes folder after source author Brian Gladman.
Added SHA2 source files.
Added USE_OPENSSL option to cmake.
Changed hash that is stored in zip to SHA256.
Commented out timestamping in windows since openssl does not support out of box.
2018-10-25 19:35:50 -07:00
Nathan Moinvaziri
8cb7df741a Moved cp437 encoding function to zip class.
Removed util class and moved shared functions into mz_os.
Added USE_COMPAT to cmake which turns on/off compatibility layer.
2018-10-25 08:39:48 -07:00
Nathan Moinvaziri
5f09188ca9 Move cryptography functions to crypt source and header files.
Added pbkdf2 function to wzaes stream.
Changed wzaes stream to use os crypt functions.
2018-10-24 18:06:08 -07:00
Nathan Moinvaziri
21a3102db4 Combine os level headers.
Moved os utility functions into util class.
2018-10-24 09:50:16 -07:00
Nathan Moinvaziri
e1f68fca9c Added signing support for zip (windows only rn).
Moved sha1 hash into zip reader/writer.
Added sha2 library.
2018-10-23 09:04:04 -07:00
Nathan Moinvaziri
fa620e473f Added ability to zip/unzip central dir.
Added ability to set extra flags with zip writer.
Changed mask name to be unique based off disk number and offset.
Fixed bug with storing directories when encryption turned on.
2018-10-20 10:37:10 -07:00
Nathan Moinvaziri
ff6f2a1db6 Version 2.6.0. 2018-10-08 23:48:58 -07:00
Nathan Moinvaziri
5e6bac5bcc Updated comments. 2018-10-08 23:47:02 -07:00
Nathan Moinvaziri
904c408575 Fixed compiler warnings. 2018-10-08 23:31:21 -07:00
Nathan Moinvaziri
e6b6616575 Fixed compiler warnings. 2018-10-08 22:40:38 -07:00
Nathan Moinvaziri
2bb21d769c Fixed bugs reading posix file attributes. 2018-10-08 21:47:15 -07:00
Nathan Moinvaziri
ca8059ef61 Version 2.5.4. 2018-09-30 10:44:16 -07:00
Nathan Moinvaziri
9ba3525779
Merge pull request #317 from vszakats/unconst
mz_zip_reader_entry_read: remove const from buf parameter
2018-09-19 08:35:11 -07:00
Viktor Szakats
9980d8ac3a mz_zip_reader_entry_read: remove const from buf parameter 2018-09-19 14:31:25 +00:00
Viktor Szakats
9747212a14 mz_zip_writer_open_file: fix passing userdata pointer to overwrite_cb 2018-09-19 08:44:59 +00:00
Nathan Moinvaziri
825bfb8fbf Version 2.5.3. 2018-09-18 20:34:01 -07:00
Nathan Moinvaziri
0863941638 Merge branch 'master' into dev 2018-09-18 20:30:37 -07:00
Nathan Moinvaziri
5469018dbc Fixed formatting. 2018-09-18 20:25:48 -07:00
Christer Fletcher
72538543aa Add mz_zip_[reader,writer]_set_progress_interval
With mz_zip_reader_set_progress_interval the user can specify how
often in milliseconds the progress callback should be called. This
makes it possible to make a smoother progress bar when using
minizip from a GUI application.
2018-09-18 19:52:44 +02:00
Nathan Moinvaziri
e09ea0e515 Merge branch 'master' into dev 2018-09-17 07:44:45 -07:00
Christer Fletcher
fa25b2ecc4 Make sure progress_cb is called every second
The time comparison was wrong and thus progress_cb was called every
second second instead of every second as intended.
2018-09-13 08:37:50 +02:00
Nathan Moinvaziri
777db81e88
Fixed formatting 2018-09-10 08:50:29 -07:00
Viktor Szakats
e7215072a0 enable warnings for gcc/clang, misc minor fixes
* enable -W -Wall for gcc and clang
* fix strncpy() calls that may potentially leave the target buffer without
  a terminating zero byte (in mz_zip_rw.c)
* fix warnings
* remove const from mz_path_remove_filename() parameter,
  the function is writing the passed buffer
* fix pedantic warnings (in mz_strm_buf.c):
  warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
* fix spaces at EOL
* fix a redefinition warning for HAVE_ARC4RANDOM_BUF on macOS
2018-09-04 22:58:02 +00:00
Nathan Moinvaziri
85d36c5e83 Clean up includes. #306 2018-08-31 16:43:41 -07:00
Nathan Moinvaziri
351b14e512 Version 2.5.2. 2018-08-27 19:06:59 -07:00
Nathan Moinvaziri
b8300ce0ea Added support for CP437 into mz_zip_reader and minizip. 2018-08-27 08:30:57 -07:00
Nathan Moinvaziri
638f31ff41 Move CP437 encoding handling higher up the stack. 2018-08-27 08:17:16 -07:00
Nathan Moinvaziri
e27af27b6e Merge branch 'dev' of https://github.com/nmoinvaz/minizip into dev 2018-08-23 17:03:11 -07:00
Nathan Moinvaziri
72cc7015a2 Added easy check to see if entry is a directory. 2018-08-23 17:03:03 -07:00
shintaro-t
dcd9b72bf9 fix mem_stream leak. 2018-08-22 10:55:31 +09:00
Nathan Moinvaziri
d2aa2277d9 Removed debug code.
Fixed compiler warnings.
2018-08-20 18:23:50 -07:00
Nathan Moinvaziri
4b8e4b372c Set the file attributes for the correct system for extracted files.
Added reading of time from info-zip unix extra field v1.
2018-08-20 09:06:23 -07:00
Nathan Moinvaziri
2b3cd16b6f Version 2.5.1. 2018-08-18 08:14:27 -07:00
Nathan Moinvaziri
444596646e Added encryption header sizes for apps that need it in mz header.
Fixed memory stream not closing in zip reader/writer.
2018-08-16 15:08:59 -07:00
Nathan Moinvaziri
c98dec4291 Version 2.5.0. 2018-08-15 07:37:30 -07:00
Nathan Moinvaziri
ca014e6f37 Fixed wrong check for writing to stream. #295 2018-08-15 07:31:12 -07:00
Nathan Moinvaziri
00520cd631 Fixed linux compiler warnings.
Fixed bug not reading into correct buffer when using read func with zip reader.
2018-08-14 17:09:24 -07:00
Nathan Moinvaziri
c56d53156e Remove unused variable. 2018-08-14 15:59:41 -07:00
Nathan Moinvaziri
05aa0f2a07 Fixed error with file info being NULL after locate entry. 2018-08-14 15:59:19 -07:00
Nathan Moinvaziri
829ffb5cce Fixed check for directory if path ends with slash.
Fixed return error if compression method is not supported.
2018-08-14 14:00:16 -07:00
Nathan Moinvaziri
b635b7db5a Rename get entry info function for consistency.
Added output path param to entry callback on reader.
Removed unused variables.
2018-08-14 12:49:51 -07:00
Nathan Moinvaziri
9f863b35ca Add zip file entry helpers to zip reader/writer. 2018-08-14 09:20:17 -07:00
Nathan Moinvaziri
de09ac796f Fixed empty zip test. 2018-08-13 23:48:40 -07:00
Nathan Moinvaziri
a8644a1de8 Fixed const mix-match. 2018-08-13 23:20:02 -07:00
Nathan Moinvaziri
9a170d4d60 Added zip reader/writer class to encapsulate a lot of functionality.
Added create/delete functions for zip class.
Simplify locating an entry by filename.
Added more advanced functions for locating an entry based on callback decision.
Change default mem grow size to 64kb since we have unzOpen_MZ and zipOpen_MZ. #283
2018-08-13 23:07:42 -07:00