Lines Matching defs:pop3c

207   struct pop3_conn *pop3c = &conn->proto.pop3c;
218 if(pop3c->state == POP3_CAPA) {
255 char *message = Curl_dyn_ptr(&data->conn->proto.pop3c.pp.recvbuf);
256 size_t len = data->conn->proto.pop3c.pp.nfinal;
289 struct pop3_conn *pop3c = &data->conn->proto.pop3c;
307 if(pop3c->state != newstate)
309 (void *)pop3c, names[pop3c->state], names[newstate]);
312 pop3c->state = newstate;
326 struct pop3_conn *pop3c = &conn->proto.pop3c;
328 pop3c->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanisms yet */
329 pop3c->sasl.authused = SASL_AUTH_NONE; /* Clear the auth. mechanism used */
330 pop3c->tls_supported = FALSE; /* Clear the TLS capability */
333 result = Curl_pp_sendf(data, &pop3c->pp, "%s", "CAPA");
351 CURLcode result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s", "STLS");
369 struct pop3_conn *pop3c = &conn->proto.pop3c;
382 pop3c->ssldone = ssldone;
383 if(pop3c->state != POP3_UPGRADETLS)
386 if(pop3c->ssldone) {
415 result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "USER %s",
434 struct pop3_conn *pop3c = &conn->proto.pop3c;
453 Curl_MD5_update(ctxt, (const unsigned char *) pop3c->apoptimestamp,
454 curlx_uztoui(strlen(pop3c->apoptimestamp)));
466 result = Curl_pp_sendf(data, &pop3c->pp, "APOP %s %s", conn->user, secret);
487 struct pop3_conn *pop3c = &data->conn->proto.pop3c;
492 result = Curl_pp_sendf(data, &pop3c->pp, "AUTH %s %s", mech, ir);
496 result = Curl_pp_sendf(data, &pop3c->pp, "AUTH %s", mech);
512 struct pop3_conn *pop3c = &data->conn->proto.pop3c;
516 return Curl_pp_sendf(data, &pop3c->pp,
528 struct pop3_conn *pop3c = &data->conn->proto.pop3c;
532 return Curl_pp_sendf(data, &pop3c->pp, "*");
547 struct pop3_conn *pop3c = &conn->proto.pop3c;
552 if(!Curl_sasl_can_authenticate(&pop3c->sasl, data)) {
557 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_SASL) {
559 result = Curl_sasl_start(&pop3c->sasl, data, FALSE, &progress);
568 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP)
573 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT)
612 result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s %s",
616 result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s",
636 CURLcode result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s", "QUIT");
651 struct pop3_conn *pop3c = &conn->proto.pop3c;
652 const char *line = Curl_dyn_ptr(&data->conn->proto.pop3c.pp.recvbuf);
653 size_t len = data->conn->proto.pop3c.pp.nfinal;
680 pop3c->apoptimestamp = Curl_memdup0(lt, timestamplen);
681 if(!pop3c->apoptimestamp)
684 pop3c->authtypes |= POP3_TYPE_APOP;
701 struct pop3_conn *pop3c = &conn->proto.pop3c;
702 const char *line = Curl_dyn_ptr(&data->conn->proto.pop3c.pp.recvbuf);
703 size_t len = data->conn->proto.pop3c.pp.nfinal;
711 pop3c->tls_supported = TRUE;
715 pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
719 pop3c->authtypes |= POP3_TYPE_SASL;
751 pop3c->sasl.authmechs |= mechbit;
761 pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
765 else if(pop3code == '+' && pop3c->tls_supported)
790 if(data->conn->proto.pop3c.pp.overflow)
814 struct pop3_conn *pop3c = &conn->proto.pop3c;
819 result = Curl_sasl_continue(&pop3c->sasl, data, pop3code, &progress);
827 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP)
832 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT)
881 result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "PASS %s",
915 struct pop3_conn *pop3c = &conn->proto.pop3c;
916 struct pingpong *pp = &pop3c->pp;
929 pop3c->eob = 2;
933 pop3c->strip = 2;
975 struct pop3_conn *pop3c = &conn->proto.pop3c;
976 struct pingpong *pp = &pop3c->pp;
981 if(pop3c->state == POP3_UPGRADETLS)
998 switch(pop3c->state) {
1000 result = pop3_state_servergreet_resp(data, pop3code, pop3c->state);
1004 result = pop3_state_capa_resp(data, pop3code, pop3c->state);
1008 result = pop3_state_starttls_resp(data, conn, pop3code, pop3c->state);
1012 result = pop3_state_auth_resp(data, pop3code, pop3c->state);
1017 result = pop3_state_apop_resp(data, pop3code, pop3c->state);
1022 result = pop3_state_user_resp(data, pop3code, pop3c->state);
1026 result = pop3_state_pass_resp(data, pop3code, pop3c->state);
1030 result = pop3_state_command_resp(data, pop3code, pop3c->state);
1042 } while(!result && pop3c->state != POP3_STOP && Curl_pp_moredata(pp));
1052 struct pop3_conn *pop3c = &conn->proto.pop3c;
1054 if((conn->handler->flags & PROTOPT_SSL) && !pop3c->ssldone) {
1057 pop3c->ssldone = ssldone;
1058 if(result || !pop3c->ssldone)
1062 result = Curl_pp_statemach(data, &pop3c->pp, FALSE, FALSE);
1063 *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(data, &pop3c->pp, TRUE, disconnecting);
1099 return Curl_pp_getsock(data, &conn->proto.pop3c.pp, socks);
1116 struct pop3_conn *pop3c = &conn->proto.pop3c;
1117 struct pingpong *pp = &pop3c->pp;
1127 pop3c->preftype = POP3_TYPE_ANY;
1128 Curl_sasl_init(&pop3c->sasl, data, &saslpop3);
1258 struct pop3_conn *pop3c = &conn->proto.pop3c;
1271 Curl_pp_disconnect(&pop3c->pp);
1274 Curl_sasl_cleanup(conn, pop3c->sasl.authused);
1277 Curl_safefree(pop3c->apoptimestamp);
1364 struct pop3_conn *pop3c = &conn->proto.pop3c;
1380 result = Curl_sasl_parse_url_auth_option(&pop3c->sasl,
1384 pop3c->preftype = POP3_TYPE_APOP;
1385 pop3c->sasl.prefmech = SASL_AUTH_NONE;
1396 if(pop3c->preftype != POP3_TYPE_APOP)
1397 switch(pop3c->sasl.prefmech) {
1399 pop3c->preftype = POP3_TYPE_NONE;
1402 pop3c->preftype = POP3_TYPE_ANY;
1405 pop3c->preftype = POP3_TYPE_SASL;
1460 struct pop3_conn *pop3c = &conn->proto.pop3c;
1471 size_t prev = pop3c->eob;
1475 if(pop3c->eob == 0) {
1476 pop3c->eob++;
1489 else if(pop3c->eob == 3)
1490 pop3c->eob++;
1494 pop3c->eob = 1;
1498 if(pop3c->eob == 1 || pop3c->eob == 4)
1499 pop3c->eob++;
1503 pop3c->eob = 0;
1507 if(pop3c->eob == 2)
1508 pop3c->eob++;
1509 else if(pop3c->eob == 3) {
1512 pop3c->eob = 0;
1517 pop3c->eob = 0;
1521 pop3c->eob = 0;
1526 if(prev && prev >= pop3c->eob) {
1530 while(prev && pop3c->strip) {
1532 pop3c->strip--;
1559 if(pop3c->eob == POP3_EOB_LEN) {
1566 pop3c->eob = 0;
1571 if(pop3c->eob)