GNURLOPT_G...DELEGATION(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸ’… GNURLOPT_G...DELEGATION(3) β€” like, the curl_easy_setopt options girlies ✨

okay so bestie, this is a page from the curl_easy_setopt options family, and today's main character is the one about GSS-API delegation. yes it's niche. yes it's iconic. let's get into it πŸŽ€


✨ NAME ✨

CURLOPT_GSSAPI_DELEGATION β€” sets what GSS-API delegation is allowed, fr fr


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_GSSAPI_DELEGATION, long
level);

like, that's the whole vibe. handle, the option, and a long level. simple. slay.


πŸ’– DESCRIPTION πŸ’–

okay so you set that long parameter level to CURLGSSAPI_DELEGATION_FLAG when you wanna allow unconditional GSSAPI credential delegation. like, no conditions, just vibes, go off πŸ‘‘

but heads up β€” delegation is disabled by default since 7.21.7, so it's giving "you have to ask for it" energy.

you can also set the parameter to CURLGSSAPI_DELEGATION_POLICY_FLAG which means: only delegate if the OK-AS-DELEGATE flag is set in the service ticket. that one only works in case this feature is supported by the GSS-API implementation and the definition of GSS_C_DELEG_POLICY_FLAG was available at compile-time. so yeah, conditional on conditions, iykyk 😭


πŸ“ DEFAULT πŸ“

CURLGSSAPI_DELEGATION_NONE

the default is none. no delegation. nothing. she's resting 🧚


🌈 PROTOCOLS 🌈

HTTP β€” that's it, that's the list πŸ’…


πŸ”₯ EXAMPLE πŸ”₯

here's the whole thing in action, no cap:

CURL *curl = curl_easy_init();
if(curl) {
  CURLcode ret;
  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);
  ret = curl_easy_perform(curl);
}

see that comment? delegate if okayed by policy. that's the whole mood 🫢


⭐ AVAILABILITY ⭐

Added in 7.22.0 β€” so she's been around a minute, a real veteran πŸ’œ


🌸 RETURN VALUE 🌸

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. like, she'll tell you if she doesn't know her. no guessing πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

ok warning time bestie: this is one of those options where the compile-time stuff actually matters β€” if GSS_C_DELEG_POLICY_FLAG wasn't around when it got built, the policy flag path is just not happening. not me making up rules, that's literally the description πŸ™ˆ

and that's the page!! mwah πŸ’‹ this was libcurl 7.37.0, dated 19 Jun 2014 β€” yes she's a 2014 girlie and she still ate. πŸŽ€βœ¨

πŸ“¦ where this page comes from