gss: exclude verbose error logic from non-verbose builds

Closes #20551
This commit is contained in:
Viktor Szakats 2026-02-10 01:41:41 +01:00
parent b844c1a075
commit 5c250e2421
No known key found for this signature in database
2 changed files with 12 additions and 1 deletions

View file

@ -384,6 +384,7 @@ OM_uint32 Curl_gss_delete_sec_context(OM_uint32 *min,
return gss_delete_sec_context(min, context, output_token);
}
#ifdef CURLVERBOSE
#define GSS_LOG_BUFFER_LEN 1024
static size_t display_gss_error(OM_uint32 status, int type,
char *buf, size_t len)
@ -436,9 +437,9 @@ void Curl_gss_log_error(struct Curl_easy *data, const char *prefix,
display_gss_error(minor, GSS_C_MECH_CODE, buf, len);
NOVERBOSE((void)prefix);
infof(data, "%s%s", prefix, buf);
}
#endif /* CURLVERBOSE */
#if defined(__GNUC__) && defined(__APPLE__)
#pragma GCC diagnostic pop

View file

@ -47,9 +47,19 @@ OM_uint32 Curl_gss_delete_sec_context(OM_uint32 *min,
gss_ctx_id_t *context_handle,
gss_buffer_t output_token);
#ifdef CURLVERBOSE
/* Helper to log a GSS-API error status */
void Curl_gss_log_error(struct Curl_easy *data, const char *prefix,
OM_uint32 major, OM_uint32 minor);
#else
#define Curl_gss_log_error(data, prefix, major, minor) \
do { \
(void)(data); \
(void)(prefix); \
(void)(major); \
(void)(minor); \
} while(0)
#endif
/* Define our privacy and integrity protection values */
#define GSSAUTH_P_NONE 1