if (mod_ssl.force_tls)
rc = M_YES;
- else if (mod_ssl.starttls) {
+ else {
if ((rc = imap_exec (idata, "STARTTLS", IMAP_CMD_FAIL_OK)) == -1)
goto bail;
if (rc != -2) {
- if (mutt_ssl_starttls (idata->conn))
- {
+ if (mutt_ssl_starttls (idata->conn)) {
mutt_error (_("Could not negotiate TLS connection"));
mutt_sleep (1);
goto err_close_conn;
- }
- else {
+ } else {
/* RFC 2595 demands we recheck CAPABILITY after TLS completes. */
if (imap_exec (idata, "CAPABILITY", 0))
goto bail;
unsigned status : 2;
unsigned capabilities : 1;
- unsigned use_stls : 2;
cmd_status cmd_capa : 2; /* optional command CAPA */
cmd_status cmd_stls : 2; /* optional command STLS */
cmd_status cmd_uidl : 2; /* optional command UIDL */
/* Attempt STLS if available and desired. */
if (!pop_data->conn->ssf && (pop_data->cmd_stls || mod_ssl.force_tls)) {
- if (mod_ssl.force_tls)
- pop_data->use_stls = 2;
- if (pop_data->use_stls == 0) {
- pop_data->use_stls = 1;
- if (mod_ssl.starttls)
- pop_data->use_stls = 2;
+ ret = pop_query(pop_data, buf, sizeof(buf), "STLS");
+ if (ret == PQ_NOT_CONNECTED)
+ goto err_conn;
+ if (ret != PQ_OK) {
+ mutt_error ("%s", pop_data->err_msg);
+ mutt_sleep (2);
}
- if (pop_data->use_stls == 2) {
- ret = pop_query(pop_data, buf, sizeof(buf), "STLS");
- if (ret == PQ_NOT_CONNECTED)
- goto err_conn;
- if (ret != PQ_OK) {
- mutt_error ("%s", pop_data->err_msg);
- mutt_sleep (2);
- }
- else if (mutt_ssl_starttls (pop_data->conn))
- {
- mutt_error (_("Could not negotiate TLS connection"));
- mutt_sleep (2);
- return PQ_ERR;
- }
+ else if (mutt_ssl_starttls (pop_data->conn))
+ {
+ mutt_error (_("Could not negotiate TLS connection"));
+ mutt_sleep (2);
+ return PQ_ERR;
}
}
** since it would otherwise have to abort the connection anyway. This
** option supersedes ``$$ssl_starttls''.
*/
- bool starttls = 1;
- /*
- ** .pp
- ** If \fIset\fP (the default), Madmutt will attempt to use STARTTLS on servers
- ** advertising the capability. When \fIunset\fP, Madmutt will not attempt to
- ** use STARTTLS regardless of the server's capabilities.
- */
bool use_sslv3 = 1;
/*
** .pp