diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-12-03 18:38:43 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-12-03 18:36:48 +0000 |
commit | 71dd5811272104a314311f361035388c957be089 (patch) | |
tree | d9ca163f113636504cb2d6a34d08d4ccc7722dcb | |
parent | 26b57832fe1c4e733ab1b4e8f6faea7365ece48e (diff) |
sasl_gssapi: Added Curl_sasl_build_gssapi_spn() function
Added helper function for returning a GSS-API compatible SPN.
-rw-r--r-- | lib/curl_sasl_gssapi.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/curl_sasl_gssapi.c b/lib/curl_sasl_gssapi.c index 24a2f452e..096729fef 100644 --- a/lib/curl_sasl_gssapi.c +++ b/lib/curl_sasl_gssapi.c @@ -31,10 +31,31 @@ #include "curl_sasl.h" #include "urldata.h" +#define _MPRINTF_REPLACE /* use our functions only */ +#include <curl/mprintf.h> + /* The last #include file should be: */ #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() * * This is used to generate an already encoded GSSAPI (Kerberos V5) user token |