Home | History | Annotate | Download | only in lib

Lines Matching refs:pop3c

250   struct pop3_conn *pop3c = &conn->proto.pop3c;
260 if(pop3c->state == POP3_CAPA) {
326 struct pop3_conn *pop3c = &conn->proto.pop3c;
344 if(pop3c->state != newstate)
346 (void *)pop3c, names[pop3c->state], names[newstate]);
349 pop3c->state = newstate;
362 struct pop3_conn *pop3c = &conn->proto.pop3c;
364 pop3c->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanisms yet */
365 pop3c->sasl.authused = SASL_AUTH_NONE; /* Clear the auth. mechanism used */
366 pop3c->tls_supported = FALSE; /* Clear the TLS capability */
369 result = Curl_pp_sendf(&pop3c->pp, "%s", "CAPA");
388 result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "STLS");
405 struct pop3_conn *pop3c = &conn->proto.pop3c;
408 result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &pop3c->ssldone);
411 if(pop3c->state != POP3_UPGRADETLS)
414 if(pop3c->ssldone) {
442 result = Curl_pp_sendf(&conn->proto.pop3c.pp, "USER %s",
460 struct pop3_conn *pop3c = &conn->proto.pop3c;
479 Curl_MD5_update(ctxt, (const unsigned char *) pop3c->apoptimestamp,
480 curlx_uztoui(strlen(pop3c->apoptimestamp)));
492 result = Curl_pp_sendf(&pop3c->pp, "APOP %s %s", conn->user, secret);
513 struct pop3_conn *pop3c = &conn->proto.pop3c;
517 result = Curl_pp_sendf(&pop3c->pp, "AUTH %s %s", mech, initresp);
521 result = Curl_pp_sendf(&pop3c->pp, "AUTH %s", mech);
536 struct pop3_conn *pop3c = &conn->proto.pop3c;
538 return Curl_pp_sendf(&pop3c->pp, "%s", resp);
552 struct pop3_conn *pop3c = &conn->proto.pop3c;
557 if(!Curl_sasl_can_authenticate(&pop3c->sasl, conn)) {
562 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_SASL) {
564 result = Curl_sasl_start(&pop3c->sasl, conn, FALSE, &progress);
573 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP)
578 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT)
617 result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s %s",
621 result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s",
642 result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", "QUIT");
657 struct pop3_conn *pop3c = &conn->proto.pop3c;
680 pop3c->apoptimestamp = (char *)calloc(1, timestamplen + 1);
682 if(!pop3c->apoptimestamp)
686 memcpy(pop3c->apoptimestamp, line + i, timestamplen);
687 pop3c->apoptimestamp[timestamplen] = '\0';
690 pop3c->authtypes |= POP3_TYPE_APOP;
708 struct pop3_conn *pop3c = &conn->proto.pop3c;
719 pop3c->tls_supported = TRUE;
723 pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
727 pop3c->authtypes |= POP3_TYPE_SASL;
758 pop3c->sasl.authmechs |= mechbit;
768 if(pop3c->tls_supported)
784 pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
823 struct pop3_conn *pop3c = &conn->proto.pop3c;
828 result = Curl_sasl_continue(&pop3c->sasl, conn, pop3code, &progress);
836 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP)
841 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT)
893 result = Curl_pp_sendf(&conn->proto.pop3c.pp, "PASS %s",
929 struct pop3_conn *pop3c = &conn->proto.pop3c;
930 struct pingpong *pp = &pop3c->pp;
943 pop3c->eob = 2;
947 pop3c->strip = 2;
983 struct pop3_conn *pop3c = &conn->proto.pop3c;
984 struct pingpong *pp = &pop3c->pp;
988 if(pop3c->state == POP3_UPGRADETLS)
1005 switch(pop3c->state) {
1007 result = pop3_state_servergreet_resp(conn, pop3code, pop3c->state);
1011 result = pop3_state_capa_resp(conn, pop3code, pop3c->state);
1015 result = pop3_state_starttls_resp(conn, pop3code, pop3c->state);
1019 result = pop3_state_auth_resp(conn, pop3code, pop3c->state);
1024 result = pop3_state_apop_resp(conn, pop3code, pop3c->state);
1029 result = pop3_state_user_resp(conn, pop3code, pop3c->state);
1033 result = pop3_state_pass_resp(conn, pop3code, pop3c->state);
1037 result = pop3_state_command_resp(conn, pop3code, pop3c->state);
1047 } while(!result && pop3c->state != POP3_STOP && Curl_pp_moredata(pp));
1056 struct pop3_conn *pop3c = &conn->proto.pop3c;
1058 if((conn->handler->flags & PROTOPT_SSL) && !pop3c->ssldone) {
1059 result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &pop3c->ssldone);
1060 if(result || !pop3c->ssldone)
1064 result = Curl_pp_statemach(&pop3c->pp, FALSE);
1065 *done = (pop3c->state == POP3_STOP) ? TRUE : FALSE;
1073 struct pop3_conn *pop3c = &conn->proto.pop3c;
1075 while(pop3c->state != POP3_STOP && !result)
1076 result = Curl_pp_statemach(&pop3c->pp, TRUE);
1100 return Curl_pp_getsock(&conn->proto.pop3c.pp, socks, numsocks);
1116 struct pop3_conn *pop3c = &conn->proto.pop3c;
1117 struct pingpong *pp = &pop3c->pp;
1131 pop3c->preftype = POP3_TYPE_ANY;
1132 Curl_sasl_init(&pop3c->sasl, &saslpop3);
1264 struct pop3_conn *pop3c = &conn->proto.pop3c;
1272 if(!dead_connection && pop3c->pp.conn && pop3c->pp.conn->bits.protoconnstart)
1277 Curl_pp_disconnect(&pop3c->pp);
1280 Curl_sasl_cleanup(conn, pop3c->sasl.authused);
1283 Curl_safefree(pop3c->apoptimestamp);
1398 struct pop3_conn *pop3c = &conn->proto.pop3c;
1401 pop3c->sasl.resetprefs = TRUE;
1416 result = Curl_sasl_parse_url_auth_option(&pop3c->sasl,
1420 pop3c->preftype = POP3_TYPE_APOP;
1421 pop3c->sasl.prefmech = SASL_AUTH_NONE;
1432 if(pop3c->preftype != POP3_TYPE_APOP)
1433 switch(pop3c->sasl.prefmech) {
1435 pop3c->preftype = POP3_TYPE_NONE;
1438 pop3c->preftype = POP3_TYPE_ANY;
1441 pop3c->preftype = POP3_TYPE_SASL;
1499 struct pop3_conn *pop3c = &conn->proto.pop3c;
1510 size_t prev = pop3c->eob;
1514 if(pop3c->eob == 0) {
1515 pop3c->eob++;
1528 else if(pop3c->eob == 3)
1529 pop3c->eob++;
1533 pop3c->eob = 1;
1537 if(pop3c->eob == 1 || pop3c->eob == 4)
1538 pop3c->eob++;
1542 pop3c->eob = 0;
1546 if(pop3c->eob == 2)
1547 pop3c->eob++;
1548 else if(pop3c->eob == 3) {
1551 pop3c->eob = 0;
1556 pop3c->eob = 0;
1560 pop3c->eob = 0;
1565 if(prev && prev >= pop3c->eob) {
1569 while(prev && pop3c->strip) {
1571 pop3c->strip--;
1589 if(pop3c->eob == POP3_EOB_LEN) {
1596 pop3c->eob = 0;
1601 if(pop3c->eob)