Skip to content

Commit

Permalink
sasl_sspi: Added base64 decoding debug failure messages
Browse files Browse the repository at this point in the history
Just like in the NTLM code, added infof() failure messages for
DIGEST-MD5 and GSSAPI authentication when base64 decoding fails.
  • Loading branch information
captain-caveman2k committed Nov 16, 2014
1 parent 3089270 commit 9669794
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/curl_sasl_sspi.c
Expand Up @@ -146,8 +146,11 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
}

/* Ensure we have a valid challenge message */
if(!input_token)
if(!input_token) {
infof(data, "DIGEST-MD5 handshake failure (empty challenge message)\n");

return CURLE_BAD_CONTENT_ENCODING;
}

/* Query the security package for DigestSSP */
status = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT(SP_NAME_DIGEST),
Expand Down Expand Up @@ -873,8 +876,11 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
}

/* Ensure we have a valid challenge message */
if(!chlg)
if(!chlg) {
infof(data, "GSSAPI handshake failure (empty challenge message)\n");

return CURLE_BAD_CONTENT_ENCODING;
}

/* Setup the challenge "input" security buffer */
chlg_desc.ulVersion = SECBUFFER_VERSION;
Expand Down Expand Up @@ -984,8 +990,11 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data,
}

/* Ensure we have a valid challenge message */
if(!chlg)
if(!chlg) {
infof(data, "GSSAPI handshake failure (empty security message)\n");

return CURLE_BAD_CONTENT_ENCODING;
}

/* Get our response size information */
status = s_pSecFn->QueryContextAttributes(krb5->context,
Expand Down

0 comments on commit 9669794

Please sign in to comment.