if(2 * ulen + plen + 2 > sizeof(plainauth)) {
*outlen = 0;
*outptr = NULL;
- return CURLE_OUT_OF_MEMORY; /* plainauth too small */
+
+ /* Plainauth too small */
+ return CURLE_OUT_OF_MEMORY;
}
+ /* Calculate the reply */
memcpy(plainauth, userp, ulen);
plainauth[ulen] = '\0';
memcpy(plainauth + ulen + 1, userp, ulen);
plainauth[2 * ulen + 1] = '\0';
memcpy(plainauth + 2 * ulen + 2, passwdp, plen);
+ /* Base64 encode the reply */
return Curl_base64_encode(data, plainauth, 2 * ulen + plen + 2, outptr,
outlen);
}
size_t vlen = strlen(valuep);
if(!vlen) {
+ /* Calculate an empty reply */
*outptr = strdup("=");
if(*outptr) {
*outlen = (size_t) 1;
return CURLE_OUT_OF_MEMORY;
}
+ /* Base64 encode the value */
return Curl_base64_encode(data, valuep, vlen, outptr, outlen);
}
{
CURLcode result = CURLE_OK;
size_t chlg64len = strlen(chlg64);
- size_t len = 0;
unsigned char *chlg = (unsigned char *) NULL;
size_t chlglen = 0;
HMAC_context *ctxt;