Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package bctoolbox for openSUSE:Factory checked in at 2023-03-08 14:53:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bctoolbox (Old) and /work/SRC/openSUSE:Factory/.bctoolbox.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bctoolbox" Wed Mar 8 14:53:40 2023 rev:41 rq:1070096 version:5.2.30 Changes: -------- --- /work/SRC/openSUSE:Factory/bctoolbox/bctoolbox.changes 2023-02-14 16:48:17.251457672 +0100 +++ /work/SRC/openSUSE:Factory/.bctoolbox.new.31432/bctoolbox.changes 2023-03-08 14:53:41.423041255 +0100 @@ -1,0 +2,6 @@ +Wed Mar 8 07:08:55 UTC 2023 - Paolo Stivanin <i...@paolostivanin.com> + +- Update to 5.2.30 (no changelog) +- Add set_curret_version.patch + +------------------------------------------------------------------- Old: ---- bctoolbox-5.2.16.tar.bz2 New: ---- bctoolbox-5.2.30.tar.bz2 set_curret_version.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bctoolbox.spec ++++++ --- /var/tmp/diff_new_pack.ovBEG1/_old 2023-03-08 14:53:42.059044718 +0100 +++ /var/tmp/diff_new_pack.ovBEG1/_new 2023-03-08 14:53:42.063044739 +0100 @@ -18,7 +18,7 @@ %define sover 1 Name: bctoolbox -Version: 5.2.16 +Version: 5.2.30 Release: 0 Summary: Utility library for software from Belledonne Communications License: GPL-3.0-or-later @@ -29,6 +29,7 @@ # PATCH-FIX-OPENSUSE bctoolbox-fix-pkgconfig.patch Patch0: bctoolbox-fix-pkgconfig.patch Patch1: gcc9-stringop-bogus-warning.patch +Patch2: set_curret_version.patch BuildRequires: bcunit-devel >= 3.0.2+git.20191119 BuildRequires: chrpath BuildRequires: cmake @@ -80,10 +81,8 @@ %autosetup -p1 %build -%if 0%{?fedora} == 36 -export CFLAGS=$(echo "$CFLAGS -Wno-error=maybe-uninitialized") -export CXXFLAGS=$(echo "$CXXFLAGS -Wno-error=maybe-uninitialized") -%endif +export CFLAGS=$(echo "$CFLAGS -Wno-error=maybe-uninitialized -Wno-error=unused-parameter") +export CXXFLAGS=$(echo "$CXXFLAGS -Wno-error=maybe-uninitialized -Wno-error=unused-parameter") %cmake -DENABLE_STATIC=OFF %cmake_build ++++++ bctoolbox-5.2.16.tar.bz2 -> bctoolbox-5.2.30.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/cmake/BcToolboxCMakeUtils.cmake new/bctoolbox-5.2.30/cmake/BcToolboxCMakeUtils.cmake --- old/bctoolbox-5.2.16/cmake/BcToolboxCMakeUtils.cmake 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/cmake/BcToolboxCMakeUtils.cmake 2023-03-02 10:21:14.000000000 +0100 @@ -42,7 +42,7 @@ list(APPEND ${CPP_FLAGS} "-Wno-error=unknown-warning-option" "-Qunused-arguments" "-Wno-tautological-compare" "-Wno-unused-function" "-Wno-array-bounds") endif() if(ENABLE_STRICT) - list(APPEND ${CPP_FLAGS} "-Werror" "-Wextra" "-Wno-unused-parameter" "-Wno-error=unknown-pragmas" "-Wuninitialized" "-Wno-missing-field-initializers" + list(APPEND ${CPP_FLAGS} "-Werror" "-Wextra" "-Wunused-parameter" "-Wno-error=unknown-pragmas" "-Wuninitialized" "-Wno-missing-field-initializers" "-fno-strict-aliasing" "-Wno-error=deprecated" "-Wno-error=deprecated-declarations") list(APPEND ${C_FLAGS} "-Werror" "-Wstrict-prototypes") endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/include/bctoolbox/crypto.h new/bctoolbox-5.2.30/include/bctoolbox/crypto.h --- old/bctoolbox-5.2.16/include/bctoolbox/crypto.h 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/include/bctoolbox/crypto.h 2023-03-02 10:21:14.000000000 +0100 @@ -101,16 +101,17 @@ #define BCTBX_ERROR_UNSUPPORTED_HASH_FUNCTION -0x70020008 /* SSL related */ +#define BCTBX_ERROR_NET_CONN_RESET -0x70030000 #define BCTBX_ERROR_INVALID_SSL_CONFIG -0x70030001 #define BCTBX_ERROR_INVALID_SSL_TRANSPORT -0x70030002 #define BCTBX_ERROR_INVALID_SSL_ENDPOINT -0x70030004 #define BCTBX_ERROR_INVALID_SSL_AUTHMODE -0x70030008 #define BCTBX_ERROR_INVALID_SSL_CONTEXT -0x70030010 -#define BCTBX_ERROR_NET_WANT_READ -0x70032000 -#define BCTBX_ERROR_NET_WANT_WRITE -0x70034000 +#define BCTBX_ERROR_NO_CLIENT_CERTIFICATE -0x70031000 +#define BCTBX_ERROR_NET_WANT_READ -0x70032000 +#define BCTBX_ERROR_NET_WANT_WRITE -0x70034000 #define BCTBX_ERROR_SSL_PEER_CLOSE_NOTIFY -0x70038000 -#define BCTBX_ERROR_NET_CONN_RESET -0x70030000 /* Symmetric ciphers related */ #define BCTBX_ERROR_AUTHENTICATION_FAILED -0x70040000 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/include/bctoolbox/defs.h new/bctoolbox-5.2.30/include/bctoolbox/defs.h --- old/bctoolbox-5.2.16/include/bctoolbox/defs.h 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/include/bctoolbox/defs.h 2023-03-02 10:21:14.000000000 +0100 @@ -30,5 +30,12 @@ #endif // __GNUC__ #endif // BCTBX_NO_BREAK +#ifndef BCTBX_UNUSED +#if (!defined(_WIN32) && (defined(__GNUC__) || defined(__clang__))) +#define BCTBX_UNUSED(x) x __attribute__((__unused__)) +#else +#define BCTBX_UNUSED(x) x +#endif //(!defined(_MSC_VER) && (defined(__GNUC__) || defined(__clang__))) +#endif // BCTBX_UNUSED #endif /* BCTBX_DEFS_H_ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/CMakeLists.txt new/bctoolbox-5.2.30/src/CMakeLists.txt --- old/bctoolbox-5.2.16/src/CMakeLists.txt 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/CMakeLists.txt 2023-03-02 10:21:14.000000000 +0100 @@ -101,6 +101,13 @@ bc_apply_compile_flags(BCTOOLBOX_OBJC_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_OBJC) bc_apply_compile_flags(BCTOOLBOX_IOS_OBJC_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_OBJC) +# Fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562 +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12 + AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) + set_source_files_properties(utils/regex.cc PROPERTIES COMPILE_OPTIONS "-Wno-error=maybe-uninitialized") +endif() + if(ENABLE_STATIC) add_library(bctoolbox-static STATIC ${BCTOOLBOX_SOURCE_FILES} ${BCTOOLBOX_HEADER_FILES} ${BCTOOLBOX_PRIVATE_HEADER_FILES}) target_link_libraries(bctoolbox-static INTERFACE ${CMAKE_THREAD_LIBS_INIT}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/conversion/charconv.cc new/bctoolbox-5.2.30/src/conversion/charconv.cc --- old/bctoolbox-5.2.16/src/conversion/charconv.cc 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/conversion/charconv.cc 2023-03-02 10:21:14.000000000 +0100 @@ -27,6 +27,7 @@ #include <locale.h> #include <string.h> +#include "bctoolbox/defs.h" #include "bctoolbox/charconv.h" #include "bctoolbox/logging.h" #include "bctoolbox/port.h" @@ -120,13 +121,13 @@ return convert_from_to(str, (from_encoding ? from_encoding : "LOCALE"), (to_encoding ? to_encoding : "LOCALE")); } -wchar_t* bctbx_string_to_wide_string(const char* str){ +wchar_t* bctbx_string_to_wide_string(BCTBX_UNUSED(const char* str)){ // TODO bctbx_error("Conversion from string to wide string is not implemented"); return NULL; } -unsigned int bctbx_get_code_page(const char* encoding){ +unsigned int bctbx_get_code_page(BCTBX_UNUSED(const char* encoding)){ bctbx_error("Getting code page is not implemented"); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/conversion/charconv_android.cc new/bctoolbox-5.2.30/src/conversion/charconv_android.cc --- old/bctoolbox-5.2.16/src/conversion/charconv_android.cc 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/conversion/charconv_android.cc 2023-03-02 10:21:14.000000000 +0100 @@ -24,6 +24,7 @@ #include "bctoolbox/charconv.h" #include "bctoolbox/logging.h" #include "bctoolbox/port.h" +#include "bctoolbox/defs.h" char *bctbx_locale_to_utf8 (const char *str) { // TODO remove this part when the NDK will contain a usable iconv @@ -35,29 +36,29 @@ return bctbx_strdup(str); } -char *bctbx_convert_any_to_utf8 (const char *str, const char *encoding) { +char *bctbx_convert_any_to_utf8 (const char *str, BCTBX_UNUSED(const char *encoding)) { // TODO change this part when the NDK will contain a usable iconv return bctbx_strdup(str); } -char *bctbx_convert_utf8_to_any (const char *str, const char *encoding) { +char *bctbx_convert_utf8_to_any (const char *str, BCTBX_UNUSED(const char *encoding)) { // TODO change this part when the NDK will contain a usable iconv return bctbx_strdup(str); } -char *bctbx_convert_string (const char *str, const char *from_encoding, const char *to_encoding) { +char *bctbx_convert_string (const char *str, BCTBX_UNUSED(const char *from_encoding), BCTBX_UNUSED(const char *to_encoding)) { // TODO change this part when the NDK will contain a usable iconv return bctbx_strdup(str); } -wchar_t* bctbx_string_to_wide_string(const char* str){ +wchar_t* bctbx_string_to_wide_string(BCTBX_UNUSED(const char* str)) { // TODO bctbx_error("Conversion from string to wide string is not implemented"); return NULL; } -unsigned int bctbx_get_code_page(const char* encoding){ +unsigned int bctbx_get_code_page(BCTBX_UNUSED(const char* encoding)) { bctbx_error("Getting code page is not implemented"); return 0; -} \ No newline at end of file +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/crypto/ecc.cc new/bctoolbox-5.2.30/src/crypto/ecc.cc --- old/bctoolbox-5.2.16/src/crypto/ecc.cc 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/crypto/ecc.cc 2023-03-02 10:21:14.000000000 +0100 @@ -21,6 +21,7 @@ #include "config.h" #endif +#include "bctoolbox/defs.h" #include <bctoolbox/crypto.h> #ifdef HAVE_DECAF @@ -181,7 +182,8 @@ } /* compute secret - the ->peerPublic field of context must have been set before calling this function */ -void bctbx_ECDHComputeSecret(bctbx_ECDHContext_t *context, int (*rngFunction)(void *, uint8_t *, size_t), void *rngContext) { +void bctbx_ECDHComputeSecret(bctbx_ECDHContext_t *context, int (*rngFunction)(void *, uint8_t *, size_t), BCTBX_UNUSED(void *rngContext)) { + ((void)rngFunction); if (context != NULL && context->secret!=NULL && context->peerPublic!=NULL) { if (context->sharedSecret == NULL) { /* allocate buffer if needed */ context->sharedSecret = (uint8_t *)bctbx_malloc(context->pointCoordinateLength); @@ -510,23 +512,32 @@ /* We do not have lib decaf, implement empty stubs */ int bctbx_crypto_have_ecc(void) { return FALSE;} -bctbx_ECDHContext_t *bctbx_CreateECDHContext(const uint8_t ECDHAlgo) {return NULL;} -void bctbx_ECDHCreateKeyPair(bctbx_ECDHContext_t *context, int (*rngFunction)(void *, uint8_t *, size_t), void *rngContext) {return;} -void bctbx_ECDHSetSecretKey(bctbx_ECDHContext_t *context, const uint8_t *secret, const size_t secretLength){return;} -void bctbx_ECDHSetSelfPublicKey(bctbx_ECDHContext_t *context, const uint8_t *selfPublic, const size_t selfPublicLength){return;} -void bctbx_ECDHSetPeerPublicKey(bctbx_ECDHContext_t *context, const uint8_t *peerPublic, const size_t peerPublicLength){return;} -void bctbx_ECDHDerivePublicKey(bctbx_ECDHContext_t *context){return;} -void bctbx_ECDHComputeSecret(bctbx_ECDHContext_t *context, int (*rngFunction)(void *, uint8_t *, size_t), void *rngContext){return;} -void bctbx_DestroyECDHContext(bctbx_ECDHContext_t *context){return;} - -bctbx_EDDSAContext_t *bctbx_CreateEDDSAContext(uint8_t EDDSAAlgo) {return NULL;} -void bctbx_EDDSACreateKeyPair(bctbx_EDDSAContext_t *context, int (*rngFunction)(void *, uint8_t *, size_t), void *rngContext) {return;} -void bctbx_EDDSADerivePublicKey(bctbx_EDDSAContext_t *context) {return;} -void bctbx_DestroyEDDSAContext(bctbx_EDDSAContext_t *context) {return;} -void bctbx_EDDSA_sign(bctbx_EDDSAContext_t *context, const uint8_t *message, const size_t messageLength, const uint8_t *associatedData, const uint8_t associatedDataLength, uint8_t *signature, size_t *signatureLength) {return;} -void bctbx_EDDSA_setPublicKey(bctbx_EDDSAContext_t *context, const uint8_t *publicKey, const size_t publicKeyLength) {return;} -void bctbx_EDDSA_setSecretKey(bctbx_EDDSAContext_t *context, const uint8_t *secretKey, const size_t secretKeyLength) {return;} -int bctbx_EDDSA_verify(bctbx_EDDSAContext_t *context, const uint8_t *message, size_t messageLength, const uint8_t *associatedData, const uint8_t associatedDataLength, const uint8_t *signature, size_t signatureLength) {return BCTBX_VERIFY_FAILED;} -void bctbx_EDDSA_ECDH_privateKeyConversion(const bctbx_EDDSAContext_t *ed, bctbx_ECDHContext_t *x) {return;} -void bctbx_EDDSA_ECDH_publicKeyConversion(const bctbx_EDDSAContext_t *ed, bctbx_ECDHContext_t *x, uint8_t isSelf) {return;} +bctbx_ECDHContext_t *bctbx_CreateECDHContext(BCTBX_UNUSED(const uint8_t ECDHAlgo)) {return NULL;} +void bctbx_ECDHCreateKeyPair(BCTBX_UNUSED(bctbx_ECDHContext_t *context), int (*rngFunction)(void *, uint8_t *, size_t), BCTBX_UNUSED(void *rngContext)) { + ((void)rngFunction); + return; +} +void bctbx_ECDHSetSecretKey(BCTBX_UNUSED(bctbx_ECDHContext_t *context),BCTBX_UNUSED( const uint8_t *secret),BCTBX_UNUSED( const size_t secretLength)){return;} +void bctbx_ECDHSetSelfPublicKey(BCTBX_UNUSED(bctbx_ECDHContext_t *context),BCTBX_UNUSED( const uint8_t *selfPublic),BCTBX_UNUSED( const size_t selfPublicLength)){return;} +void bctbx_ECDHSetPeerPublicKey(BCTBX_UNUSED(bctbx_ECDHContext_t *context),BCTBX_UNUSED( const uint8_t *peerPublic),BCTBX_UNUSED( const size_t peerPublicLength)){return;} +void bctbx_ECDHDerivePublicKey(BCTBX_UNUSED(bctbx_ECDHContext_t *context)){return;} +void bctbx_ECDHComputeSecret(BCTBX_UNUSED(bctbx_ECDHContext_t *context), int (*rngFunction)(void *, uint8_t *, size_t), BCTBX_UNUSED(void *rngContext)){ + ((void)rngFunction); + return; +} +void bctbx_DestroyECDHContext(BCTBX_UNUSED(bctbx_ECDHContext_t *context)){return;} + +bctbx_EDDSAContext_t *bctbx_CreateEDDSAContext(BCTBX_UNUSED(uint8_t EDDSAAlgo)) {return NULL;} +void bctbx_EDDSACreateKeyPair(BCTBX_UNUSED(bctbx_EDDSAContext_t *context), int (*rngFunction)(void *, uint8_t *, size_t), BCTBX_UNUSED(void *rngContext)) { + ((void)rngFunction); + return; +} +void bctbx_EDDSADerivePublicKey(BCTBX_UNUSED(bctbx_EDDSAContext_t *context)) {return;} +void bctbx_DestroyEDDSAContext(BCTBX_UNUSED(bctbx_EDDSAContext_t *context)) {return;} +void bctbx_EDDSA_sign(BCTBX_UNUSED(bctbx_EDDSAContext_t *context),BCTBX_UNUSED( const uint8_t *message),BCTBX_UNUSED( const size_t messageLength),BCTBX_UNUSED( const uint8_t *associatedData),BCTBX_UNUSED( const uint8_t associatedDataLength),BCTBX_UNUSED( uint8_t *signature),BCTBX_UNUSED( size_t *signatureLength)) {return;} +void bctbx_EDDSA_setPublicKey(BCTBX_UNUSED(bctbx_EDDSAContext_t *context),BCTBX_UNUSED( const uint8_t *publicKey),BCTBX_UNUSED( const size_t publicKeyLength)) {return;} +void bctbx_EDDSA_setSecretKey(BCTBX_UNUSED(bctbx_EDDSAContext_t *context),BCTBX_UNUSED( const uint8_t *secretKey),BCTBX_UNUSED( const size_t secretKeyLength)) {return;} +int bctbx_EDDSA_verify(BCTBX_UNUSED(bctbx_EDDSAContext_t *context),BCTBX_UNUSED( const uint8_t *message),BCTBX_UNUSED( size_t messageLength),BCTBX_UNUSED( const uint8_t *associatedData),BCTBX_UNUSED( const uint8_t associatedDataLength),BCTBX_UNUSED( const uint8_t *signature),BCTBX_UNUSED( size_t signatureLength)) {return BCTBX_VERIFY_FAILED;} +void bctbx_EDDSA_ECDH_privateKeyConversion(BCTBX_UNUSED(const bctbx_EDDSAContext_t *ed), BCTBX_UNUSED( bctbx_ECDHContext_t *x)) {return;} +void bctbx_EDDSA_ECDH_publicKeyConversion(BCTBX_UNUSED(const bctbx_EDDSAContext_t *ed), BCTBX_UNUSED( bctbx_ECDHContext_t *x),BCTBX_UNUSED( uint8_t isSelf)) {return;} #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/crypto/mbedtls.c new/bctoolbox-5.2.30/src/crypto/mbedtls.c --- old/bctoolbox-5.2.16/src/crypto/mbedtls.c 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/crypto/mbedtls.c 2023-03-02 10:21:14.000000000 +0100 @@ -48,7 +48,7 @@ #include "bctoolbox/crypto.h" #include "bctoolbox/logging.h" - +#include "bctoolbox/defs.h" /*** Cleaning ***/ /** @@ -903,8 +903,10 @@ if (ssl_ctx->callback_cli_cert_function(ssl_ctx->callback_cli_cert_data, ssl_ctx, names)!=0) { bctbx_list_free_with_data(names, bctbx_free); - if((ret=mbedtls_ssl_send_alert_message(&(ssl_ctx->ssl_ctx), MBEDTLS_SSL_ALERT_LEVEL_FATAL, MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE)) != 0 ) + if((ret=mbedtls_ssl_send_alert_message(&(ssl_ctx->ssl_ctx), MBEDTLS_SSL_ALERT_LEVEL_FATAL, MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE)) != 0 ) { return( ret ); + } + return BCTBX_ERROR_NO_CLIENT_CERTIFICATE; } bctbx_list_free_with_data(names, bctbx_free); } @@ -1327,7 +1329,7 @@ /* This callback is executed during the DTLS handshake, extract the master secret and randoms needed to generate the DTLS-SRTP keys * The generation itself is performed after the handshake */ static int bctbx_ssl_dtls_srtp_key_derivation(void *key_ctx, const unsigned char *ms, - const unsigned char *kb, size_t maclen, size_t keylen, size_t ivlen, // these params are useless for our purpose + BCTBX_UNUSED(const unsigned char * kb), BCTBX_UNUSED(size_t maclen), BCTBX_UNUSED(size_t keylen), BCTBX_UNUSED(size_t ivlen), // these params are useless for our purpose const unsigned char client_random[32], const unsigned char server_random[32], mbedtls_tls_prf_types tls_prf_type ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/crypto/mbedtls.cc new/bctoolbox-5.2.30/src/crypto/mbedtls.cc --- old/bctoolbox-5.2.16/src/crypto/mbedtls.cc 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/crypto/mbedtls.cc 2023-03-02 10:21:14.000000000 +0100 @@ -32,8 +32,7 @@ #include <mbedtls/hkdf.h> // HKDF implemented in version 2.11.0 of mbedtls #endif - - +#include "bctoolbox/defs.h" #include "bctoolbox/crypto.hh" #include "bctoolbox/crypto.h" #include "bctoolbox/exception.hh" @@ -132,7 +131,7 @@ /* HMAC templates */ /* HMAC must use a specialized template */ template <typename hashAlgo> -std::vector<uint8_t> HMAC(const std::vector<uint8_t> &key, const std::vector<uint8_t> &input) { +std::vector<uint8_t> HMAC(BCTBX_UNUSED(const std::vector<uint8_t> &key), BCTBX_UNUSED(const std::vector<uint8_t> &input)) { /* if this template is instanciated the static_assert will fail but will give us an error message */ static_assert(sizeof(hashAlgo) != sizeof(hashAlgo), "You must specialize HMAC function template"); return std::vector<uint8_t>(0); @@ -170,13 +169,13 @@ /* HKDF templates */ /* HKDF must use a specialized template */ template <typename hashAlgo> -std::vector<uint8_t> HKDF(const std::vector<uint8_t> &salt, const std::vector<uint8_t> &ikm, const std::vector<uint8_t> &info, size_t okmSize) { +std::vector<uint8_t> HKDF(BCTBX_UNUSED(const std::vector<uint8_t> &salt), BCTBX_UNUSED(const std::vector<uint8_t> &ikm), BCTBX_UNUSED(const std::vector<uint8_t> &info), BCTBX_UNUSED(size_t okmSize)) { /* if this template is instanciated the static_assert will fail but will give us an error message */ static_assert(sizeof(hashAlgo) != sizeof(hashAlgo), "You must specialize HKDF function template"); return std::vector<uint8_t>(0); } template <typename hashAlgo> -std::vector<uint8_t> HKDF(const std::vector<uint8_t> &salt, const std::vector<uint8_t> &ikm, const std::string &info, size_t okmSize) { +std::vector<uint8_t> HKDF(BCTBX_UNUSED(const std::vector<uint8_t> &salt), BCTBX_UNUSED(const std::vector<uint8_t> &ikm), BCTBX_UNUSED(const std::string &info), BCTBX_UNUSED(size_t okmSize)) { /* if this template is instanciated the static_assert will fail but will give us an error message */ static_assert(sizeof(hashAlgo) != sizeof(hashAlgo), "You must specialize HKDF function template"); @@ -293,16 +292,16 @@ /*****************************************************************************/ /* AEAD template must be specialized */ template <typename AEADAlgo> -std::vector<uint8_t> AEADEncrypt(const std::vector<uint8_t> &key, const std::vector<uint8_t> IV, const std::vector<uint8_t> &plain, const std::vector<uint8_t> &AD, - std::vector<uint8_t> &tag) { +std::vector<uint8_t> AEADEncrypt(BCTBX_UNUSED(const std::vector<uint8_t> &key), BCTBX_UNUSED(const std::vector<uint8_t> IV), BCTBX_UNUSED(const std::vector<uint8_t> &plain), BCTBX_UNUSED(const std::vector<uint8_t> &AD), + BCTBX_UNUSED(std::vector<uint8_t> &tag)) { /* if this template is instanciated the static_assert will fail but will give us an error message with faulty type */ static_assert(sizeof(AEADAlgo) != sizeof(AEADAlgo), "You must specialize AEADEncrypt function template"); return std::vector<uint8_t>(0); } template <typename AEADAlgo> -bool AEADDecrypt(const std::vector<uint8_t> &key, const std::vector<uint8_t> &IV, const std::vector<uint8_t> &cipher, const std::vector<uint8_t> &AD, - const std::vector<uint8_t> &tag, std::vector<uint8_t> &plain) { +bool AEADDecrypt(BCTBX_UNUSED(const std::vector<uint8_t> &key), BCTBX_UNUSED(const std::vector<uint8_t> &IV), BCTBX_UNUSED(const std::vector<uint8_t> &cipher), BCTBX_UNUSED(const std::vector<uint8_t> &AD), + BCTBX_UNUSED(const std::vector<uint8_t> &tag), BCTBX_UNUSED(std::vector<uint8_t> &plain)) { /* if this template is instanciated the static_assert will fail but will give us an error message with faulty type */ static_assert(sizeof(AEADAlgo) != sizeof(AEADAlgo), "You must specialize AEADEncrypt function template"); return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/logging/logging.c new/bctoolbox-5.2.30/src/logging/logging.c --- old/bctoolbox-5.2.16/src/logging/logging.c 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/logging/logging.c 2023-03-02 10:21:14.000000000 +0100 @@ -21,6 +21,7 @@ #include "config.h" #endif +#include "bctoolbox/defs.h" #include "bctoolbox/logging.h" #ifdef _WIN32 @@ -156,7 +157,7 @@ return &main_logger; } -void bctbx_init_logger(bool_t create) { +void bctbx_init_logger(BCTBX_UNUSED(bool_t create)) { bctbx_get_logger(); } @@ -589,7 +590,7 @@ bctbx_logv_out_cb(NULL, domain, lev, fmt, args); } /*This function does the default formatting and output to file*/ -void bctbx_logv_out_cb(void* user_info, const char *domain, BctbxLogLevel lev, const char *fmt, va_list args){ +void bctbx_logv_out_cb(BCTBX_UNUSED(void* user_info), const char *domain, BctbxLogLevel lev, const char *fmt, va_list args){ const char *lname="undef"; char *msg; struct timeval tp; @@ -834,6 +835,10 @@ bctbx_logv_out_destroy(handler); } +#ifndef _MSC_VER +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif // _MSC_VER void bctbx_set_thread_log_level(const char *domain, BctbxLogLevel level){ #ifdef THREAD_LOG_LEVEL_ENABLED BctoolboxLogDomain * ld = get_log_domain(domain); @@ -844,8 +849,14 @@ ld->thread_level_set = TRUE; #endif } - - +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif // _MSC_VER + +#ifndef _MSC_VER +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif // _MSC_VER void bctbx_clear_thread_log_level(const char *domain){ #ifdef THREAD_LOG_LEVEL_ENABLED BctoolboxLogDomain * ld = get_log_domain(domain); @@ -853,7 +864,9 @@ if (specific) *specific = 0; #endif } - +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif // _MSC_VER #ifdef __QNX__ #include <slog2.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/tester.c new/bctoolbox-5.2.30/src/tester.c --- old/bctoolbox-5.2.16/src/tester.c 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/tester.c 2023-03-02 10:21:14.000000000 +0100 @@ -24,6 +24,7 @@ #include <bctoolbox/logging.h> #include <bctoolbox/tester.h> #include <bctoolbox/vfs.h> +#include <bctoolbox/defs.h> #include <stdlib.h> #include <time.h> @@ -401,7 +402,7 @@ } } -static void all_complete_message_handler(const CU_pFailureRecord pFailure) { +static void all_complete_message_handler(BCTBX_UNUSED(const CU_pFailureRecord pFailure)) { #ifdef HAVE_CU_GET_SUITE if (run_in_parallel != 0) { if (suite_name) { @@ -434,7 +435,7 @@ suite_start_time = bctbx_get_cur_time_ms(); bc_current_suite_name = pSuite->pName; } -static void suite_complete_message_handler(const CU_pSuite pSuite, const CU_pFailureRecord pFailure) { +static void suite_complete_message_handler(const CU_pSuite pSuite, BCTBX_UNUSED(const CU_pFailureRecord pFailure)) { bc_tester_printf(bc_printf_verbosity_info, "Suite [%s] ended in %.3f sec\n", pSuite->pName, (bctbx_get_cur_time_ms() - suite_start_time) / 1000.f); } @@ -1203,13 +1204,13 @@ } //Default function for the `--verbose`cli option -int bc_tester_verbose_handler(const char *arg) { +int bc_tester_verbose_handler(BCTBX_UNUSED(const char * arg)) { bctbx_set_log_level(BCTBX_LOG_DOMAIN, BCTBX_LOG_DEBUG); return 0; } //Default function for the `--silent` cli option -int bc_tester_silent_handler(const char *arg) { +int bc_tester_silent_handler(BCTBX_UNUSED(const char *arg)) { bctbx_set_log_level(BCTBX_LOG_DOMAIN, BCTBX_LOG_FATAL); return 0; } @@ -1254,6 +1255,10 @@ } } +#ifndef _MSC_VER +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif // _MSC_VER void bc_tester_set_max_vm(size_t amax_vm_kb) { #ifdef __linux__ max_vm_kb = (size_t)amax_vm_kb; @@ -1262,6 +1267,9 @@ bc_tester_printf(bc_printf_verbosity_error, "Maximum virtual memory space setting is only implemented on Linux."); #endif } +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif // _MSC_VER void bc_tester_helper(const char *name, const char* additionnal_helper) { bc_tester_printf(bc_printf_verbosity_info, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/utils/ios_utils.mm new/bctoolbox-5.2.30/src/utils/ios_utils.mm --- old/bctoolbox-5.2.16/src/utils/ios_utils.mm 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/utils/ios_utils.mm 2023-03-02 10:21:14.000000000 +0100 @@ -24,6 +24,7 @@ #import <Foundation/Foundation.h> #include <dlfcn.h> +#include "bctoolbox/defs.h" #include "bctoolbox/ios_utils.hh" #include "bctoolbox/exception.hh" #include "bctoolbox/logging.h" @@ -122,11 +123,11 @@ } -unsigned long IOSUtilsStub::beginBackgroundTask(const char *name, std::function<void()> cb) { +unsigned long IOSUtilsStub::beginBackgroundTask(BCTBX_UNUSED(const char *name), BCTBX_UNUSED(std::function<void()> cb)) { return 0; } -void IOSUtilsStub::endBackgroundTask(unsigned long id) {} +void IOSUtilsStub::endBackgroundTask(BCTBX_UNUSED(unsigned long id)) {} bool IOSUtilsStub::isApplicationStateActive() { return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/utils/port.c new/bctoolbox-5.2.30/src/utils/port.c --- old/bctoolbox-5.2.16/src/utils/port.c 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/utils/port.c 2023-03-02 10:21:14.000000000 +0100 @@ -22,6 +22,7 @@ #include "config.h" #endif +#include "bctoolbox/defs.h" #include "bctoolbox/logging.h" #include "bctoolbox/port.h" #include "bctoolbox/vconnect.h" @@ -916,6 +917,10 @@ #include <sys/timeb.h> #endif +#ifndef _MSC_VER +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif // _MSC_VER void _bctbx_get_cur_time(bctoolboxTimeSpec *ret, bool_t realtime){ #if defined(_WIN32_WCE) || defined(WIN32) #if defined(BCTBX_WINDOWS_DESKTOP) && !defined(ENABLE_MICROSOFT_STORE_APP) && !defined(BCTBX_WINDOWS_UWP) @@ -952,6 +957,9 @@ ret->tv_nsec=ts.tv_nsec; #endif } +#ifndef _MSC_VER +#pragma GCC diagnostic pop +#endif // _MSC_VER void bctbx_get_utc_cur_time(bctoolboxTimeSpec *ret){ _bctbx_get_cur_time(ret, TRUE); @@ -2017,7 +2025,7 @@ } #if !defined(_WIN32) -void bctbx_set_stack_trace_hooks(bool_t use_bctbx_hooks){ +void bctbx_set_stack_trace_hooks(BCTBX_UNUSED(bool_t use_bctbx_hooks)){ bctbx_warning("bctbx_set_stack_trace_hooks(): not implemented on this platform."); } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/vfs/vfs_encrypted.cc new/bctoolbox-5.2.30/src/vfs/vfs_encrypted.cc --- old/bctoolbox-5.2.16/src/vfs/vfs_encrypted.cc 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/vfs/vfs_encrypted.cc 2023-03-02 10:21:14.000000000 +0100 @@ -18,6 +18,7 @@ */ +#include "bctoolbox/defs.h" #include "bctoolbox/vfs.h" #include "bctoolbox/vfs_encrypted.hh" #include "vfs_encryption_module.hh" @@ -875,9 +876,7 @@ bcIsEncrypted }; - - -static int bcOpen(bctbx_vfs_t *pVfs, bctbx_vfs_file_t *pFile, const char *fName, int openFlags) { +static int bcOpen(BCTBX_UNUSED(bctbx_vfs_t *pVfs), bctbx_vfs_file_t *pFile, const char *fName, int openFlags) { VfsEncryption *ctx = nullptr; bctbx_vfs_file_t *stdFp = nullptr; try { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.2.16/src/vfs/vfs_standard.c new/bctoolbox-5.2.30/src/vfs/vfs_standard.c --- old/bctoolbox-5.2.16/src/vfs/vfs_standard.c 2023-01-16 09:38:20.000000000 +0100 +++ new/bctoolbox-5.2.30/src/vfs/vfs_standard.c 2023-03-02 10:21:14.000000000 +0100 @@ -21,6 +21,7 @@ #include "config.h" #endif +#include "bctoolbox/defs.h" #include "bctoolbox/vfs.h" #include "bctoolbox/port.h" #include "bctoolbox/logging.h" @@ -28,8 +29,6 @@ #include <stdarg.h> #include <errno.h> - - /** * Opens the file with filename fName, associate it to the file handle pointed * by pFile, sets the methods bctbx_io_methods_t to the bcio structure @@ -210,7 +209,7 @@ -static int bcOpen(bctbx_vfs_t *pVfs, bctbx_vfs_file_t *pFile, const char *fName, int openFlags) { +static int bcOpen(BCTBX_UNUSED(bctbx_vfs_t * pVfs), bctbx_vfs_file_t *pFile, const char *fName, int openFlags) { if (pFile == NULL || fName == NULL) { return BCTBX_VFS_ERROR; } ++++++ set_curret_version.patch ++++++ --- bctoolbox-5.2.30/CMakeLists.txt.orig 2023-03-08 08:46:24.562116821 +0100 +++ bctoolbox-5.2.30/CMakeLists.txt 2023-03-08 08:46:31.346153166 +0100 @@ -28,7 +28,7 @@ cmake_policy(SET CMP0077 NEW) endif() -project(bctoolbox VERSION 5.2.0) +project(bctoolbox VERSION 5.2.30) set(BCTOOLBOX_VERSION "${PROJECT_VERSION}") set(BCTOOLBOX_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})