size_t schemelen = strlen(scheme); /* Length of scheme */
+ DEBUG_printf(("8cups_auth_find(www_authenticate=\"%s\", scheme=\"%s\"(%d))", www_authenticate, scheme, (int)schemelen));
+
while (*www_authenticate)
{
/*
* Skip leading whitespace and commas...
*/
+ DEBUG_printf(("9cups_auth_find: Before whitespace: \"%s\"", www_authenticate));
while (isspace(*www_authenticate & 255) || *www_authenticate == ',')
www_authenticate ++;
+ DEBUG_printf(("9cups_auth_find: After whitespace: \"%s\"", www_authenticate));
/*
* See if this is "Scheme" followed by whitespace or the end of the string.
* Yes, this is the start of the scheme-specific information...
*/
+ DEBUG_printf(("9cups_auth_find: Returning \"%s\".", www_authenticate));
+
return (www_authenticate);
}
* Skip quoted value...
*/
- while (www_authenticate[1] && www_authenticate[1] != '\"')
+ www_authenticate ++;
+ while (*www_authenticate && *www_authenticate != '\"')
www_authenticate ++;
+
+ DEBUG_printf(("9cups_auth_find: After quoted: \"%s\"", www_authenticate));
}
www_authenticate ++;
}
+
+ DEBUG_printf(("9cups_auth_find: After skip: \"%s\"", www_authenticate));
}
+ DEBUG_puts("9cups_auth_find: Returning NULL.");
+
return (NULL);
}
int param; /* Is this a parameter? */
+ DEBUG_printf(("8cups_auth_param(scheme=\"%s\", name=\"%s\", value=%p, valsize=%d)", scheme, name, (void *)value, (int)valsize));
+
while (!isspace(*scheme & 255) && *scheme)
scheme ++;
*valptr = '\0';
+ DEBUG_printf(("9cups_auth_param: Returning \"%s\".", value));
+
return (value);
}
* Skip quoted value...
*/
- while (scheme[1] && scheme[1] != '\"')
+ scheme ++;
+ while (*scheme && *scheme != '\"')
scheme ++;
}
*value = '\0';
+ DEBUG_puts("9cups_auth_param: Returning NULL.");
+
return (NULL);
}
int param; /* Is this a parameter? */
+ DEBUG_printf(("8cups_auth_scheme(www_authenticate=\"%s\", scheme=%p, schemesize=%d)", www_authenticate, (void *)scheme, (int)schemesize));
+
while (*www_authenticate)
{
/*
* Skip quoted value...
*/
- while (www_authenticate[1] && www_authenticate[1] != '\"')
+ www_authenticate ++;
+ while (*www_authenticate && *www_authenticate != '\"')
www_authenticate ++;
}
}
if (sptr > scheme && !param)
{
*sptr = '\0';
+
+ DEBUG_printf(("9cups_auth_scheme: Returning \"%s\".", start));
+
return (start);
}
}
*scheme = '\0';
+ DEBUG_puts("9cups_auth_scheme: Returning NULL.");
+
return (NULL);
}
http->auth_ref = NULL;
}
- if (!getenv("GATEWAY_INTERFACE") && (schemedata = cups_auth_find(www_auth, "AuthKey")) != NULL && cups_auth_param(schemedata, "key", auth_key, sizeof(auth_key)))
+ if (!getenv("GATEWAY_INTERFACE") && (schemedata = cups_auth_find(www_auth, "AuthRef")) != NULL && cups_auth_param(schemedata, "key", auth_key, sizeof(auth_key)))
{
status = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &http->auth_ref);
if (status != errAuthorizationSuccess)
return (1);
# endif /* HAVE_GSSAPI */
# ifdef HAVE_AUTHORIZATION_H
- if (cups_auth_find(www_auth, "AuthKey"))
+ if (cups_auth_find(www_auth, "AuthRef"))
return (1);
# endif /* HAVE_AUTHORIZATION_H */