str_append(str, ")\r\n");
}
-static void proxy_free_password(struct client *client)
-{
- if (client->proxy_password == NULL)
- return;
-
- safe_memset(client->proxy_password, 0, strlen(client->proxy_password));
- i_free_and_null(client->proxy_password);
-}
-
static int proxy_write_starttls(struct imap_client *client, string_t *str)
{
enum login_proxy_ssl_flags ssl_flags = login_proxy_get_ssl_flags(client->common.login_proxy);
str_append(str, "\r\n");
client->proxy_sent_state |= IMAP_PROXY_SENT_STATE_LOGIN;
- proxy_free_password(&client->common);
return 0;
}
base64_encode(output, len, str);
}
str_append(str, "\r\n");
- proxy_free_password(&client->common);
client->proxy_sent_state |= IMAP_PROXY_SENT_STATE_AUTHENTICATE;
return 0;
}
"banner", "starttls", "xclient", "login1", "login2"
};
-static void proxy_free_password(struct client *client)
-{
- if (client->proxy_password == NULL)
- return;
-
- safe_memset(client->proxy_password, 0, strlen(client->proxy_password));
- i_free_and_null(client->proxy_password);
-}
-
static int proxy_send_login(struct pop3_client *client, struct ostream *output)
{
struct dsasl_client_settings sasl_set;
str_append(str, "\r\n");
o_stream_nsend(output, str_data(str), str_len(str));
- proxy_free_password(&client->common);
if (client->proxy_state != POP3_PROXY_XCLIENT)
client->proxy_state = POP3_PROXY_LOGIN2;
return 0;
/* USER successful, send PASS */
o_stream_nsend_str(output, t_strdup_printf(
"PASS %s\r\n", client->proxy_password));
- proxy_free_password(client);
pop3_client->proxy_state = POP3_PROXY_LOGIN2;
return 0;
case POP3_PROXY_LOGIN2:
"banner", "ehlo", "starttls", "tls-ehlo", "xclient", "authenticate"
};
-static void proxy_free_password(struct client *client)
-{
- if (client->proxy_password == NULL)
- return;
-
- safe_memset(client->proxy_password, 0, strlen(client->proxy_password));
- i_free_and_null(client->proxy_password);
-}
-
static buffer_t *
proxy_compose_xclient_forward(struct submission_client *client)
{
str_append(str, "\r\n");
o_stream_nsend(output, str_data(str), str_len(str));
- proxy_free_password(&client->common);
-
if (client->proxy_state != SUBMISSION_PROXY_XCLIENT)
client->proxy_state = SUBMISSION_PROXY_AUTHENTICATE;
return 0;