CURLOPT_GSSAPI_DELEGATION(3)
π CURLOPT_GSSAPI_DELEGATION β like, the allowed GSS-API delegation one π
Okay bestie, so this is a page from the libcurl manual (the Library Functions Manual, if we're being fancy β¨) and it's all about CURLOPT_GSSAPI_DELEGATION β which is, literally, the allowed GSS-API delegation setting. No cap. π¦
β¨ SYNOPSIS β¨
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_GSSAPI_DELEGATION, long level);
π DESCRIPTION π
So you set that long parameter level, right? And here's the vibe check on what you can put in it π
- Set it to
CURLGSSAPI_DELEGATION_FLAGand you get unconditional GSSAPI credential delegation. Like, no questions asked, delegation is ON. π - Delegation is disabled by default β and it's been that way since
7.21.7, so don't come for me, that's just how it is. π«Ά - Set the parameter to
CURLGSSAPI_DELEGATION_POLICY_FLAGand it'll only delegate if the OK-AS-DELEGATE flag is set in the service ticket β but only in case this feature is supported by the GSS-API implementation and the definition ofGSS_C_DELEG_POLICY_FLAGwas available at compile-time. Conditional queen behavior, honestly. π
π DEFAULT π
CURLGSSAPI_DELEGATION_NONE
(the delegation stays home, bestie π)
π PROTOCOLS π
This functionality affects http only. That's it. That's the whole list. π
π₯ EXAMPLE π₯
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* delegate if okayed by policy */
curl_easy_setopt(curl, CURLOPT_GSSAPI_DELEGATION,
CURLGSSAPI_DELEGATION_POLICY_FLAG);
result = curl_easy_perform(curl);
}
}
Not me writing a whole main just to show off a flag π β but like, look at it. It ate. π
π§ HISTORY π§
Okay so there was a glow-up β¨: the CURLGSSAPI_DELEGATION_* macros became long types in 8.16.0. Prior to that version, a long cast was necessary when you passed them to curl_easy_setopt(3). So if you're on old curl, cast it or perish π.
β AVAILABILITY β
Added in curl 7.22.0. She's been around a minute, ngl. π
π RETURN VALUE π
curl_easy_setopt(3) returns a CURLcode indicating success or error.
CURLE_OK(0) means everything was OK β slay. πΈ- non-zero means an error occurred β and you can look it up in
libcurl-errors(3).
π¦ SEE ALSO π¦
Lowkey a whole delegation policy discourse in one tiny manpage β read it, love it, set your flags responsibly, bestie. π
Alright that's the page! Signing off with a big kiss from the libcurl crew, dated 2026-10-12, and yes this was CURLOPT_GSSAPI_DELEGATION(3) the whole time β iykyk πβ¨π«Ά
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms