Lines Matching refs:sasl

1268 CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl,  in Curl_sasl_parse_url_auth_option()  argument
1278 if(sasl->resetprefs) { in Curl_sasl_parse_url_auth_option()
1279 sasl->resetprefs = FALSE; in Curl_sasl_parse_url_auth_option()
1280 sasl->prefmech = SASL_AUTH_NONE; in Curl_sasl_parse_url_auth_option()
1284 sasl->prefmech = SASL_AUTH_DEFAULT; in Curl_sasl_parse_url_auth_option()
1287 sasl->prefmech |= mechbit; in Curl_sasl_parse_url_auth_option()
1299 void Curl_sasl_init(struct SASL *sasl, const struct SASLproto *params) in Curl_sasl_init() argument
1301 sasl->params = params; /* Set protocol dependent parameters */ in Curl_sasl_init()
1302 sasl->state = SASL_STOP; /* Not yet running */ in Curl_sasl_init()
1303 sasl->authmechs = SASL_AUTH_NONE; /* No known authentication mechanism yet */ in Curl_sasl_init()
1304 sasl->prefmech = SASL_AUTH_DEFAULT; /* Prefer all mechanisms */ in Curl_sasl_init()
1305 sasl->authused = SASL_AUTH_NONE; /* No the authentication mechanism used */ in Curl_sasl_init()
1306 sasl->resetprefs = TRUE; /* Reset prefmech upon AUTH parsing. */ in Curl_sasl_init()
1307 sasl->mutual_auth = FALSE; /* No mutual authentication (GSSAPI only) */ in Curl_sasl_init()
1308 sasl->force_ir = FALSE; /* Respect external option */ in Curl_sasl_init()
1316 static void state(struct SASL *sasl, struct connectdata *conn, in state() argument
1341 if(sasl->state != newstate) in state()
1343 (void *)sasl, names[sasl->state], names[newstate]); in state()
1348 sasl->state = newstate; in state()
1356 bool Curl_sasl_can_authenticate(struct SASL *sasl, struct connectdata *conn) in Curl_sasl_can_authenticate() argument
1363 if(sasl->authmechs & sasl->prefmech & SASL_MECH_EXTERNAL) in Curl_sasl_can_authenticate()
1374 CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, in Curl_sasl_start() argument
1386 sasl->force_ir = force_ir; /* Latch for future use */ in Curl_sasl_start()
1387 sasl->authused = 0; /* No mechanism used yet */ in Curl_sasl_start()
1388 enabledmechs = sasl->authmechs & sasl->prefmech; in Curl_sasl_start()
1396 sasl->authused = SASL_MECH_EXTERNAL; in Curl_sasl_start()
1404 sasl->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */ in Curl_sasl_start()
1408 sasl->authused = SASL_MECH_GSSAPI; in Curl_sasl_start()
1413 sasl->params->service, in Curl_sasl_start()
1414 sasl->mutual_auth, in Curl_sasl_start()
1424 sasl->authused = SASL_MECH_DIGEST_MD5; in Curl_sasl_start()
1429 sasl->authused = SASL_MECH_CRAM_MD5; in Curl_sasl_start()
1438 sasl->authused = SASL_MECH_NTLM; in Curl_sasl_start()
1449 sasl->authused = SASL_MECH_XOAUTH2; in Curl_sasl_start()
1460 sasl->authused = SASL_MECH_LOGIN; in Curl_sasl_start()
1468 sasl->authused = SASL_MECH_PLAIN; in Curl_sasl_start()
1477 if(resp && sasl->params->maxirlen && in Curl_sasl_start()
1478 strlen(mech) + len > sasl->params->maxirlen) { in Curl_sasl_start()
1484 result = sasl->params->sendauth(conn, mech, resp); in Curl_sasl_start()
1487 state(sasl, conn, resp? state2: state1); in Curl_sasl_start()
1502 CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn, in Curl_sasl_continue() argument
1518 if(sasl->state == SASL_FINAL) { in Curl_sasl_continue()
1519 if(code != sasl->params->finalcode) in Curl_sasl_continue()
1522 state(sasl, conn, SASL_STOP); in Curl_sasl_continue()
1526 if(sasl->state != SASL_CANCEL && code != sasl->params->contcode) { in Curl_sasl_continue()
1528 state(sasl, conn, SASL_STOP); in Curl_sasl_continue()
1532 switch(sasl->state) { in Curl_sasl_continue()
1553 sasl->params->getmessage(data->state.buffer, &serverdata); in Curl_sasl_continue()
1561 sasl->params->getmessage(data->state.buffer, &serverdata); in Curl_sasl_continue()
1564 sasl->params->service, in Curl_sasl_continue()
1583 sasl->params->getmessage(data->state.buffer, &serverdata); in Curl_sasl_continue()
1597 sasl->params->service, in Curl_sasl_continue()
1598 sasl->mutual_auth, NULL, in Curl_sasl_continue()
1604 sasl->params->getmessage(data->state.buffer, &serverdata); in Curl_sasl_continue()
1605 if(sasl->mutual_auth) { in Curl_sasl_continue()
1609 sasl->mutual_auth, in Curl_sasl_continue()
1621 sasl->params->getmessage(data->state.buffer, &serverdata); in Curl_sasl_continue()
1636 sasl->authmechs ^= sasl->authused; in Curl_sasl_continue()
1639 result = Curl_sasl_start(sasl, conn, sasl->force_ir, progress); in Curl_sasl_continue()
1640 newstate = sasl->state; /* Use state from Curl_sasl_start() */ in Curl_sasl_continue()
1651 result = sasl->params->sendcont(conn, "*"); in Curl_sasl_continue()
1656 result = sasl->params->sendcont(conn, resp); in Curl_sasl_continue()
1666 state(sasl, conn, newstate); in Curl_sasl_continue()