251 |
if (!mu_tls_enable || check_capa (f_imap, "STARTTLS")) |
if (!mu_tls_enable || check_capa (f_imap, "STARTTLS")) |
252 |
return -1; |
return -1; |
253 |
|
|
254 |
|
FOLDER_DEBUG1 (folder, MU_DEBUG_PROT, "g%u STARTTLS\n", f_imap->seq); |
255 |
status = imap_writeline (f_imap, "g%u STARTTLS\r\n", |
status = imap_writeline (f_imap, "g%u STARTTLS\r\n", |
256 |
f_imap->seq, f_imap->user, f_imap->passwd); |
f_imap->seq++, f_imap->user, f_imap->passwd); |
257 |
CHECK_ERROR (f_imap, status); |
CHECK_ERROR (f_imap, status); |
258 |
status = imap_send (f_imap); |
status = imap_send (f_imap); |
259 |
CHECK_ERROR (f_imap, status); |
CHECK_ERROR (f_imap, status); |
314 |
url_get_passwd (folder->url, f_imap->passwd, n + 1, NULL); |
url_get_passwd (folder->url, f_imap->passwd, n + 1, NULL); |
315 |
} |
} |
316 |
|
|
317 |
if (f_imap->user == NULL || f_imap->passwd == NULL) |
if (f_imap->user == NULL) |
318 |
{ |
{ |
319 |
CHECK_ERROR_CLOSE (folder, f_imap, EINVAL); |
CHECK_ERROR_CLOSE (folder, f_imap, MU_ERR_NOUSERNAME); |
320 |
|
} |
321 |
|
if (f_imap->passwd == NULL) |
322 |
|
{ |
323 |
|
CHECK_ERROR_CLOSE (folder, f_imap, MU_ERR_NOPASSWORD); |
324 |
} |
} |
325 |
status = imap_writeline (f_imap, "g%u LOGIN %s %s\r\n", |
status = imap_writeline (f_imap, "g%u LOGIN %s %s\r\n", |
326 |
f_imap->seq, f_imap->user, f_imap->passwd); |
f_imap->seq, f_imap->user, f_imap->passwd); |