aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_sasl.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-10-30 20:56:38 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-10-30 20:58:24 +0000
commit43400b40862ea274d501f6692beb28a72ec7f776 (patch)
tree73f6d0074bc1e54896ebef1a79d40cc0170496d5 /lib/curl_sasl.c
parent8179354c2f8b0c14287b73eb80e7c954be45543c (diff)
email: Post graceful SASL authentication cancellation tidy up
Diffstat (limited to 'lib/curl_sasl.c')
-rw-r--r--lib/curl_sasl.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
index 09234da10..57a09ff35 100644
--- a/lib/curl_sasl.c
+++ b/lib/curl_sasl.c
@@ -559,14 +559,14 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
/*
* Curl_sasl_create_xoauth2_message()
*
- * This is used to generate an already encoded XOAUTH2 message ready
- * for sending to the recipient.
+ * This is used to generate an already encoded OAuth 2.0 message ready for
+ * sending to the recipient.
*
* Parameters:
*
* data [in] - The session handle.
* user [in] - The user name.
- * bearer [in] - The XOAUTH Bearer token.
+ * bearer [in] - The bearer token.
* outptr [in/out] - The address where a pointer to newly allocated memory
* holding the result will be stored upon completion.
* outlen [out] - The length of the output message.
@@ -579,16 +579,15 @@ CURLcode Curl_sasl_create_xoauth2_message(struct SessionHandle *data,
char **outptr, size_t *outlen)
{
CURLcode result = CURLE_OK;
- char *xoauth;
+ char *xoauth = NULL;
+ /* Generate the message */
xoauth = aprintf("user=%s\1auth=Bearer %s\1\1", user, bearer);
-
if(!xoauth)
return CURLE_OUT_OF_MEMORY;
/* Base64 encode the reply */
- result = Curl_base64_encode(data, xoauth, strlen(xoauth), outptr,
- outlen);
+ result = Curl_base64_encode(data, xoauth, strlen(xoauth), outptr, outlen);
Curl_safefree(xoauth);