Lines Matching refs:pop3c
265 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_endofresp() local
276 if(pop3c->state == POP3_CAPA) { in pop3_endofresp()
313 char *message = Curl_dyn_ptr(&data->conn->proto.pop3c.pp.recvbuf); in pop3_get_message()
314 size_t len = data->conn->proto.pop3c.pp.nfinal; in pop3_get_message()
347 struct pop3_conn *pop3c = &data->conn->proto.pop3c; in pop3_state() local
365 if(pop3c->state != newstate) in pop3_state()
367 (void *)pop3c, names[pop3c->state], names[newstate]); in pop3_state()
370 pop3c->state = newstate; in pop3_state()
384 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_perform_capa() local
386 pop3c->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanisms yet */ in pop3_perform_capa()
387 pop3c->sasl.authused = SASL_AUTH_NONE; /* Clear the auth. mechanism used */ in pop3_perform_capa()
388 pop3c->tls_supported = FALSE; /* Clear the TLS capability */ in pop3_perform_capa()
391 result = Curl_pp_sendf(data, &pop3c->pp, "%s", "CAPA"); in pop3_perform_capa()
409 CURLcode result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s", "STLS"); in pop3_perform_starttls()
427 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_perform_upgrade_tls() local
440 pop3c->ssldone = ssldone; in pop3_perform_upgrade_tls()
441 if(pop3c->state != POP3_UPGRADETLS) in pop3_perform_upgrade_tls()
444 if(pop3c->ssldone) { in pop3_perform_upgrade_tls()
473 result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "USER %s", in pop3_perform_user()
492 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_perform_apop() local
511 Curl_MD5_update(ctxt, (const unsigned char *) pop3c->apoptimestamp, in pop3_perform_apop()
512 curlx_uztoui(strlen(pop3c->apoptimestamp))); in pop3_perform_apop()
524 result = Curl_pp_sendf(data, &pop3c->pp, "APOP %s %s", conn->user, secret); in pop3_perform_apop()
545 struct pop3_conn *pop3c = &data->conn->proto.pop3c; in pop3_perform_auth() local
550 result = Curl_pp_sendf(data, &pop3c->pp, "AUTH %s %s", mech, ir); in pop3_perform_auth()
554 result = Curl_pp_sendf(data, &pop3c->pp, "AUTH %s", mech); in pop3_perform_auth()
570 struct pop3_conn *pop3c = &data->conn->proto.pop3c; in pop3_continue_auth() local
574 return Curl_pp_sendf(data, &pop3c->pp, in pop3_continue_auth()
586 struct pop3_conn *pop3c = &data->conn->proto.pop3c; in pop3_cancel_auth() local
590 return Curl_pp_sendf(data, &pop3c->pp, "*"); in pop3_cancel_auth()
605 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_perform_authentication() local
610 if(!Curl_sasl_can_authenticate(&pop3c->sasl, data)) { in pop3_perform_authentication()
615 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_SASL) { in pop3_perform_authentication()
617 result = Curl_sasl_start(&pop3c->sasl, data, FALSE, &progress); in pop3_perform_authentication()
626 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP) in pop3_perform_authentication()
631 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT) in pop3_perform_authentication()
673 result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s %s", in pop3_perform_command()
676 result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s", command); in pop3_perform_command()
696 CURLcode result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "%s", "QUIT"); in pop3_perform_quit()
711 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_state_servergreet_resp() local
712 const char *line = Curl_dyn_ptr(&data->conn->proto.pop3c.pp.recvbuf); in pop3_state_servergreet_resp()
713 size_t len = data->conn->proto.pop3c.pp.nfinal; in pop3_state_servergreet_resp()
740 pop3c->apoptimestamp = Curl_memdup0(lt, timestamplen); in pop3_state_servergreet_resp()
741 if(!pop3c->apoptimestamp) in pop3_state_servergreet_resp()
744 pop3c->authtypes |= POP3_TYPE_APOP; in pop3_state_servergreet_resp()
761 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_state_capa_resp() local
762 const char *line = Curl_dyn_ptr(&data->conn->proto.pop3c.pp.recvbuf); in pop3_state_capa_resp()
763 size_t len = data->conn->proto.pop3c.pp.nfinal; in pop3_state_capa_resp()
771 pop3c->tls_supported = TRUE; in pop3_state_capa_resp()
775 pop3c->authtypes |= POP3_TYPE_CLEARTEXT; in pop3_state_capa_resp()
779 pop3c->authtypes |= POP3_TYPE_SASL; in pop3_state_capa_resp()
811 pop3c->sasl.authmechs |= mechbit; in pop3_state_capa_resp()
821 pop3c->authtypes |= POP3_TYPE_CLEARTEXT; in pop3_state_capa_resp()
825 else if(pop3code == '+' && pop3c->tls_supported) in pop3_state_capa_resp()
850 if(data->conn->proto.pop3c.pp.overflow) in pop3_state_starttls_resp()
874 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_state_auth_resp() local
879 result = Curl_sasl_continue(&pop3c->sasl, data, pop3code, &progress); in pop3_state_auth_resp()
887 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_APOP) in pop3_state_auth_resp()
892 if(pop3c->authtypes & pop3c->preftype & POP3_TYPE_CLEARTEXT) in pop3_state_auth_resp()
941 result = Curl_pp_sendf(data, &conn->proto.pop3c.pp, "PASS %s", in pop3_state_user_resp()
975 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_state_command_resp() local
976 struct pingpong *pp = &pop3c->pp; in pop3_state_command_resp()
989 pop3c->eob = 2; in pop3_state_command_resp()
993 pop3c->strip = 2; in pop3_state_command_resp()
1034 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_statemachine() local
1035 struct pingpong *pp = &pop3c->pp; in pop3_statemachine()
1040 if(pop3c->state == POP3_UPGRADETLS) in pop3_statemachine()
1057 switch(pop3c->state) { in pop3_statemachine()
1059 result = pop3_state_servergreet_resp(data, pop3code, pop3c->state); in pop3_statemachine()
1063 result = pop3_state_capa_resp(data, pop3code, pop3c->state); in pop3_statemachine()
1067 result = pop3_state_starttls_resp(data, conn, pop3code, pop3c->state); in pop3_statemachine()
1071 result = pop3_state_auth_resp(data, pop3code, pop3c->state); in pop3_statemachine()
1076 result = pop3_state_apop_resp(data, pop3code, pop3c->state); in pop3_statemachine()
1081 result = pop3_state_user_resp(data, pop3code, pop3c->state); in pop3_statemachine()
1085 result = pop3_state_pass_resp(data, pop3code, pop3c->state); in pop3_statemachine()
1089 result = pop3_state_command_resp(data, pop3code, pop3c->state); in pop3_statemachine()
1101 } while(!result && pop3c->state != POP3_STOP && Curl_pp_moredata(pp)); in pop3_statemachine()
1111 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_multi_statemach() local
1113 if((conn->handler->flags & PROTOPT_SSL) && !pop3c->ssldone) { in pop3_multi_statemach()
1116 pop3c->ssldone = ssldone; in pop3_multi_statemach()
1117 if(result || !pop3c->ssldone) in pop3_multi_statemach()
1121 result = Curl_pp_statemach(data, &pop3c->pp, FALSE, FALSE); in pop3_multi_statemach()
1122 *done = (pop3c->state == POP3_STOP); in pop3_multi_statemach()
1132 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_block_statemach() local
1134 while(pop3c->state != POP3_STOP && !result) in pop3_block_statemach()
1135 result = Curl_pp_statemach(data, &pop3c->pp, TRUE, disconnecting); in pop3_block_statemach()
1158 return Curl_pp_getsock(data, &conn->proto.pop3c.pp, socks); in pop3_getsock()
1175 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_connect() local
1176 struct pingpong *pp = &pop3c->pp; in pop3_connect()
1186 pop3c->preftype = POP3_TYPE_ANY; in pop3_connect()
1187 Curl_sasl_init(&pop3c->sasl, data, &saslpop3); in pop3_connect()
1317 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_disconnect() local
1330 Curl_pp_disconnect(&pop3c->pp); in pop3_disconnect()
1333 Curl_sasl_cleanup(conn, pop3c->sasl.authused); in pop3_disconnect()
1336 Curl_safefree(pop3c->apoptimestamp); in pop3_disconnect()
1423 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_parse_url_options() local
1439 result = Curl_sasl_parse_url_auth_option(&pop3c->sasl, in pop3_parse_url_options()
1443 pop3c->preftype = POP3_TYPE_APOP; in pop3_parse_url_options()
1444 pop3c->sasl.prefmech = SASL_AUTH_NONE; in pop3_parse_url_options()
1455 if(pop3c->preftype != POP3_TYPE_APOP) in pop3_parse_url_options()
1456 switch(pop3c->sasl.prefmech) { in pop3_parse_url_options()
1458 pop3c->preftype = POP3_TYPE_NONE; in pop3_parse_url_options()
1461 pop3c->preftype = POP3_TYPE_ANY; in pop3_parse_url_options()
1464 pop3c->preftype = POP3_TYPE_SASL; in pop3_parse_url_options()
1520 struct pop3_conn *pop3c = &conn->proto.pop3c; in pop3_write() local
1532 size_t prev = pop3c->eob; in pop3_write()
1536 if(pop3c->eob == 0) { in pop3_write()
1537 pop3c->eob++; in pop3_write()
1550 else if(pop3c->eob == 3) in pop3_write()
1551 pop3c->eob++; in pop3_write()
1555 pop3c->eob = 1; in pop3_write()
1559 if(pop3c->eob == 1 || pop3c->eob == 4) in pop3_write()
1560 pop3c->eob++; in pop3_write()
1564 pop3c->eob = 0; in pop3_write()
1568 if(pop3c->eob == 2) in pop3_write()
1569 pop3c->eob++; in pop3_write()
1570 else if(pop3c->eob == 3) { in pop3_write()
1573 pop3c->eob = 0; in pop3_write()
1578 pop3c->eob = 0; in pop3_write()
1582 pop3c->eob = 0; in pop3_write()
1587 if(prev && prev >= pop3c->eob) { in pop3_write()
1591 while(prev && pop3c->strip) { in pop3_write()
1593 pop3c->strip--; in pop3_write()
1620 if(pop3c->eob == POP3_EOB_LEN) { in pop3_write()
1627 pop3c->eob = 0; in pop3_write()
1632 if(pop3c->eob) in pop3_write()