mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 14:35:03 -05:00
sasl_gssapi: Added Curl_sasl_build_gssapi_spn() function
Added helper function for returning a GSS-API compatible SPN.
This commit is contained in:
parent
26b57832fe
commit
71dd581127
@ -31,9 +31,30 @@
|
|||||||
#include "curl_sasl.h"
|
#include "curl_sasl.h"
|
||||||
#include "urldata.h"
|
#include "urldata.h"
|
||||||
|
|
||||||
|
#define _MPRINTF_REPLACE /* use our functions only */
|
||||||
|
#include <curl/mprintf.h>
|
||||||
|
|
||||||
/* The last #include file should be: */
|
/* The last #include file should be: */
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Curl_sasl_build_gssapi_spn()
|
||||||
|
*
|
||||||
|
* This is used to build a SPN string in the format service@host.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
*
|
||||||
|
* serivce [in] - The service type such as www, smtp, pop or imap.
|
||||||
|
* host [in] - The host name or realm.
|
||||||
|
*
|
||||||
|
* Returns a pointer to the newly allocated SPN.
|
||||||
|
*/
|
||||||
|
static char *Curl_sasl_build_gssapi_spn(const char *service, const char *host)
|
||||||
|
{
|
||||||
|
/* Generate and return our SPN */
|
||||||
|
return aprintf("%s@%s", service, host);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Curl_sasl_create_gssapi_user_message()
|
* Curl_sasl_create_gssapi_user_message()
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user