From d829ec6e440f436e6138ed9d247b476a188e4122 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sun, 27 Apr 2025 23:49:02 +0800 Subject: [PATCH] disable gcrypt backend per upstream --- backport-xmlsec1-1.2.x-ATTRIBUTE_UNUSED.patch | 1425 +++++++++++++++++ xmlsec1.spec | 20 +- 2 files changed, 1434 insertions(+), 11 deletions(-) create mode 100644 backport-xmlsec1-1.2.x-ATTRIBUTE_UNUSED.patch diff --git a/backport-xmlsec1-1.2.x-ATTRIBUTE_UNUSED.patch b/backport-xmlsec1-1.2.x-ATTRIBUTE_UNUSED.patch new file mode 100644 index 0000000..b44b99e --- /dev/null +++ b/backport-xmlsec1-1.2.x-ATTRIBUTE_UNUSED.patch @@ -0,0 +1,1425 @@ +From 1c02a7741f4e93f4927e0f2b176f05d248b4797f Mon Sep 17 00:00:00 2001 +From: Aleksey Sanin +Date: Fri, 25 Apr 2025 17:47:46 -0400 +Subject: [PATCH 1/2] (xmlsec-core) Rename ATTRIBUTE_UNUSED to + XMLSEC_ATTRIBUTE_UNUSED and fix includes + +--- + include/xmlsec/private.h | 8 ++++---- + src/gcrypt/app.c | 25 +++++++++++++------------ + src/gcrypt/asymkeys.c | 5 +++-- + src/gcrypt/hmac.c | 4 ++-- + src/gcrypt/kw_aes.c | 2 +- + src/gcrypt/kw_des.c | 4 ++-- + src/gcrypt/signatures.c | 5 +++-- + src/gcrypt/symkeys.c | 3 ++- + src/gnutls/app.c | 5 +++-- + src/gnutls/x509vfy.c | 2 +- + src/keysmngr.c | 2 +- + src/mscng/app.c | 3 ++- + src/mscng/certkeys.c | 5 +++-- + src/mscng/hmac.c | 6 +++--- + src/mscng/kt_rsa.c | 6 +++--- + src/mscng/kw_aes.c | 2 +- + src/mscng/kw_des.c | 4 ++-- + src/mscng/x509vfy.c | 3 ++- + src/mscrypto/app.c | 13 +++++++------ + src/mscrypto/certkeys.c | 9 +++++---- + src/mscrypto/hmac.c | 5 +++-- + src/mscrypto/kt_rsa.c | 6 +++--- + src/mscrypto/kw_aes.c | 2 +- + src/mscrypto/kw_des.c | 2 +- + src/mscrypto/symkeys.c | 3 ++- + src/mscrypto/x509vfy.c | 3 ++- + src/nodeset.c | 2 +- + src/nss/app.c | 19 ++++++++++--------- + src/nss/hmac.c | 6 +++--- + src/nss/keysstore.c | 3 ++- + src/nss/kw_aes.c | 2 +- + src/nss/kw_des.c | 6 +++--- + src/nss/pkikeys.c | 10 +++++----- + src/nss/symkeys.c | 3 ++- + src/nss/x509vfy.c | 4 ++-- + src/openssl/app.c | 12 ++++++------ + src/openssl/ciphers.c | 4 ++-- + src/openssl/evp.c | 16 ++++++++-------- + src/openssl/hmac.c | 4 ++-- + src/openssl/kt_rsa.c | 12 ++++++------ + src/openssl/kw_aes.c | 2 +- + src/openssl/kw_des.c | 8 ++++---- + src/openssl/symkeys.c | 2 +- + src/openssl/x509vfy.c | 4 ++-- + src/skeleton/app.c | 15 ++++++++------- + 45 files changed, 144 insertions(+), 127 deletions(-) + +diff --git a/include/xmlsec/private.h b/include/xmlsec/private.h +index 0e3552c6..46718979 100644 +--- a/include/xmlsec/private.h ++++ b/include/xmlsec/private.h +@@ -507,16 +507,16 @@ struct _xmlSecCryptoDLFunctions { + }; + + /** +- * ATTRIBUTE_UNUSED: ++ * XMLSEC_ATTRIBUTE_UNUSED: + * + * Macro used to signal to GCC unused function parameters + */ + #ifdef __GNUC__ +-#ifndef ATTRIBUTE_UNUSED +-#define ATTRIBUTE_UNUSED ++#ifndef XMLSEC_ATTRIBUTE_UNUSED ++#define XMLSEC_ATTRIBUTE_UNUSED + #endif + #else +-#define ATTRIBUTE_UNUSED ++#define XMLSEC_ATTRIBUTE_UNUSED + #endif + + /** +diff --git a/src/gcrypt/app.c b/src/gcrypt/app.c +index 7f52d0a1..9aac4052 100644 +--- a/src/gcrypt/app.c ++++ b/src/gcrypt/app.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -41,7 +42,7 @@ + * Returns: 0 on success or a negative value otherwise. + */ + int +-xmlSecGCryptAppInit(const char* config ATTRIBUTE_UNUSED) { ++xmlSecGCryptAppInit(const char* config XMLSEC_ATTRIBUTE_UNUSED) { + gcry_error_t err; + /* Secure memory initialisation based on documentation from: + http://www.gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html +@@ -214,9 +215,9 @@ xmlSecGCryptAppKeyLoad(const char *filename, xmlSecKeyDataFormat format, + xmlSecKeyPtr + xmlSecGCryptAppKeyLoadMemory(const xmlSecByte* data, xmlSecSize dataSize, + xmlSecKeyDataFormat format, +- const char *pwd ATTRIBUTE_UNUSED, +- void* pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) ++ const char *pwd XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) + { + xmlSecKeyPtr key = NULL; + xmlSecKeyDataPtr key_data = NULL; +@@ -337,9 +338,9 @@ xmlSecGCryptAppKeyCertLoadMemory(xmlSecKeyPtr key, + */ + xmlSecKeyPtr + xmlSecGCryptAppPkcs12Load(const char *filename, +- const char *pwd ATTRIBUTE_UNUSED, +- void* pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ const char *pwd XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecAssert2(filename != NULL, NULL); + + /* TODO */ +@@ -363,9 +364,9 @@ xmlSecGCryptAppPkcs12Load(const char *filename, + */ + xmlSecKeyPtr + xmlSecGCryptAppPkcs12LoadMemory(const xmlSecByte* data, xmlSecSize dataSize, +- const char *pwd ATTRIBUTE_UNUSED, +- void* pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ const char *pwd XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecAssert2(data != NULL, NULL); + xmlSecAssert2(dataSize > 0, NULL); + +@@ -391,7 +392,7 @@ int + xmlSecGCryptAppKeysMngrCertLoad(xmlSecKeysMngrPtr mngr, + const char *filename, + xmlSecKeyDataFormat format, +- xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++ xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecAssert2(mngr != NULL, -1); + xmlSecAssert2(filename != NULL, -1); + xmlSecAssert2(format != xmlSecKeyDataFormatUnknown, -1); +@@ -419,7 +420,7 @@ xmlSecGCryptAppKeysMngrCertLoadMemory(xmlSecKeysMngrPtr mngr, + const xmlSecByte* data, + xmlSecSize dataSize, + xmlSecKeyDataFormat format, +- xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++ xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecAssert2(mngr != NULL, -1); + xmlSecAssert2(data != NULL, -1); + xmlSecAssert2(dataSize > 0, -1); +diff --git a/src/gcrypt/asymkeys.c b/src/gcrypt/asymkeys.c +index e7768142..1361f181 100644 +--- a/src/gcrypt/asymkeys.c ++++ b/src/gcrypt/asymkeys.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #include + +@@ -728,7 +729,7 @@ xmlSecGCryptKeyDataDsaFinalize(xmlSecKeyDataPtr data) { + } + + static int +-xmlSecGCryptKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecGCryptKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecAssert2(xmlSecKeyDataCheckId(data, xmlSecGCryptKeyDataDsaId), -1); + xmlSecAssert2(sizeBits > 0, -1); + +@@ -1242,7 +1243,7 @@ xmlSecGCryptKeyDataRsaFinalize(xmlSecKeyDataPtr data) { + } + + static int +-xmlSecGCryptKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecGCryptKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecAssert2(xmlSecKeyDataCheckId(data, xmlSecGCryptKeyDataRsaId), -1); + xmlSecAssert2(sizeBits > 0, -1); + +diff --git a/src/gcrypt/hmac.c b/src/gcrypt/hmac.c +index b5ff829c..ba832746 100644 +--- a/src/gcrypt/hmac.c ++++ b/src/gcrypt/hmac.c +@@ -247,7 +247,7 @@ xmlSecGCryptHmacFinalize(xmlSecTransformPtr transform) { + */ + static int + xmlSecGCryptHmacNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecGCryptHmacCtxPtr ctx; + int ret; + +@@ -333,7 +333,7 @@ xmlSecGCryptHmacSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + static int + xmlSecGCryptHmacVerify(xmlSecTransformPtr transform, + const xmlSecByte* data, xmlSecSize dataSize, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + static xmlSecByte last_byte_masks[] = + { 0xFF, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; + +diff --git a/src/gcrypt/kw_aes.c b/src/gcrypt/kw_aes.c +index c0b4ff19..1cdeaa9c 100644 +--- a/src/gcrypt/kw_aes.c ++++ b/src/gcrypt/kw_aes.c +@@ -207,7 +207,7 @@ xmlSecGCryptKWAesSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecGCryptKWAesExecute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecGCryptKWAesCtxPtr ctx; + int ret; + +diff --git a/src/gcrypt/kw_des.c b/src/gcrypt/kw_des.c +index ab860175..4c6c8cec 100644 +--- a/src/gcrypt/kw_des.c ++++ b/src/gcrypt/kw_des.c +@@ -233,7 +233,7 @@ xmlSecGCryptKWDes3SetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecGCryptKWDes3Execute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecGCryptKWDes3CtxPtr ctx; + int ret; + +@@ -313,7 +313,7 @@ xmlSecGCryptKWDes3Sha1(xmlSecTransformPtr transform, + } + + static int +-xmlSecGCryptKWDes3GenerateRandom(xmlSecTransformPtr transform ATTRIBUTE_UNUSED, ++xmlSecGCryptKWDes3GenerateRandom(xmlSecTransformPtr transform XMLSEC_ATTRIBUTE_UNUSED, + xmlSecByte * out, xmlSecSize outSize, + xmlSecSize * outWritten) { + UNREFERENCED_PARAMETER(transform); +diff --git a/src/gcrypt/signatures.c b/src/gcrypt/signatures.c +index a53ee638..0bf79f4e 100644 +--- a/src/gcrypt/signatures.c ++++ b/src/gcrypt/signatures.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include + +@@ -597,7 +598,7 @@ xmlSecGCryptAppendMpi(gcry_mpi_t a, xmlSecBufferPtr out, xmlSecSize min_size) { + * + ***************************************************************************/ + static int +-xmlSecGCryptDsaPkSign(int digest ATTRIBUTE_UNUSED, xmlSecKeyDataPtr key_data, ++xmlSecGCryptDsaPkSign(int digest XMLSEC_ATTRIBUTE_UNUSED, xmlSecKeyDataPtr key_data, + const xmlSecByte* dgst, xmlSecSize dgstSize, + xmlSecBufferPtr out) { + gcry_mpi_t m_hash = NULL; +@@ -729,7 +730,7 @@ done: + } + + static int +-xmlSecGCryptDsaPkVerify(int digest ATTRIBUTE_UNUSED, xmlSecKeyDataPtr key_data, ++xmlSecGCryptDsaPkVerify(int digest XMLSEC_ATTRIBUTE_UNUSED, xmlSecKeyDataPtr key_data, + const xmlSecByte* dgst, xmlSecSize dgstSize, + const xmlSecByte* data, xmlSecSize dataSize) { + gcry_mpi_t m_hash = NULL; +diff --git a/src/gcrypt/symkeys.c b/src/gcrypt/symkeys.c +index 57337f0a..02619d19 100644 +--- a/src/gcrypt/symkeys.c ++++ b/src/gcrypt/symkeys.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include + #include "../keysdata_helpers.h" +@@ -131,7 +132,7 @@ xmlSecGCryptSymKeyDataBinWrite(xmlSecKeyDataId id, xmlSecKeyPtr key, + } + + static int +-xmlSecGCryptSymKeyDataGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecGCryptSymKeyDataGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecBufferPtr buffer; + + xmlSecAssert2(xmlSecGCryptSymKeyDataCheckId(data), -1); +diff --git a/src/gnutls/app.c b/src/gnutls/app.c +index ac5b3925..7339335f 100644 +--- a/src/gnutls/app.c ++++ b/src/gnutls/app.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -356,8 +357,8 @@ xmlSecGnuTLSAppPkcs12Load(const char *filename, + xmlSecKeyPtr + xmlSecGnuTLSAppPkcs12LoadMemory(const xmlSecByte* data, xmlSecSize dataSize, + const char *pwd, +- void* pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) ++ void* pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) + { + xmlSecKeyPtr key = NULL; + xmlSecKeyPtr res = NULL; +diff --git a/src/gnutls/x509vfy.c b/src/gnutls/x509vfy.c +index 2521221f..d5c5e046 100644 +--- a/src/gnutls/x509vfy.c ++++ b/src/gnutls/x509vfy.c +@@ -173,7 +173,7 @@ gnutls_x509_crt_t + xmlSecGnuTLSX509StoreFindCert_ex(const xmlSecKeyDataStorePtr store, const xmlChar *subjectName, + const xmlChar *issuerName, const xmlChar *issuerSerial, + const xmlSecByte * ski, xmlSecSize skiSize, +- const xmlSecKeyInfoCtx* keyInfoCtx ATTRIBUTE_UNUSED) { ++ const xmlSecKeyInfoCtx* keyInfoCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecGnuTLSX509StoreCtxPtr ctx; + gnutls_x509_crt_t res = NULL; + +diff --git a/src/keysmngr.c b/src/keysmngr.c +index a3d85fe2..f58905ab 100644 +--- a/src/keysmngr.c ++++ b/src/keysmngr.c +@@ -405,7 +405,7 @@ xmlSecSimpleKeysStoreLoad(xmlSecKeyStorePtr store, const char *uri, + */ + int + xmlSecSimpleKeysStoreLoad_ex(xmlSecKeyStorePtr store, const char *uri, +- xmlSecKeysMngrPtr keysMngr ATTRIBUTE_UNUSED, ++ xmlSecKeysMngrPtr keysMngr XMLSEC_ATTRIBUTE_UNUSED, + xmlSecSimpleKeysStoreAdoptKeyFunc adoptKeyFunc) { + xmlDocPtr doc; + xmlNodePtr root; +diff --git a/src/mscng/app.c b/src/mscng/app.c +index f23fa649..140bf4b9 100644 +--- a/src/mscng/app.c ++++ b/src/mscng/app.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -588,7 +589,7 @@ cleanup: + int + xmlSecMSCngAppKeysMngrCertLoad(xmlSecKeysMngrPtr mngr, const char *filename, + xmlSecKeyDataFormat format, +- xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++ xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecBuffer buffer; + int ret; + +diff --git a/src/mscng/certkeys.c b/src/mscng/certkeys.c +index a5b44890..d9412696 100644 +--- a/src/mscng/certkeys.c ++++ b/src/mscng/certkeys.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -610,7 +611,7 @@ done: + static int + xmlSecMSCngKeyDataDsaWrite(xmlSecKeyDataId id, xmlSecKeyDataPtr data, + xmlSecKeyValueDsaPtr dsaValue, +- int writePrivateKey ATTRIBUTE_UNUSED) { ++ int writePrivateKey XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCngKeyDataCtxPtr ctx; + NTSTATUS status; + xmlSecBuffer buf; +@@ -1052,7 +1053,7 @@ done: + static int + xmlSecMSCngKeyDataRsaWrite(xmlSecKeyDataId id, xmlSecKeyDataPtr data, + xmlSecKeyValueRsaPtr rsaValue, +- int writePrivateKey ATTRIBUTE_UNUSED) { ++ int writePrivateKey XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCngKeyDataCtxPtr ctx; + NTSTATUS status; + xmlSecBuffer buf; +diff --git a/src/mscng/hmac.c b/src/mscng/hmac.c +index 996f5d38..ddbc598d 100644 +--- a/src/mscng/hmac.c ++++ b/src/mscng/hmac.c +@@ -30,8 +30,8 @@ + #include + #include + #include +-#include + #include ++#include + + #include + +@@ -175,7 +175,7 @@ xmlSecMSCngHmacFinalize(xmlSecTransformPtr transform) { + + static int + xmlSecMSCngHmacNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCngHmacCtxPtr ctx; + int ret; + +@@ -300,7 +300,7 @@ xmlSecMSCngHmacSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecMSCngHmacVerify(xmlSecTransformPtr transform, const xmlSecByte* data, +- xmlSecSize dataSize, xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecSize dataSize, xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCngHmacCtxPtr ctx; + xmlSecSize truncationBytes; + static xmlSecByte lastByteMasks[] = { 0xFF, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, +diff --git a/src/mscng/kt_rsa.c b/src/mscng/kt_rsa.c +index 67fb58b8..b809c95e 100644 +--- a/src/mscng/kt_rsa.c ++++ b/src/mscng/kt_rsa.c +@@ -31,8 +31,8 @@ + #include + #include + #include +-#include + #include ++#include + + #include + #include +@@ -369,7 +369,7 @@ xmlSecMSCngRsaPkcs1OaepProcess(xmlSecTransformPtr transform) { + + static int + xmlSecMSCngRsaPkcs1OaepExecute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCngRsaPkcs1OaepCtxPtr ctx; + int ret; + +@@ -453,7 +453,7 @@ xmlSecMSCngTransformRsaPkcs1GetKlass(void) { + + static int + xmlSecMSCngRsaOaepNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCngRsaPkcs1OaepCtxPtr ctx; + xmlChar* algorithm = NULL; + int ret; +diff --git a/src/mscng/kw_aes.c b/src/mscng/kw_aes.c +index 3d13ccc0..b1711d17 100644 +--- a/src/mscng/kw_aes.c ++++ b/src/mscng/kw_aes.c +@@ -210,7 +210,7 @@ xmlSecMSCngKWAesSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecMSCngKWAesExecute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCngKWAesCtxPtr ctx; + int ret; + +diff --git a/src/mscng/kw_des.c b/src/mscng/kw_des.c +index 28f8e973..e151cafd 100644 +--- a/src/mscng/kw_des.c ++++ b/src/mscng/kw_des.c +@@ -57,7 +57,7 @@ XMLSEC_TRANSFORM_DECLARE(MSCngKWDes3, xmlSecMSCngKWDes3Ctx) + #define xmlSecMSCngKWDes3Size XMLSEC_TRANSFORM_SIZE(MSCngKWDes3) + + static int +-xmlSecMSCngKWDes3GenerateRandom(xmlSecTransformPtr transform ATTRIBUTE_UNUSED, xmlSecByte * out, ++xmlSecMSCngKWDes3GenerateRandom(xmlSecTransformPtr transform XMLSEC_ATTRIBUTE_UNUSED, xmlSecByte * out, + xmlSecSize outSize, xmlSecSize* outWritten) + { + NTSTATUS status; +@@ -647,7 +647,7 @@ xmlSecMSCngKWDes3SetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecMSCngKWDes3Execute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCngKWDes3CtxPtr ctx; + int ret; + +diff --git a/src/mscng/x509vfy.c b/src/mscng/x509vfy.c +index 0a4d066d..90dd2599 100644 +--- a/src/mscng/x509vfy.c ++++ b/src/mscng/x509vfy.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -1171,7 +1172,7 @@ PCCERT_CONTEXT + xmlSecMSCngX509StoreFindCert_ex(xmlSecKeyDataStorePtr store, xmlChar* subjectName, + xmlChar* issuerName, xmlChar* issuerSerial, + xmlSecByte* ski, xmlSecSize skiSize, +- xmlSecKeyInfoCtx* keyInfoCtx ATTRIBUTE_UNUSED) { ++ xmlSecKeyInfoCtx* keyInfoCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCngX509StoreCtxPtr ctx; + PCCERT_CONTEXT cert = NULL; + +diff --git a/src/mscrypto/app.c b/src/mscrypto/app.c +index 32a3ca28..402eadda 100644 +--- a/src/mscrypto/app.c ++++ b/src/mscrypto/app.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -445,8 +446,8 @@ xmlSecMSCryptoAppKeyCertLoadMemory(xmlSecKeyPtr key, const xmlSecByte* data, xml + xmlSecKeyPtr + xmlSecMSCryptoAppPkcs12Load(const char *filename, + const char *pwd, +- void* pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ void* pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecBuffer buffer; + xmlSecKeyPtr key; + int ret; +@@ -502,8 +503,8 @@ xmlSecKeyPtr + xmlSecMSCryptoAppPkcs12LoadMemory(const xmlSecByte* data, + xmlSecSize dataSize, + const char *pwd, +- void* pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ void* pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + CRYPT_DATA_BLOB pfx; + HCERTSTORE hCertStore = NULL; + PCCERT_CONTEXT tmpcert = NULL; +@@ -683,7 +684,7 @@ done: + int + xmlSecMSCryptoAppKeysMngrCertLoad(xmlSecKeysMngrPtr mngr, const char *filename, + xmlSecKeyDataFormat format, +- xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++ xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecBuffer buffer; + int ret; + +@@ -735,7 +736,7 @@ xmlSecMSCryptoAppKeysMngrCertLoad(xmlSecKeysMngrPtr mngr, const char *filename, + int + xmlSecMSCryptoAppKeysMngrCertLoadMemory(xmlSecKeysMngrPtr mngr, const xmlSecByte* data, + xmlSecSize dataSize, xmlSecKeyDataFormat format, +- xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++ xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecKeyDataStorePtr x509Store; + PCCERT_CONTEXT pCert = NULL; + DWORD dwDataSize; +diff --git a/src/mscrypto/certkeys.c b/src/mscrypto/certkeys.c +index 0fc1b404..4ec53543 100644 +--- a/src/mscrypto/certkeys.c ++++ b/src/mscrypto/certkeys.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -1138,7 +1139,7 @@ xmlSecMSCryptoKeyDataRsaXmlWrite(xmlSecKeyDataId id, xmlSecKeyPtr key, + + static int + xmlSecMSCryptoKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, +- xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++ xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCryptoKeyDataCtxPtr ctx; + HCRYPTPROV hProv = 0; + HCRYPTKEY hKey = 0; +@@ -1379,7 +1380,7 @@ done: + + static int + xmlSecMSCryptoKeyDataRsaWrite(xmlSecKeyDataId id, xmlSecKeyDataPtr data, +- xmlSecKeyValueRsaPtr rsaValue, int writePrivateKey ATTRIBUTE_UNUSED) { ++ xmlSecKeyValueRsaPtr rsaValue, int writePrivateKey XMLSEC_ATTRIBUTE_UNUSED) { + + xmlSecMSCryptoKeyDataCtxPtr ctx; + xmlSecBuffer buf; +@@ -1728,7 +1729,7 @@ xmlSecMSCryptoKeyDataDsaXmlWrite(xmlSecKeyDataId id, xmlSecKeyPtr key, + } + + static int +-xmlSecMSCryptoKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecMSCryptoKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCryptoKeyDataCtxPtr ctx; + HCRYPTPROV hProv = 0; + HCRYPTKEY hKey = 0; +@@ -2009,7 +2010,7 @@ done: + static int + xmlSecMSCryptoKeyDataDsaWrite(xmlSecKeyDataId id, xmlSecKeyDataPtr data, + xmlSecKeyValueDsaPtr dsaValue, +- int writePrivateKey ATTRIBUTE_UNUSED) { ++ int writePrivateKey XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCryptoKeyDataCtxPtr ctx; + xmlSecBuffer buf; + int bufInitialized = 0; +diff --git a/src/mscrypto/hmac.c b/src/mscrypto/hmac.c +index 662e3daa..27ab0915 100644 +--- a/src/mscrypto/hmac.c ++++ b/src/mscrypto/hmac.c +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include + +@@ -283,7 +284,7 @@ xmlSecMSCryptoHmacFinalize(xmlSecTransformPtr transform) { + + static int + xmlSecMSCryptoHmacNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCryptoHmacCtxPtr ctx; + int ret; + +@@ -411,7 +412,7 @@ xmlSecMSCryptoHmacSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + static int + xmlSecMSCryptoHmacVerify(xmlSecTransformPtr transform, + const xmlSecByte* data, xmlSecSize dataSize, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + static xmlSecByte last_byte_masks[] = + { 0xFF, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; + +diff --git a/src/mscrypto/kt_rsa.c b/src/mscrypto/kt_rsa.c +index 8c3f184e..51ab8585 100644 +--- a/src/mscrypto/kt_rsa.c ++++ b/src/mscrypto/kt_rsa.c +@@ -27,8 +27,8 @@ + #include + #include + #include +-#include + #include ++#include + + #include + #include +@@ -195,7 +195,7 @@ xmlSecMSCryptoRsaPkcs1OaepSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) + + static int + xmlSecMSCryptoRsaPkcs1OaepExecute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCryptoRsaPkcs1OaepCtxPtr ctx; + int ret; + +@@ -498,7 +498,7 @@ xmlSecMSCryptoTransformRsaOaepGetKlass(void) { + + static int + xmlSecMSCryptoRsaOaepNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCryptoRsaPkcs1OaepCtxPtr ctx; + xmlChar* algorithm = NULL; + int ret; +diff --git a/src/mscrypto/kw_aes.c b/src/mscrypto/kw_aes.c +index 3f70aaf5..67d07847 100644 +--- a/src/mscrypto/kw_aes.c ++++ b/src/mscrypto/kw_aes.c +@@ -250,7 +250,7 @@ xmlSecMSCryptoKWAesSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecMSCryptoKWAesExecute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCryptoKWAesCtxPtr ctx; + int ret; + +diff --git a/src/mscrypto/kw_des.c b/src/mscrypto/kw_des.c +index 5ca33d85..7d4aa4ea 100644 +--- a/src/mscrypto/kw_des.c ++++ b/src/mscrypto/kw_des.c +@@ -293,7 +293,7 @@ xmlSecMSCryptoKWDes3SetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecMSCryptoKWDes3Execute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCryptoKWDes3CtxPtr ctx; + int ret; + +diff --git a/src/mscrypto/symkeys.c b/src/mscrypto/symkeys.c +index ff6389e2..4ff94dbd 100644 +--- a/src/mscrypto/symkeys.c ++++ b/src/mscrypto/symkeys.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + +@@ -140,7 +141,7 @@ xmlSecMSCryptoSymKeyDataBinWrite(xmlSecKeyDataId id, xmlSecKeyPtr key, + } + + static int +-xmlSecMSCryptoSymKeyDataGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecMSCryptoSymKeyDataGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecBufferPtr buffer; + + xmlSecAssert2(xmlSecMSCryptoSymKeyDataCheckId(data), -1); +diff --git a/src/mscrypto/x509vfy.c b/src/mscrypto/x509vfy.c +index 64438377..1a4b9685 100644 +--- a/src/mscrypto/x509vfy.c ++++ b/src/mscrypto/x509vfy.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -158,7 +159,7 @@ PCCERT_CONTEXT + xmlSecMSCryptoX509StoreFindCert_ex(xmlSecKeyDataStorePtr store, xmlChar* subjectName, + xmlChar* issuerName, xmlChar* issuerSerial, + xmlSecByte* ski, xmlSecSize skiSize, +- xmlSecKeyInfoCtx* keyInfoCtx ATTRIBUTE_UNUSED) { ++ xmlSecKeyInfoCtx* keyInfoCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecMSCryptoX509StoreCtxPtr ctx; + PCCERT_CONTEXT pCert = NULL; + +diff --git a/src/nodeset.c b/src/nodeset.c +index 0ab5a7b2..55f3a4ff 100644 +--- a/src/nodeset.c ++++ b/src/nodeset.c +@@ -494,7 +494,7 @@ xmlSecNodeSetGetChildren(xmlDocPtr doc, const xmlNodePtr parent, int withComment + + static int + xmlSecNodeSetDumpTextNodesWalkCallback(xmlSecNodeSetPtr nset, xmlNodePtr cur, +- xmlNodePtr parent ATTRIBUTE_UNUSED, ++ xmlNodePtr parent XMLSEC_ATTRIBUTE_UNUSED, + void* data) { + int ret; + xmlSecAssert2(nset != NULL, -1); +diff --git a/src/nss/app.c b/src/nss/app.c +index ec41b2d1..6b0fcf66 100644 +--- a/src/nss/app.c ++++ b/src/nss/app.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -218,7 +219,7 @@ xmlSecNssAppAscii2UCS2Conv(PRBool toUnicode, + unsigned char *outBuf, + unsigned int maxOutBufLen, + unsigned int *outBufLen, +- PRBool swapBytes ATTRIBUTE_UNUSED) ++ PRBool swapBytes XMLSEC_ATTRIBUTE_UNUSED) + { + SECItem it; + +@@ -235,9 +236,9 @@ xmlSecNssAppAscii2UCS2Conv(PRBool toUnicode, + } + + static SECItem * +-xmlSecNssAppNicknameCollisionCallback(SECItem *old_nick ATTRIBUTE_UNUSED, ++xmlSecNssAppNicknameCollisionCallback(SECItem *old_nick XMLSEC_ATTRIBUTE_UNUSED, + PRBool *cancel, +- void *wincx ATTRIBUTE_UNUSED) ++ void *wincx XMLSEC_ATTRIBUTE_UNUSED) + { + if (cancel == NULL) { + return (NULL); +@@ -657,8 +658,8 @@ done: + */ + xmlSecKeyPtr + xmlSecNssAppPkcs12Load(const char *filename, const char *pwd, +- void *pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ void *pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + SECItem secItem; + xmlSecKeyPtr res; + int ret; +@@ -700,8 +701,8 @@ xmlSecNssAppPkcs12Load(const char *filename, const char *pwd, + */ + xmlSecKeyPtr + xmlSecNssAppPkcs12LoadMemory(const xmlSecByte* data, xmlSecSize dataSize, const char *pwd, +- void *pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ void *pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + SECItem secItem; + xmlSecKeyPtr res; + int ret; +@@ -742,8 +743,8 @@ xmlSecNssAppPkcs12LoadMemory(const xmlSecByte* data, xmlSecSize dataSize, const + */ + xmlSecKeyPtr + xmlSecNssAppPkcs12LoadSECItem(SECItem* secItem, const char *pwd, +- void *pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ void *pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecKeyPtr key = NULL; + xmlSecKeyDataPtr data = NULL; + xmlSecKeyDataPtr x509Data = NULL; +diff --git a/src/nss/hmac.c b/src/nss/hmac.c +index 06b3ffb1..1b44bff7 100644 +--- a/src/nss/hmac.c ++++ b/src/nss/hmac.c +@@ -28,8 +28,8 @@ + #include + #include + #include +-#include + #include ++#include + + #include + #include +@@ -248,7 +248,7 @@ xmlSecNssHmacFinalize(xmlSecTransformPtr transform) { + */ + static int + xmlSecNssHmacNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecNssHmacCtxPtr ctx; + int ret; + +@@ -362,7 +362,7 @@ xmlSecNssHmacSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + static int + xmlSecNssHmacVerify(xmlSecTransformPtr transform, + const xmlSecByte* data, xmlSecSize dataSize, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + static xmlSecByte last_byte_masks[] = + { 0xFF, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; + +diff --git a/src/nss/keysstore.c b/src/nss/keysstore.c +index 3969cd01..74229f4b 100644 +--- a/src/nss/keysstore.c ++++ b/src/nss/keysstore.c +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -124,7 +125,7 @@ xmlSecNssKeysStoreAdoptKey(xmlSecKeyStorePtr store, xmlSecKeyPtr key) { + */ + int + xmlSecNssKeysStoreLoad(xmlSecKeyStorePtr store, const char *uri, +- xmlSecKeysMngrPtr keysMngr ATTRIBUTE_UNUSED) { ++ xmlSecKeysMngrPtr keysMngr XMLSEC_ATTRIBUTE_UNUSED) { + return(xmlSecSimpleKeysStoreLoad_ex(store, uri, keysMngr, + xmlSecNssKeysStoreAdoptKey)); + } +diff --git a/src/nss/kw_aes.c b/src/nss/kw_aes.c +index 0c6e8540..14d3f69e 100644 +--- a/src/nss/kw_aes.c ++++ b/src/nss/kw_aes.c +@@ -330,7 +330,7 @@ xmlSecNssKWAesSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecNssKWAesExecute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecNssKWAesCtxPtr ctx; + int ret; + +diff --git a/src/nss/kw_des.c b/src/nss/kw_des.c +index a127ab05..a70ccf51 100644 +--- a/src/nss/kw_des.c ++++ b/src/nss/kw_des.c +@@ -233,7 +233,7 @@ xmlSecNssKWDes3SetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecNssKWDes3Execute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecNssKWDes3CtxPtr ctx; + int ret; + +@@ -257,7 +257,7 @@ xmlSecNssKWDes3Execute(xmlSecTransformPtr transform, int last, + * + *********************************************************************/ + static int +-xmlSecNssKWDes3Sha1(xmlSecTransformPtr transform ATTRIBUTE_UNUSED, ++xmlSecNssKWDes3Sha1(xmlSecTransformPtr transform XMLSEC_ATTRIBUTE_UNUSED, + const xmlSecByte * in, xmlSecSize inSize, + xmlSecByte * out, xmlSecSize outSize, + xmlSecSize * outWritten) { +@@ -312,7 +312,7 @@ xmlSecNssKWDes3Sha1(xmlSecTransformPtr transform ATTRIBUTE_UNUSED, + } + + static int +-xmlSecNssKWDes3GenerateRandom(xmlSecTransformPtr transform ATTRIBUTE_UNUSED, ++xmlSecNssKWDes3GenerateRandom(xmlSecTransformPtr transform XMLSEC_ATTRIBUTE_UNUSED, + xmlSecByte * out, xmlSecSize outSize, + xmlSecSize * outWritten) { + SECStatus status; +diff --git a/src/nss/pkikeys.c b/src/nss/pkikeys.c +index 2f2aca12..627a1886 100644 +--- a/src/nss/pkikeys.c ++++ b/src/nss/pkikeys.c +@@ -27,8 +27,8 @@ + #include + #include + #include +-#include + #include ++#include + + #include + #include +@@ -621,7 +621,7 @@ xmlSecNssKeyDataDsaXmlWrite(xmlSecKeyDataId id, xmlSecKeyPtr key, + } + + static int +-xmlSecNssKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecNssKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + PQGParams *pqgParams = NULL; + PQGVerify *pqgVerify = NULL; + SECStatus rv; +@@ -879,7 +879,7 @@ done: + static int + xmlSecNssKeyDataDsaWrite(xmlSecKeyDataId id, xmlSecKeyDataPtr data, + xmlSecKeyValueDsaPtr dsaValue, +- int writePrivateKey ATTRIBUTE_UNUSED) { ++ int writePrivateKey XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecNssPKIKeyDataCtxPtr ctx; + int ret; + +@@ -1240,7 +1240,7 @@ done: + static int + xmlSecNssKeyDataRsaWrite(xmlSecKeyDataId id,xmlSecKeyDataPtr data, + xmlSecKeyValueRsaPtr rsaValue, +- int writePrivateKey ATTRIBUTE_UNUSED) { ++ int writePrivateKey XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecNssPKIKeyDataCtxPtr ctx; + int ret; + +@@ -1276,7 +1276,7 @@ xmlSecNssKeyDataRsaWrite(xmlSecKeyDataId id,xmlSecKeyDataPtr data, + } + + static int +-xmlSecNssKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecNssKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + PK11RSAGenParams params; + PK11SlotInfo *slot = NULL; + SECKEYPrivateKey *privkey = NULL; +diff --git a/src/nss/symkeys.c b/src/nss/symkeys.c +index 485c3335..2abe81e7 100644 +--- a/src/nss/symkeys.c ++++ b/src/nss/symkeys.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include + +@@ -131,7 +132,7 @@ xmlSecNssSymKeyDataBinWrite(xmlSecKeyDataId id, xmlSecKeyPtr key, + } + + static int +-xmlSecNssSymKeyDataGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecNssSymKeyDataGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecBufferPtr buffer; + + xmlSecAssert2(xmlSecNssSymKeyDataCheckId(data), -1); +diff --git a/src/nss/x509vfy.c b/src/nss/x509vfy.c +index b89ce2b3..52d9d3ac 100644 +--- a/src/nss/x509vfy.c ++++ b/src/nss/x509vfy.c +@@ -33,8 +33,8 @@ + #include + #include + #include +-#include + #include ++#include + + #include + #include +@@ -179,7 +179,7 @@ CERTCertificate * + xmlSecNssX509StoreFindCert_ex(xmlSecKeyDataStorePtr store, xmlChar *subjectName, + xmlChar *issuerName, xmlChar *issuerSerial, + xmlSecByte * ski, xmlSecSize skiSize, +- xmlSecKeyInfoCtx* keyInfoCtx ATTRIBUTE_UNUSED) { ++ xmlSecKeyInfoCtx* keyInfoCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecNssX509StoreCtxPtr ctx; + + xmlSecAssert2(xmlSecKeyDataStoreCheckId(store, xmlSecNssX509StoreId), NULL); +diff --git a/src/openssl/app.c b/src/openssl/app.c +index 11ca8f9a..256ab47f 100644 +--- a/src/openssl/app.c ++++ b/src/openssl/app.c +@@ -32,8 +32,8 @@ + #include + #include + #include +-#include + #include ++#include + + #include + #include +@@ -454,8 +454,8 @@ xmlSecOpenSSLAppKeyLoadBIO(BIO* bio, xmlSecKeyDataFormat format, + + static xmlSecKeyPtr + xmlSecOpenSSLAppEngineKeyLoad(const char *engineName, const char *engineKeyId, +- xmlSecKeyDataFormat format, const char *pwd ATTRIBUTE_UNUSED, +- void* pwdCallback ATTRIBUTE_UNUSED, void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ xmlSecKeyDataFormat format, const char *pwd XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallback XMLSEC_ATTRIBUTE_UNUSED, void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + + #if !defined(OPENSSL_NO_ENGINE) && (!defined(XMLSEC_OPENSSL_API_300) || defined(XMLSEC_OPENSSL3_ENGINES)) + ENGINE* engine = NULL; +@@ -825,8 +825,8 @@ xmlSecOpenSSLAppPkcs12LoadMemory(const xmlSecByte* data, xmlSecSize dataSize, + */ + xmlSecKeyPtr + xmlSecOpenSSLAppPkcs12LoadBIO(BIO* bio, const char *pwd, +- void* pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ void* pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + + PKCS12 *p12 = NULL; + EVP_PKEY *pKey = NULL; +@@ -1601,7 +1601,7 @@ xmlSecOpenSSLDefaultPasswordCallback(char *buf, int buflen, int verify, void *us + + static int + xmlSecOpenSSLDummyPasswordCallback(char *buf, int bufLen, +- int verify ATTRIBUTE_UNUSED, ++ int verify XMLSEC_ATTRIBUTE_UNUSED, + void *userdata) { + #if defined(_MSC_VER) + xmlSecSize bufSize; +diff --git a/src/openssl/ciphers.c b/src/openssl/ciphers.c +index a2d919a0..7f017757 100644 +--- a/src/openssl/ciphers.c ++++ b/src/openssl/ciphers.c +@@ -24,8 +24,8 @@ + #include + #include + #include +-#include + #include ++#include + + #include + #include +@@ -388,7 +388,7 @@ xmlSecOpenSSLEvpBlockCipherCBCCtxFinal(xmlSecOpenSSLEvpBlockCipherCtxPtr ctx, + xmlSecBufferPtr in, + xmlSecBufferPtr out, + const xmlChar* cipherName, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) + { + xmlSecSize size, inSize, outSize; + int inLen, outLen, padLen, blockLen; +diff --git a/src/openssl/evp.c b/src/openssl/evp.c +index dcdcc1bf..bc3e4ecd 100644 +--- a/src/openssl/evp.c ++++ b/src/openssl/evp.c +@@ -952,7 +952,7 @@ done: + } + + static int +-xmlSecOpenSSLKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecOpenSSLKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + DSA* dsa = NULL; + int counter_ret, bitsLen; + unsigned long h_ret; +@@ -1185,7 +1185,7 @@ done: + } + + static int +-xmlSecOpenSSLKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecOpenSSLKeyDataDsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + EVP_PKEY_CTX* pctx = NULL; + OSSL_PARAM_BLD* param_bld = NULL; + OSSL_PARAM* params = NULL; +@@ -1724,7 +1724,7 @@ xmlSecOpenSSLKeyDataEcdsaFinalize(xmlSecKeyDataPtr data) { + } + + static xmlSecKeyDataType +-xmlSecOpenSSLKeyDataEcdsaGetType(xmlSecKeyDataPtr data ATTRIBUTE_UNUSED) { ++xmlSecOpenSSLKeyDataEcdsaGetType(xmlSecKeyDataPtr data XMLSEC_ATTRIBUTE_UNUSED) { + UNREFERENCED_PARAMETER(data); + /* XXX-MAK: Fix this. */ + return(xmlSecKeyDataTypePublic | xmlSecKeyDataTypePrivate); +@@ -2158,7 +2158,7 @@ xmlSecOpenSSLKeyDataRsaXmlWrite(xmlSecKeyDataId id, xmlSecKeyPtr key, + #ifndef XMLSEC_OPENSSL_API_300 + + static int +-xmlSecOpenSSLKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecOpenSSLKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + RSA* rsa = NULL; + int lenBits; + BIGNUM* publicExponent = NULL; +@@ -2340,7 +2340,7 @@ done: + #else /* XMLSEC_OPENSSL_API_300 */ + + static int +-xmlSecOpenSSLKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecOpenSSLKeyDataRsaGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + EVP_PKEY_CTX* pctx = NULL; + OSSL_PARAM_BLD* param_bld = NULL; + OSSL_PARAM* params = NULL; +@@ -2882,7 +2882,7 @@ xmlSecOpenSSLKeyDataGost2001Finalize(xmlSecKeyDataPtr data) { + } + + static xmlSecKeyDataType +-xmlSecOpenSSLKeyDataGost2001GetType(xmlSecKeyDataPtr data ATTRIBUTE_UNUSED) { ++xmlSecOpenSSLKeyDataGost2001GetType(xmlSecKeyDataPtr data XMLSEC_ATTRIBUTE_UNUSED) { + UNREFERENCED_PARAMETER(data); + + /* Now I don't know how to find whether we have both private and public key +@@ -3010,7 +3010,7 @@ xmlSecOpenSSLKeyDataGostR3410_2012_256Finalize(xmlSecKeyDataPtr data) { + } + + static xmlSecKeyDataType +-xmlSecOpenSSLKeyDataGostR3410_2012_256GetType(xmlSecKeyDataPtr data ATTRIBUTE_UNUSED) { ++xmlSecOpenSSLKeyDataGostR3410_2012_256GetType(xmlSecKeyDataPtr data XMLSEC_ATTRIBUTE_UNUSED) { + UNREFERENCED_PARAMETER(data); + + /* I don't know how to find whether we have both private and public key +@@ -3138,7 +3138,7 @@ xmlSecOpenSSLKeyDataGostR3410_2012_512Finalize(xmlSecKeyDataPtr data) { + } + + static xmlSecKeyDataType +-xmlSecOpenSSLKeyDataGostR3410_2012_512GetType(xmlSecKeyDataPtr data ATTRIBUTE_UNUSED) { ++xmlSecOpenSSLKeyDataGostR3410_2012_512GetType(xmlSecKeyDataPtr data XMLSEC_ATTRIBUTE_UNUSED) { + UNREFERENCED_PARAMETER(data); + + /* I don't know how to find whether we have both private and public key +diff --git a/src/openssl/hmac.c b/src/openssl/hmac.c +index ce06918b..d77fb9ad 100644 +--- a/src/openssl/hmac.c ++++ b/src/openssl/hmac.c +@@ -312,7 +312,7 @@ xmlSecOpenSSLHmacFinalize(xmlSecTransformPtr transform) { + + static int + xmlSecOpenSSLHmacNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecOpenSSLHmacCtxPtr ctx; + int ret; + +@@ -474,7 +474,7 @@ xmlSecOpenSSLHmacSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + static int + xmlSecOpenSSLHmacVerify(xmlSecTransformPtr transform, + const xmlSecByte* data, xmlSecSize dataSize, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + static xmlSecByte last_byte_masks[] = + { 0xFF, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; + +diff --git a/src/openssl/kt_rsa.c b/src/openssl/kt_rsa.c +index 0ca54402..c9e03fcd 100644 +--- a/src/openssl/kt_rsa.c ++++ b/src/openssl/kt_rsa.c +@@ -30,9 +30,9 @@ + #include + #include + #include +-#include + #include + #include ++#include + + #include + #include +@@ -161,7 +161,7 @@ xmlSecOpenSSLTransformRsaPkcs1GetKlass(void) { + + static int + xmlSecOpenSSLRsaPkcs1SetKeyImpl(xmlSecOpenSSLRsaPkcs1CtxPtr ctx, EVP_PKEY* pKey, +- int encrypt ATTRIBUTE_UNUSED) { ++ int encrypt XMLSEC_ATTRIBUTE_UNUSED) { + RSA *rsa = NULL; + int keyLen; + +@@ -428,7 +428,7 @@ xmlSecOpenSSLRsaPkcs1SetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecOpenSSLRsaPkcs1Execute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecOpenSSLRsaPkcs1CtxPtr ctx; + int ret; + +@@ -631,7 +631,7 @@ xmlSecOpenSSLTransformRsaOaepGetKlass(void) { + + static int + xmlSecOpenSSLRsaOaepSetKeyImpl(xmlSecOpenSSLRsaOaepCtxPtr ctx, EVP_PKEY* pKey, +- int encrypt ATTRIBUTE_UNUSED) { ++ int encrypt XMLSEC_ATTRIBUTE_UNUSED) { + RSA *rsa = NULL; + int keyLen; + +@@ -983,7 +983,7 @@ xmlSecOpenSSLRsaOaepFinalize(xmlSecTransformPtr transform) { + + static int + xmlSecOpenSSLRsaOaepNodeRead(xmlSecTransformPtr transform, xmlNodePtr node, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecOpenSSLRsaOaepCtxPtr ctx; + xmlChar* algorithm = NULL; + int ret; +@@ -1092,7 +1092,7 @@ xmlSecOpenSSLRsaOaepSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecOpenSSLRsaOaepExecute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecOpenSSLRsaOaepCtxPtr ctx; + int ret; + +diff --git a/src/openssl/kw_aes.c b/src/openssl/kw_aes.c +index ce674c5b..a113581f 100644 +--- a/src/openssl/kw_aes.c ++++ b/src/openssl/kw_aes.c +@@ -223,7 +223,7 @@ xmlSecOpenSSLKWAesSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecOpenSSLKWAesExecute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecOpenSSLKWAesCtxPtr ctx; + int ret; + +diff --git a/src/openssl/kw_des.c b/src/openssl/kw_des.c +index faa16590..d2938535 100644 +--- a/src/openssl/kw_des.c ++++ b/src/openssl/kw_des.c +@@ -237,7 +237,7 @@ xmlSecOpenSSLKWDes3SetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) { + + static int + xmlSecOpenSSLKWDes3Execute(xmlSecTransformPtr transform, int last, +- xmlSecTransformCtxPtr transformCtx ATTRIBUTE_UNUSED) { ++ xmlSecTransformCtxPtr transformCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecOpenSSLKWDes3CtxPtr ctx; + int ret; + +@@ -264,7 +264,7 @@ xmlSecOpenSSLKWDes3Execute(xmlSecTransformPtr transform, int last, + #ifndef XMLSEC_OPENSSL_API_300 + + static int +-xmlSecOpenSSLKWDes3Sha1(xmlSecTransformPtr transform ATTRIBUTE_UNUSED, ++xmlSecOpenSSLKWDes3Sha1(xmlSecTransformPtr transform XMLSEC_ATTRIBUTE_UNUSED, + const xmlSecByte * in, xmlSecSize inSize, + xmlSecByte * out, xmlSecSize outSize, + xmlSecSize * outWritten) { +@@ -288,7 +288,7 @@ xmlSecOpenSSLKWDes3Sha1(xmlSecTransformPtr transform ATTRIBUTE_UNUSED, + #else /* XMLSEC_OPENSSL_API_300 */ + + static int +-xmlSecOpenSSLKWDes3Sha1(xmlSecTransformPtr transform ATTRIBUTE_UNUSED, ++xmlSecOpenSSLKWDes3Sha1(xmlSecTransformPtr transform XMLSEC_ATTRIBUTE_UNUSED, + const xmlSecByte * in, xmlSecSize inSize, + xmlSecByte * out, xmlSecSize outSize, + xmlSecSize * outWritten) { +@@ -319,7 +319,7 @@ xmlSecOpenSSLKWDes3Sha1(xmlSecTransformPtr transform ATTRIBUTE_UNUSED, + + + static int +-xmlSecOpenSSLKWDes3GenerateRandom(xmlSecTransformPtr transform ATTRIBUTE_UNUSED, ++xmlSecOpenSSLKWDes3GenerateRandom(xmlSecTransformPtr transform XMLSEC_ATTRIBUTE_UNUSED, + xmlSecByte * out, xmlSecSize outSize, + xmlSecSize * outWritten) { + int ret; +diff --git a/src/openssl/symkeys.c b/src/openssl/symkeys.c +index 73a0196a..a6ad0603 100644 +--- a/src/openssl/symkeys.c ++++ b/src/openssl/symkeys.c +@@ -134,7 +134,7 @@ xmlSecOpenSSLSymKeyDataBinWrite(xmlSecKeyDataId id, xmlSecKeyPtr key, + } + + static int +-xmlSecOpenSSLSymKeyDataGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++xmlSecOpenSSLSymKeyDataGenerate(xmlSecKeyDataPtr data, xmlSecSize sizeBits, xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecBufferPtr buffer; + + xmlSecAssert2(xmlSecOpenSSLSymKeyDataCheckId(data), -1); +diff --git a/src/openssl/x509vfy.c b/src/openssl/x509vfy.c +index 37fbdf66..15223f60 100644 +--- a/src/openssl/x509vfy.c ++++ b/src/openssl/x509vfy.c +@@ -30,8 +30,8 @@ + #include + #include + #include +-#include + #include ++#include + + #include + #include +@@ -192,7 +192,7 @@ X509* + xmlSecOpenSSLX509StoreFindCert_ex(xmlSecKeyDataStorePtr store, xmlChar *subjectName, + xmlChar *issuerName, xmlChar *issuerSerial, + xmlSecByte * ski, xmlSecSize skiSize, +- xmlSecKeyInfoCtx* keyInfoCtx ATTRIBUTE_UNUSED) { ++ xmlSecKeyInfoCtx* keyInfoCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecOpenSSLX509StoreCtxPtr ctx; + X509* res = NULL; + +diff --git a/src/skeleton/app.c b/src/skeleton/app.c +index 49416265..9d2720af 100644 +--- a/src/skeleton/app.c ++++ b/src/skeleton/app.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -39,7 +40,7 @@ + * Returns: 0 on success or a negative value otherwise. + */ + int +-xmlSecSkeletonAppInit(const char* config ATTRIBUTE_UNUSED) { ++xmlSecSkeletonAppInit(const char* config XMLSEC_ATTRIBUTE_UNUSED) { + /* TODO: initialize Skeleton crypto engine */ + return(0); + } +@@ -174,9 +175,9 @@ xmlSecSkeletonAppKeyCertLoadMemory(xmlSecKeyPtr key, const xmlSecByte* data, xml + */ + xmlSecKeyPtr + xmlSecSkeletonAppPkcs12Load(const char *filename, +- const char *pwd ATTRIBUTE_UNUSED, +- void* pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ const char *pwd XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecAssert2(filename != NULL, NULL); + + /* TODO: load pkcs12 file */ +@@ -200,8 +201,8 @@ xmlSecSkeletonAppPkcs12Load(const char *filename, + */ + xmlSecKeyPtr + xmlSecSkeletonAppPkcs12LoadMemory(const xmlSecByte* data, xmlSecSize dataSize, const char *pwd, +- void *pwdCallback ATTRIBUTE_UNUSED, +- void* pwdCallbackCtx ATTRIBUTE_UNUSED) { ++ void *pwdCallback XMLSEC_ATTRIBUTE_UNUSED, ++ void* pwdCallbackCtx XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecAssert2(data != NULL, NULL); + + /* TODO: load pkcs12 file */ +@@ -227,7 +228,7 @@ xmlSecSkeletonAppPkcs12LoadMemory(const xmlSecByte* data, xmlSecSize dataSize, c + int + xmlSecSkeletonAppKeysMngrCertLoad(xmlSecKeysMngrPtr mngr, const char *filename, + xmlSecKeyDataFormat format, +- xmlSecKeyDataType type ATTRIBUTE_UNUSED) { ++ xmlSecKeyDataType type XMLSEC_ATTRIBUTE_UNUSED) { + xmlSecAssert2(mngr != NULL, -1); + xmlSecAssert2(filename != NULL, -1); + xmlSecAssert2(format != xmlSecKeyDataFormatUnknown, -1); +-- +2.47.1 + +From 8f30855af6bfd1cd2cc70098b60101c7716592ec Mon Sep 17 00:00:00 2001 +From: Aleksey Sanin +Date: Fri, 25 Apr 2025 17:54:45 -0400 +Subject: [PATCH 2/2] (xmlsec-core) Fix XMLSEC_ATTRIBUTE_UNUSED and include + clang + +--- + include/xmlsec/private.h | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/include/xmlsec/private.h b/include/xmlsec/private.h +index 46718979..3387183a 100644 +--- a/include/xmlsec/private.h ++++ b/include/xmlsec/private.h +@@ -509,15 +509,13 @@ struct _xmlSecCryptoDLFunctions { + /** + * XMLSEC_ATTRIBUTE_UNUSED: + * +- * Macro used to signal to GCC unused function parameters ++ * Macro used to signal unused function parameters + */ +-#ifdef __GNUC__ +-#ifndef XMLSEC_ATTRIBUTE_UNUSED ++#if defined(__GNUC__) || defined(__clang__) ++#define XMLSEC_ATTRIBUTE_UNUSED __attribute__((unused)) ++#else /* defined(__GNUC__) || defined(__clang__) */ + #define XMLSEC_ATTRIBUTE_UNUSED +-#endif +-#else +-#define XMLSEC_ATTRIBUTE_UNUSED +-#endif ++#endif /* defined(__GNUC__) || defined(__clang__) */ + + /** + * UNREFERENCED_PARAMETER: +-- +2.47.1 + diff --git a/xmlsec1.spec b/xmlsec1.spec index 643e89f..5ed088d 100644 --- a/xmlsec1.spec +++ b/xmlsec1.spec @@ -1,14 +1,13 @@ Name: xmlsec1 Version: 1.2.41 -Release: 1 +Release: 2 Summary: Library providing support for "XML Signature" and "XML Encryption" standards License: MIT URL: https://www.aleksey.com/xmlsec -Source0: https://www.aleksey.com/xmlsec/download/xmlsec1-%{version}.tar.gz +Source0: https://github.com/lsh123/xmlsec/releases/download/%{version}/%{name}-%{version}.tar.gz +Patch6000: backport-xmlsec1-1.2.x-ATTRIBUTE_UNUSED.patch BuildRequires: gcc make -BuildRequires: pkgconfig(gnutls) >= 2.8.0 -BuildRequires: pkgconfig(libgcrypt) >= 1.4.0 BuildRequires: pkgconfig(libxml-2.0) >= 2.8.0 BuildRequires: pkgconfig(libxslt) >= 1.0.20 BuildRequires: pkgconfig(nspr) >= 4.25.0 @@ -22,8 +21,6 @@ BuildRequires: gettext-devel BuildRequires: libtool Provides: xmlsec1-openssl = %{version}-%{release} -Provides: xmlsec1-gcrypt = %{version}-%{release} -Provides: xmlsec1-gnutls = %{version}-%{release} Provides: xmlsec1-nss = %{version}-%{release} Obsoletes: xmlsec1-openssl < %{version}-%{release} Obsoletes: xmlsec1-gcrypt < %{version}-%{release} @@ -39,8 +36,6 @@ standards "XML Digital Signature" and "XML Encryption". Summary: Libraries, includes, etc. to develop applications with XML Digital Signatures and XML Encryption support. Requires: %{name} = %{version}-%{release} Provides: xmlsec1-openssl-devel = %{version}-%{release} -Provides: xmlsec1-gcrypt-devel = %{version}-%{release} -Provides: xmlsec1-gnutls-devel = %{version}-%{release} Provides: xmlsec1-nss-devel = %{version}-%{release} Obsoletes: xmlsec1-openssl-devel < %{version}-%{release} Obsoletes: xmlsec1-gcrypt-devel < %{version}-%{release} @@ -57,7 +52,7 @@ This package contains the libraries and develop content for the xmlsec library. %build autoreconf -vfi -%configure --disable-static --enable-openssl3-engines +%configure --disable-static --enable-openssl3-engines --without-gcrypt --without-gnutls %disable_rpath %make_build V=1 @@ -77,8 +72,6 @@ mv %{buildroot}%{_docdir}/xmlsec1/* __tmp_doc %doc AUTHORS ChangeLog NEWS README.md %{_bindir}/xmlsec1 %{_libdir}/libxmlsec1.so.* -%{_libdir}/libxmlsec1-gcrypt.so* -%{_libdir}/libxmlsec1-gnutls.so* %{_libdir}/libxmlsec1-nss.so* %{_libdir}/libxmlsec1-openssl.so* @@ -95,6 +88,11 @@ mv %{buildroot}%{_docdir}/xmlsec1/* __tmp_doc %{_mandir}/man1/*.1* %changelog +* Sun Apr 27 2025 Funda Wang - 1.2.41-2 +- disable gcrypt backend per upstream + (https://github.com/lsh123/xmlsec/pull/848) +- fix build with libxml 2.14 + * Sun Aug 04 2024 Funda Wang - 1.2.41-1 - update to 1.2.41 -- Gitee