/
githubmirror
/
xmlsec
Обзор
Документация
Войти
/
githubmirror
/
xmlsec
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/gcrypt/globals.h
78 строк
3 KB
lsh123
Update file headers for doxygen, use common copyright header, bump copyright to 2026 (#1122)
07 апр 2026, 04:13
Не верифицирован
07 апр 2026, 04:13
2e557ee
Код
Авторство
О чём код?
/** * XML Security Library (http://www.aleksey.com/xmlsec). * * This is free software; see the Copyright file in the source distribution for precise wording. * * Copyright (C) 2002-2026 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved. */ /** * @brief Internal global header for GCrypt used during compilation. */ #ifndef __XMLSEC_GLOBALS_H__ #define __XMLSEC_GLOBALS_H__ /** * Use autoconf defines if present. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #define IN_XMLSEC_CRYPTO #define XMLSEC_PRIVATE /* Include common error helper macros. */ #include "../errors_helpers.h" #define XMLSEC_GCRYPT_MAX_DIGEST_SIZE 256 /** * @brief Macro. Reports GCrypt crypto errors. * @details Macro. The XMLSec library macro for reporting GCrypt crypro errors. * @param errorFunction the failed function name. * @param errCode the GCrypt error code. * @param errorObject the error specific error object (e.g. transform, key data, etc). */ #define xmlSecGCryptError(errorFunction, errCode, errorObject) \ { \ const char* source = gcry_strsource((errCode)); \ const char* message = gcry_strerror((errCode)); \ xmlSecError(XMLSEC_ERRORS_HERE, \ (const char*)(errorObject), \ (errorFunction), \ XMLSEC_ERRORS_R_CRYPTO_FAILED, \ "gcrypt error: %u: %s: %s", \ (errCode), \ xmlSecErrorsSafeString(source), \ xmlSecErrorsSafeString(message) \ ); \ } /** * @brief Macro. Reports GCrypt crypto errors. * @details Macro. The XMLSec library macro for reporting GCrypt crypro errors. * @param errorFunction the failed function name. * @param errCode the GCrypt error code. * @param errorObject the error specific error object (e.g. transform, key data, etc). * @param msg the extra message. * @param param the extra message param. */ #define xmlSecGCryptError2(errorFunction, errCode, errorObject, msg, param) \ { \ const char* source = gcry_strsource((errCode)); \ const char* message = gcry_strerror((errCode)); \ xmlSecError(XMLSEC_ERRORS_HERE, \ (const char*)(errorObject), \ (errorFunction), \ XMLSEC_ERRORS_R_CRYPTO_FAILED, \ msg "; gcrypt error: %u: %s: %s", \ (param), \ (errCode), \ xmlSecErrorsSafeString(source), \ xmlSecErrorsSafeString(message) \ ); \ } #endif /* ! __XMLSEC_GLOBALS_H__ */