Compare commits

...
10 Commits
Author SHA1 Message Date
Nathan Moinvaziri 99d39015e2 Version 3.0.3. 2021-09-06 12:44:00 -07:00
Andreas Schnebinger 1d7bcb4ecb Use only major project version as soversion 2021-09-01 16:55:13 -07:00
Björn Esser 6390942e90 minizip.pc: Ensure variables point to an absolute path.
With commit 503bfd5c17 the CMake _IMPORT_PREFIX has been
changed to relative paths.  This breaks the paths reflected
by the auto-generated pkgconfig file, as pkgconfig expects
those paths to be absolute.

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2021-09-01 08:42:38 -07:00
Matthew Krupcale 313b3d0380 pc: use absolute lib directory
INSTALL_LIB_DIR is set to CMAKE_INSTALL_LIB_DIR, and while CMAKE_INSTALL_PREFIX
is prepended during install [1], this is not the case for the pkg-config
file. Thus, use the full absolute path CMAKE_INSTALL_FULL_LIBDIR for generating
the pkg-config file lib directory variables.

[1] https://gitlab.kitware.com/cmake/cmake/-/issues/20250
2021-08-31 13:08:44 -07:00
lawadr a59538c168 Replace use of GNU C definitions with standard definitions to allow compilation with non-GNU C conforming compilers 2021-08-31 10:15:46 -07:00
Nigel Tao d42634cb73 Make mz_crypt_openssl.c work with BoringSSL
BoringSSL does not provide cms.h but this is an optional dependency for
minizip, conditional on defined(MZ_ZIP_SIGNING).

For the functions called by mz_crypt_init:
- The OpenSSL_add_all_algorithms function is declared in evp.h.
  OpenSSL's hmac.h includes evp.h but BoringSSL's hmac.h does not.
- The ERR_* functions are declared in err.h in both.
- The ENGINE_* functions are declared in engine.h in OpenSSL but are in
  crypto.h for BoringSSL.
2021-07-10 09:46:08 -07:00
Sergey Markelov 3fae108930 Fix not recognized AppleClang for Xcode when building fuzzer executables 2021-06-28 11:13:58 -07:00
Issam Maghni b05d6676fe Use newer tests flag 2021-05-26 10:45:14 -07:00
Sergey Markelov e67f033a1f Fix memory leak if mz_zip_writer_add_path fails. 2021-05-21 11:08:02 -07:00
vaedermakar 6ac264c394 Fixed typo on line 89. 2021-05-14 09:47:02 -07:00
7 changed files with 31 additions and 22 deletions
+3 -3
View File
@@ -66,10 +66,10 @@ endif()
enable_language(C)
# Library version
set(VERSION "3.0.2")
set(VERSION "3.0.3")
# API version
set(SOVERSION "3.0")
set(SOVERSION "3")
include(CheckLibraryExists)
include(CheckSymbolExists)
@@ -945,7 +945,7 @@ endif()
#Build fuzzer executables
if(MZ_BUILD_FUZZ_TESTS)
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
enable_language(CXX)
if(DEFINED ENV{LIB_FUZZING_ENGINE})
+2 -2
View File
@@ -1,4 +1,4 @@
# minizip-ng 3.0.2
# minizip-ng 3.0.3
minizip-ng is a zip manipulation library written in C that is supported on Windows, macOS, and Linux.
@@ -59,7 +59,7 @@ To generate project files for your platform:
2. Run cmake in the minizip directory.
```
cmake . -DMZ_BUILD_TEST=ON
cmake . -DMZ_BUILD_TESTS=ON
cmake --build .
```
+3 -3
View File
@@ -1,8 +1,8 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@INSTALL_LIB_DIR@
sharedlibdir=@INSTALL_LIB_DIR@
includedir=@INSTALL_INC_DIR@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
sharedlibdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: @PROJECT_NAME@
Description: Minizip zip file manipulation library
+10 -10
View File
@@ -14,8 +14,8 @@
/***************************************************************************/
/* MZ_VERSION */
#define MZ_VERSION ("3.0.2")
#define MZ_VERSION_BUILD (030002)
#define MZ_VERSION ("3.0.3")
#define MZ_VERSION_BUILD (030003)
/* MZ_ERROR */
#define MZ_OK (0) /* zlib */
@@ -168,28 +168,28 @@
# endif
#endif
#ifndef __INT8_TYPE__
#ifndef INT8_MAX
typedef signed char int8_t;
#endif
#ifndef __INT16_TYPE__
#ifndef INT16_MAX
typedef short int16_t;
#endif
#ifndef __INT32_TYPE__
#ifndef INT32_MAX
typedef int int32_t;
#endif
#ifndef __INT64_TYPE__
#ifndef INT64_MAX
typedef long long int64_t;
#endif
#ifndef __UINT8_TYPE__
#ifndef UINT8_MAX
typedef unsigned char uint8_t;
#endif
#ifndef __UINT16_TYPE__
#ifndef UINT16_MAX
typedef unsigned short uint16_t;
#endif
#ifndef __UINT32_TYPE__
#ifndef UINT32_MAX
typedef unsigned int uint32_t;
#endif
#ifndef __UINT64_TYPE__
#ifndef UINT64_MAX
typedef unsigned long long uint64_t;
#endif
+10 -1
View File
@@ -16,10 +16,19 @@
#include <openssl/rand.h>
#include <openssl/sha.h>
#include <openssl/aes.h>
#include <openssl/crypto.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/pkcs12.h>
#if defined(MZ_ZIP_SIGNING)
/* Note: https://www.imperialviolet.org/2015/10/17/boringssl.html says that
BoringSSL does not support CMS. "#include <etc/cms.h>" will fail. See
https://bugs.chromium.org/p/boringssl/issues/detail?id=421
*/
#include <openssl/cms.h>
#include <openssl/pkcs12.h>
#include <openssl/x509.h>
#endif
/***************************************************************************/
+2 -2
View File
@@ -1690,11 +1690,11 @@ int32_t mz_zip_writer_add_path(void *handle, const char *path, const char *root_
err = mz_zip_writer_add_path(handle, full_path, root_path, include_path, recursive);
if (err != MZ_OK)
return err;
break;
}
mz_os_close_dir(dir);
return MZ_OK;
return err;
}
int32_t mz_zip_writer_copy_from_reader(void *handle, void *reader) {
+1 -1
View File
@@ -86,7 +86,7 @@ int32_t mz_zip_reader_entry_is_dir(void *handle);
/* Gets the current entry is a directory */
int32_t mz_zip_reader_entry_save(void *handle, void *stream, mz_stream_write_cb write_cb);
/* Save the current entry to a steam */
/* Save the current entry to a stream */
int32_t mz_zip_reader_entry_save_process(void *handle, void *stream, mz_stream_write_cb write_cb);
/* Saves a portion of the current entry to a stream callback */