mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
Eliminate the 'if available' connection security options
These options originated in the AOSP email client from which K-9 Mail was forked. They provide an odd combination of 2 features: 1. Don't bother to authenticate the server's certificate (applies to both SSL/TLS and STARTTLS); i.e., blindly accept all certificates. This is generally a bad security policy which is susceptible to MITM attacks. 2. If STARTTLS is selected but the server doesn't claim to support STARTTLS, then proceed without using encryption. This, too, is a bad security policy which is susceptible to MITM attacks. Since the time that K-9 Mail was forked, a couple things have changed: > K-9 Mail has implemented the ability for users to review and permanently accept individual certificates that would otherwise fail authentication. With this ability, there is no need for a user to subject themselves to the ongoing risks of feature 1. above. Hence, this commit removes feature 1. > The AOSP email client has changed its behavior and no longer permits a security downgrade to an unencrypted connection if the server doesn't claim to support STARTTLS (i.e., they eliminated feature 2. above). K-9 Mail should do the same. It's unlikely that a server is going to provide STARTTLS on an intermittent basis, so providing a contingency for such unusual behavior is an unnecessary risk. Hence, this commit removes that feature as well. Effect on existing users: If the old connection security setting was "SSL/TLS (if available)" (which now gets remapped to "SSL/TLS"), and the server does not provide a certificate that can be authenticated, then a "Certificate error for <account name>" notification is generated telling the user to check their server settings. Tapping the notification takes the user to the relevant server settings, where the user can tap "Next" to review the certificate and choose to permanently accept it. This process would occur during the first syncing of folders after application upgrade or (in the case of SMTP) during the first attempt to send a message. If the connection security setting was "STARTTLS (if available)" (which now gets remapped to "STARTTLS"), and the server does not provide a certificate that can be authenticated, then the same process as above would occur. If the old connection security setting was "STARTTLS (if available)", and the server doesn't claim to support STARTTLS, then the user would get a certificate error notification which would lead them to the server's settings. There they would need to choose a different connection security -- most likely "NONE". If they didn't change anything but instead just tapped "Next", the server settings would be checked again and a dialog would pop up saying, "Cannot connect to server. (STARTTLS connection security not available)". (The implementation of notifications when STARTTLS is not available is not actually included here -- it's in the commit that follows.) Regarding the changes to providers.xml: in cases where the scheme ended with "+ssl", the schemes were simply updated by appending "+". In cases where the scheme ended with "+tls", a check of the server was made to assure that STARTTLS was available before appending "+" to the scheme. Domains paran.com and nate.com failed the check and were removed because no current information could be found. Domains me.com and mac.com also failed and were updated based on http://support.apple.com/kb/ht4864.
This commit is contained in:
parent
39590d49bd
commit
daea7f1ecd
@ -389,10 +389,6 @@ Si us plau, envia\'ns els errors, contribueix a millorar-lo a
|
||||
<string name="account_setup_incoming_security_label">Tipus de seguretat</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Tipus d\'autenticació</string>
|
||||
<string name="account_setup_incoming_security_none_label">Cap</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (si és disponible)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (sempre)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (si és disponible)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (sempre)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Quan esborro missatges</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">No els esborris del servidor</string>
|
||||
|
@ -393,10 +393,6 @@ Posílejte prosím chybová hlášení, přispívejte novými funkcemi a ptejte
|
||||
<string name="account_setup_incoming_security_label">Typ zabezpečení</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Typ ověření</string>
|
||||
<string name="account_setup_incoming_security_none_label">Žádné</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (je-li dostupné)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (vždy)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (je-li dostupné)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (vždy)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Když smažu zprávu</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Nemazat ji na serveru</string>
|
||||
|
@ -389,10 +389,6 @@ Vær venlig at sende fejlrapporter, anmodning om nye funktioner, og spørgsmål
|
||||
<string name="account_setup_incoming_security_label">Sikkerhed</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Autentifikations type</string>
|
||||
<string name="account_setup_incoming_security_none_label">Ingen</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (hvis tilgængelig)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (altid)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (hvis tilgængelig)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (altid)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Når jeg sletter en mail</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Undlad at slette på server</string>
|
||||
|
@ -387,10 +387,6 @@ Um Fehler zu melden, neue Funktionen vorzuschlagen oder Fragen zu stellen, besuc
|
||||
<string name="account_setup_incoming_security_label">Sicherheitstyp</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Authentifizierungstyp</string>
|
||||
<string name="account_setup_incoming_security_none_label">Keine Verschlüsselung</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (falls verfügbar)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (immer)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (falls verfügbar)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (immer)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Beim Löschen von Nachrichten</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Nie von Server löschen</string>
|
||||
|
@ -388,10 +388,6 @@
|
||||
<string name="account_setup_incoming_security_label">Ασφάλεια</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Πιστοποίηση</string>
|
||||
<string name="account_setup_incoming_security_none_label">Καμιά</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (αν υπάρχει)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (πάντοτε)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (αν υπάρχει)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (πάντοτε)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Κατά τη διαγραφή μηνύματος</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Να μη διαγράφεται στο server</string>
|
||||
|
@ -388,10 +388,6 @@ Por favor, envía los errores detectados, contribuye con nuevas funcionalidades
|
||||
<string name="account_setup_incoming_security_label">Tipo de Seguridad</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Tipo de autentificación</string>
|
||||
<string name="account_setup_incoming_security_none_label">Ninguna</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (si disponible)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (siempre)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (si disponible)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (siempre)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Borrado de mensajes</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">No borrar del servidor</string>
|
||||
|
@ -389,10 +389,6 @@ Virheraportit, osallistuminen projektiin ja kysymykset: Mene osoitteeseen
|
||||
<string name="account_setup_incoming_security_label">Suojauksen tyyppi</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Todennuksen tyyppi</string>
|
||||
<string name="account_setup_incoming_security_none_label">Ei mitään</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (jos käytettävissä)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (aina)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (jos käytettävissä)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (aina)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Kun viesti poistetaan</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Älä poista palvelimelta</string>
|
||||
|
@ -414,10 +414,6 @@ de plus</string>
|
||||
<string name="account_setup_incoming_security_label">Type de sécurité</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Type d\'authentification</string>
|
||||
<string name="account_setup_incoming_security_none_label">Aucun</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (si disponible)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (toujours)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (si disponible)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (toujours)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Supprimer les messages du serveur\u00A0:</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Jamais</string>
|
||||
|
@ -388,10 +388,6 @@ Por favor, envía os erros detectados, contribúe con novas funcionalidas e preg
|
||||
<string name="account_setup_incoming_security_label">Tipo de Seguridade</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Tipo de autentificación</string>
|
||||
<string name="account_setup_incoming_security_none_label">Ningunha</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (se dispoñible)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (sempre)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (se dispoñible)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (sempre)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Borrado de mesaxes</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Non borrar do servidor</string>
|
||||
|
@ -389,10 +389,6 @@ Hibajelentéseivel hozzájárul az újabb verziók tökéletesítéséhez, kérd
|
||||
<string name="account_setup_incoming_security_label">Kapcsolat biztonsága</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Hitelesítés típus</string>
|
||||
<string name="account_setup_incoming_security_none_label">Nincs</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (ha elérhető)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (mindig)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (ha elérhető)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (mindig)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Üzenet törlésekor</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Ne törlődjön a szerverről</string>
|
||||
|
@ -388,10 +388,6 @@ Invia le tue segnalazioni, suggerisci nuove funzionalità e chiedi informazioni
|
||||
<string name="account_setup_incoming_security_label">Tipo di protezione</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Tipo di autenticazione</string>
|
||||
<string name="account_setup_incoming_security_none_label">Nessuna</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (se disponibile)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (sempre)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (se disponibile)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (sempre)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Quando si elimina un messaggio</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Non eliminare dal server</string>
|
||||
|
@ -390,10 +390,6 @@
|
||||
<string name="account_setup_incoming_security_label">סוג אבטחה</string>
|
||||
<string name="account_setup_incoming_auth_type_label">סוג אימות</string>
|
||||
<string name="account_setup_incoming_security_none_label">כלום</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (אם זמין)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (תמיד)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (אם זמין)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (תמיד)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">כאשר אני מוחק הודעה</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">אל תמחוק בשרת</string>
|
||||
|
@ -389,10 +389,6 @@ K-9 は大多数のメールクライアントと同様に、ほとんどのフ
|
||||
<string name="account_setup_incoming_security_label">保護された接続</string>
|
||||
<string name="account_setup_incoming_auth_type_label">認証タイプ</string>
|
||||
<string name="account_setup_incoming_security_none_label">使用しない</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">可能なら SSL/TLS を使用する</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS を使用する</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">可能なら STARTTLS を使用する</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS を使用する</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">メール削除時の動作</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">サーバでは削除しない</string>
|
||||
|
@ -387,10 +387,6 @@ K-9 메일은 대부분의 무료 hotmail 계정을 지원하지 않으며, 다
|
||||
<string name="account_setup_incoming_security_label">보안 연결</string>
|
||||
<string name="account_setup_incoming_auth_type_label">인증 방식</string>
|
||||
<string name="account_setup_incoming_security_none_label">없음</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (유효할 경우)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (모든 인증서 허용)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (유효할 경우)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (모든 인증서 허용)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">메시지 삭제 시</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">서버에는 메일을 삭제하지 않음</string>
|
||||
|
@ -388,10 +388,6 @@ Praneškite apie klaidas, pridėkite naujų galimybių ir užduokite klausimus m
|
||||
<string name="account_setup_incoming_security_label">Saugumas</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Tapatumo nustatymas</string>
|
||||
<string name="account_setup_incoming_security_none_label">Joks</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (jei įmanoma)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (visada)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (jei įmanoma)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (visada)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Kai pašalinu laišką</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Nešalinti serveryje</string>
|
||||
|
@ -388,10 +388,6 @@ Graag foutrapporten, bijdrage nieuwe functies en vragen stellen op
|
||||
<string name="account_setup_incoming_security_label">Beveiligings type</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Authenticatie type</string>
|
||||
<string name="account_setup_incoming_security_none_label">Geen</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (indien beschikbaar)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (altijd)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (indien beschikbaar)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (altijd)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Wanneer ik een bericht verwijder</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Verwijder niet van server</string>
|
||||
|
@ -399,10 +399,6 @@ Wszelkie zgłoszenia usterek, zapytania oraz nowe pomysły prosimy przesyłać z
|
||||
<string name="account_setup_incoming_security_label">Zabezpieczenia</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Rodzaj uwierzytelnienia</string>
|
||||
<string name="account_setup_incoming_security_none_label">Brak</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (jeśli dostępne)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (zawsze)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (jeśli dostępne)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (zawsze)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Gdy skasuję wiadomość</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Nie usuwaj z serwera</string>
|
||||
|
@ -388,10 +388,6 @@ Por favor, nos envie relatórios de bugs, contribua para novas melhorias e faça
|
||||
<string name="account_setup_incoming_security_label">Tipo de segurança</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Tipo de autenticação</string>
|
||||
<string name="account_setup_incoming_security_none_label">Nenhum</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (se disponível)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (sempre)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (se disponível)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (sempre)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Quando eu excluir uma mensagem</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Não excluí-la do servidor</string>
|
||||
|
@ -389,10 +389,6 @@ K-9 Mail — почтовый клиент для Android.
|
||||
<string name="account_setup_incoming_security_label">Безопасность</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Аутентификация</string>
|
||||
<string name="account_setup_incoming_security_none_label">Нет</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (если доступно)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (всегда)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (если доступно)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (всегда)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Удалённое, на сервере</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Оставить</string>
|
||||
|
@ -388,10 +388,6 @@ Prosím, nahlasujte prípadné chyby, prispievajte novými funkciami a pýtajte
|
||||
<string name="account_setup_incoming_security_label">Zabezpečenie</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Overenie</string>
|
||||
<string name="account_setup_incoming_security_none_label">Žiadne</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (ak je k dispozícii)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (vždy)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (ak je k dispozícii)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (vždy)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Akcia po vymazaní správy</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Ponechať na serveri</string>
|
||||
|
@ -389,10 +389,6 @@ Vänligen skicka felrapporter, hjälp till med nya funktioner och ställ frågor
|
||||
<string name="account_setup_incoming_security_label">Säkerhetstyp</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Autentiseringstyp</string>
|
||||
<string name="account_setup_incoming_security_none_label">Ingen</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (om tillgängligt)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (alltid)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (om tillgängligt)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (alltid)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">När jag raderar ett brev</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Radera inte på servern</string>
|
||||
|
@ -388,10 +388,6 @@ Lütfen hata raporlarınızı, istediğiniz yeni özellikleri ve sorularınızı
|
||||
<string name="account_setup_incoming_security_label">Güvenlik tipi</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Kimlik doğrulama tipi</string>
|
||||
<string name="account_setup_incoming_security_none_label">Hiçbiri</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (Varsa)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (daima)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (Varsa)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (Daima)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Bir mesaj sildiğim zaman</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Sunucudan silme</string>
|
||||
|
@ -388,10 +388,6 @@ K-9 Mail це поштовий клієнт з відкритим вихідни
|
||||
<string name="account_setup_incoming_security_label">Тип системи захисту</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Метод автентифікації</string>
|
||||
<string name="account_setup_incoming_security_none_label">Немає</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (якщо доступно)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (завжди)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (якщо доступно)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (завжди)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">Коли повідомлення видалено</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Не видаляти на сервері</string>
|
||||
|
@ -387,10 +387,6 @@ K-9改进的功能包括:
|
||||
<string name="account_setup_incoming_security_label">加密方法</string>
|
||||
<string name="account_setup_incoming_auth_type_label">身份验证方法</string>
|
||||
<string name="account_setup_incoming_security_none_label">无</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS(如果可能的话)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS(总是)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS(如果可能的话)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS(总是)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">当我删除邮件时</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">不要从服务器上删除</string>
|
||||
|
@ -361,10 +361,6 @@
|
||||
<string name="account_setup_incoming_security_label">加密類型</string>
|
||||
<string name="account_setup_incoming_auth_type_label">身份驗證類型</string>
|
||||
<string name="account_setup_incoming_security_none_label">無</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS(如果可用)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS(預設)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS(如果可用)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS(預設)</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">當我刪除郵件時</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">不要從伺服器上刪除</string>
|
||||
|
@ -399,10 +399,8 @@ Please submit bug reports, contribute new features and ask questions at
|
||||
<string name="account_setup_incoming_security_label">Security</string>
|
||||
<string name="account_setup_incoming_auth_type_label">Authentication</string>
|
||||
<string name="account_setup_incoming_security_none_label">None</string>
|
||||
<string name="account_setup_incoming_security_ssl_optional_label">SSL/TLS (if available)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS (always)</string>
|
||||
<string name="account_setup_incoming_security_tls_optional_label">STARTTLS (if available)</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS (always)</string>
|
||||
<string name="account_setup_incoming_security_ssl_label">SSL/TLS</string>
|
||||
<string name="account_setup_incoming_security_tls_label">STARTTLS</string>
|
||||
|
||||
<string name="account_setup_incoming_delete_policy_label">When I delete a message</string>
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Do not delete on server</string>
|
||||
|
@ -36,16 +36,12 @@
|
||||
|
||||
Valid incoming uri schemes are:
|
||||
imap IMAP with no transport security.
|
||||
imap+tls IMAP with optional TLS transport security.
|
||||
If TLS is not available the connection is made as "imap"
|
||||
imap+tls+ IMAP with required TLS transport security.
|
||||
If TLS is not available the conneciton fails.
|
||||
imap+ssl+ IMAP with required SSL transport security.
|
||||
If SSL is not available the connection fails.
|
||||
|
||||
pop3 POP3 with no transport security.
|
||||
pop3+tls POP3 with optional TLS transport security.
|
||||
If TLS is not available the connection is made as "pop3"
|
||||
pop3+tls+ POP3 with required TLS transport security.
|
||||
If TLS is not available the conneciton fails.
|
||||
pop3+ssl+ POP3 with required SSL transport security.
|
||||
@ -53,8 +49,6 @@
|
||||
|
||||
Valid outgoing uri schemes are:
|
||||
smtp SMTP with no transport security.
|
||||
smtp+tls SMTP with optional TLS transport security.
|
||||
If TLS is not available the connection is made as "smtp"
|
||||
smtp+tls+ SMTP with required TLS transport security.
|
||||
If TLS is not available the conneciton fails.
|
||||
smtp+ssl+ SMTP with required SSL transport security.
|
||||
@ -127,8 +121,8 @@
|
||||
<outgoing uri="smtp+ssl+://smtp.east.cox.net" username="$user" />
|
||||
</provider>
|
||||
<provider id="dotmac" label=".Mac" domain="mac.com">
|
||||
<incoming uri="imap+tls//mail.mac.com" username="$email" />
|
||||
<outgoing uri="smtp+tls://smtp.mac.com" username="$email" />
|
||||
<incoming uri="imap+ssl+://imap.mail.me.com" username="$user" />
|
||||
<outgoing uri="smtp+tls+://smtp.mail.me.com" username="$email" />
|
||||
</provider>
|
||||
<provider id="earthlink" label="Earthlink" domain="earthlink.net">
|
||||
<incoming uri="pop3://pop.earthlink.net" username="$email" />
|
||||
@ -154,10 +148,9 @@
|
||||
<incoming uri="imap+ssl+://imap-mail.outlook.com" username="$email" />
|
||||
<outgoing uri="smtp+tls+://smtp-mail.outlook.com" username="$email" />
|
||||
</provider>
|
||||
<!-- Note: Mac Mail.app sets IMAP to mail.mac.com, but it's the same server -->
|
||||
<provider id="mobileme" label="MobileMe" domain="me.com">
|
||||
<incoming uri="imap+tls://mail.me.com" username="$email" />
|
||||
<outgoing uri="smtp+tls://smtp.me.com" username="$email" />
|
||||
<incoming uri="imap+ssl+://imap.mail.me.com" username="$user" />
|
||||
<outgoing uri="smtp+tls+://smtp.mail.me.com" username="$email" />
|
||||
</provider>
|
||||
<provider id="netzero" label="NetZero" domain="netzero.com">
|
||||
<incoming uri="pop3://pop.netzero.com" username="$user" />
|
||||
@ -296,12 +289,12 @@
|
||||
<outgoing uri="smtp://smtp.wp.pl" username="$user" />
|
||||
</provider>
|
||||
<provider id="interia" label="Interia" domain="interia.pl">
|
||||
<incoming uri="pop3+ssl://poczta.interia.pl" username="$user" />
|
||||
<outgoing uri="smtp+ssl://poczta.interia.pl" username="$user" />
|
||||
<incoming uri="pop3+ssl+://poczta.interia.pl" username="$user" />
|
||||
<outgoing uri="smtp+ssl+://poczta.interia.pl" username="$user" />
|
||||
</provider>
|
||||
<provider id="o2" label="O2" domain="o2.pl">
|
||||
<incoming uri="pop3+ssl://poczta.o2.pl" username="$user" />
|
||||
<outgoing uri="smtp+ssl://poczta.o2.pl" username="$user" />
|
||||
<incoming uri="pop3+ssl+://poczta.o2.pl" username="$user" />
|
||||
<outgoing uri="smtp+ssl+://poczta.o2.pl" username="$user" />
|
||||
</provider>
|
||||
|
||||
<!-- Japanese -->
|
||||
@ -323,28 +316,18 @@
|
||||
<!-- Korean -->
|
||||
<provider id="naver" label="Naver" domain="naver.com"
|
||||
note="@string/provider_note_naver">
|
||||
<incoming uri="imap+ssl://imap.naver.com" username="$user" />
|
||||
<outgoing uri="smtp+tls://smtp.naver.com:587" username="$user" />
|
||||
<incoming uri="imap+ssl+://imap.naver.com" username="$user" />
|
||||
<outgoing uri="smtp+tls+://smtp.naver.com:587" username="$user" />
|
||||
</provider>
|
||||
<provider id="hanmail" label="Hanmail" domain="hanmail.net"
|
||||
note="@string/provider_note_hanmail">
|
||||
<incoming uri="imap+ssl://imap.hanmail.net" username="$user" />
|
||||
<outgoing uri="smtp+ssl://smtp.hanmail.net" username="$user" />
|
||||
<incoming uri="imap+ssl+://imap.hanmail.net" username="$user" />
|
||||
<outgoing uri="smtp+ssl+://smtp.hanmail.net" username="$user" />
|
||||
</provider>
|
||||
<provider id="daum" label="Hanmail" domain="daum.net"
|
||||
note="@string/provider_note_hanmail">
|
||||
<incoming uri="imap+ssl://imap.hanmail.net" username="$user" />
|
||||
<outgoing uri="smtp+ssl://smtp.hanmail.net" username="$user" />
|
||||
</provider>
|
||||
<provider id="paran" label="Paran" domain="paran.com"
|
||||
note="@string/provider_note_paran">
|
||||
<incoming uri="imap+ssl://imap.paran.com" username="$email" />
|
||||
<outgoing uri="smtp+tls://smtp.paran.com" username="$email" />
|
||||
</provider>
|
||||
<provider id="nate" label="Nate" domain="nate.com"
|
||||
note="@string/provider_note_nate">
|
||||
<incoming uri="imap+ssl://imap.nate.com" username="$user" />
|
||||
<outgoing uri="smtp+tls://smtp.mail.nate.com" username="$user" />
|
||||
<incoming uri="imap+ssl+://imap.hanmail.net" username="$user" />
|
||||
<outgoing uri="smtp+ssl+://smtp.hanmail.net" username="$user" />
|
||||
</provider>
|
||||
|
||||
<!-- Russia -->
|
||||
@ -538,11 +521,11 @@
|
||||
|
||||
<!-- Developers' vanity providers -->
|
||||
<provider id="fsck.com" label="Jesse's personal mail" domain="fsck.com" >
|
||||
<incoming uri="imap+ssl://fsck.com" username="$user" />
|
||||
<outgoing uri="smtp+tls://mail.bestpractical.com:2525" />
|
||||
<incoming uri="imap+ssl+://fsck.com" username="$user" />
|
||||
<outgoing uri="smtp+tls+://mail.bestpractical.com:2525" />
|
||||
</provider>
|
||||
<provider id="bestpractical.com" label="Best Practical Solutions" domain="bestpractical.com" >
|
||||
<incoming uri="imap+ssl://imap.bestpractical.com" username="$user" />
|
||||
<outgoing uri="smtp+tls://smtp.bestpractical.com:2525" />
|
||||
<incoming uri="imap+ssl+://imap.bestpractical.com" username="$user" />
|
||||
<outgoing uri="smtp+tls+://smtp.bestpractical.com:2525" />
|
||||
</provider>
|
||||
</providers>
|
||||
|
@ -327,7 +327,6 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
|
||||
case NONE:
|
||||
port = mDefaultPort;
|
||||
break;
|
||||
case STARTTLS_OPTIONAL:
|
||||
case STARTTLS_REQUIRED:
|
||||
if (WebDavStore.STORE_TYPE.equals(mStoreType)) {
|
||||
/*
|
||||
@ -340,7 +339,6 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
|
||||
port = mDefaultPort;
|
||||
}
|
||||
break;
|
||||
case SSL_TLS_OPTIONAL:
|
||||
case SSL_TLS_REQUIRED:
|
||||
port = mDefaultSslPort;
|
||||
break;
|
||||
@ -354,7 +352,6 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
|
||||
private void updateAuthPlainTextFromSecurityType(ConnectionSecurity securityType) {
|
||||
switch (securityType) {
|
||||
case NONE:
|
||||
case STARTTLS_OPTIONAL:
|
||||
AuthType.PLAIN.useInsecureText(true, mAuthTypeAdapter);
|
||||
break;
|
||||
default:
|
||||
|
@ -235,11 +235,9 @@ public class AccountSetupOutgoing extends K9Activity implements OnClickListener,
|
||||
String port;
|
||||
switch (securityType) {
|
||||
case NONE:
|
||||
case STARTTLS_OPTIONAL:
|
||||
case STARTTLS_REQUIRED:
|
||||
port = SMTP_PORT;
|
||||
break;
|
||||
case SSL_TLS_OPTIONAL:
|
||||
case SSL_TLS_REQUIRED:
|
||||
port = SMTP_SSL_PORT;
|
||||
break;
|
||||
@ -253,7 +251,6 @@ public class AccountSetupOutgoing extends K9Activity implements OnClickListener,
|
||||
private void updateAuthPlainTextFromSecurityType(ConnectionSecurity securityType) {
|
||||
switch (securityType) {
|
||||
case NONE:
|
||||
case STARTTLS_OPTIONAL:
|
||||
AuthType.PLAIN.useInsecureText(true, mAuthTypeAdapter);
|
||||
break;
|
||||
default:
|
||||
|
@ -5,9 +5,7 @@ import com.fsck.k9.R;
|
||||
|
||||
public enum ConnectionSecurity {
|
||||
NONE(R.string.account_setup_incoming_security_none_label),
|
||||
STARTTLS_OPTIONAL(R.string.account_setup_incoming_security_tls_optional_label),
|
||||
STARTTLS_REQUIRED(R.string.account_setup_incoming_security_tls_label),
|
||||
SSL_TLS_OPTIONAL(R.string.account_setup_incoming_security_ssl_optional_label),
|
||||
SSL_TLS_REQUIRED(R.string.account_setup_incoming_security_ssl_label);
|
||||
|
||||
private final int mResourceId;
|
||||
|
@ -146,11 +146,9 @@ public class ImapStore extends Store {
|
||||
*
|
||||
* <p>Possible forms:</p>
|
||||
* <pre>
|
||||
* imap://auth:user:password@server:port CONNECTION_SECURITY_NONE
|
||||
* imap+tls://auth:user:password@server:port CONNECTION_SECURITY_TLS_OPTIONAL
|
||||
* imap+tls+://auth:user:password@server:port CONNECTION_SECURITY_TLS_REQUIRED
|
||||
* imap+ssl+://auth:user:password@server:port CONNECTION_SECURITY_SSL_REQUIRED
|
||||
* imap+ssl://auth:user:password@server:port CONNECTION_SECURITY_SSL_OPTIONAL
|
||||
* imap://auth:user:password@server:port ConnectionSecurity.NONE
|
||||
* imap+tls+://auth:user:password@server:port ConnectionSecurity.STARTTLS_REQUIRED
|
||||
* imap+ssl+://auth:user:password@server:port ConnectionSecurity.SSL_TLS_REQUIRED
|
||||
* </pre>
|
||||
*/
|
||||
public static ImapStoreSettings decodeUri(String uri) {
|
||||
@ -171,21 +169,27 @@ public class ImapStore extends Store {
|
||||
}
|
||||
|
||||
String scheme = imapUri.getScheme();
|
||||
/*
|
||||
* Currently available schemes are:
|
||||
* imap
|
||||
* imap+tls+
|
||||
* imap+ssl+
|
||||
*
|
||||
* The following are obsolete schemes that may be found in pre-existing
|
||||
* settings from earlier versions or that may be found when imported. We
|
||||
* continue to recognize them and re-map them appropriately:
|
||||
* imap+tls
|
||||
* imap+ssl
|
||||
*/
|
||||
if (scheme.equals("imap")) {
|
||||
connectionSecurity = ConnectionSecurity.NONE;
|
||||
port = 143;
|
||||
} else if (scheme.equals("imap+tls")) {
|
||||
connectionSecurity = ConnectionSecurity.STARTTLS_OPTIONAL;
|
||||
port = 143;
|
||||
} else if (scheme.equals("imap+tls+")) {
|
||||
} else if (scheme.startsWith("imap+tls")) {
|
||||
connectionSecurity = ConnectionSecurity.STARTTLS_REQUIRED;
|
||||
port = 143;
|
||||
} else if (scheme.equals("imap+ssl+")) {
|
||||
} else if (scheme.startsWith("imap+ssl")) {
|
||||
connectionSecurity = ConnectionSecurity.SSL_TLS_REQUIRED;
|
||||
port = 993;
|
||||
} else if (scheme.equals("imap+ssl")) {
|
||||
connectionSecurity = ConnectionSecurity.SSL_TLS_OPTIONAL;
|
||||
port = 993;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unsupported protocol (" + scheme + ")");
|
||||
}
|
||||
@ -267,15 +271,9 @@ public class ImapStore extends Store {
|
||||
|
||||
String scheme;
|
||||
switch (server.connectionSecurity) {
|
||||
case SSL_TLS_OPTIONAL:
|
||||
scheme = "imap+ssl";
|
||||
break;
|
||||
case SSL_TLS_REQUIRED:
|
||||
scheme = "imap+ssl+";
|
||||
break;
|
||||
case STARTTLS_OPTIONAL:
|
||||
scheme = "imap+tls";
|
||||
break;
|
||||
case STARTTLS_REQUIRED:
|
||||
scheme = "imap+tls+";
|
||||
break;
|
||||
@ -2420,15 +2418,13 @@ public class ImapStore extends Store {
|
||||
SocketAddress socketAddress = new InetSocketAddress(addresses[i],
|
||||
mSettings.getPort());
|
||||
|
||||
if (connectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED ||
|
||||
connectionSecurity == ConnectionSecurity.SSL_TLS_OPTIONAL) {
|
||||
if (connectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED) {
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
boolean secure = connectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED;
|
||||
sslContext
|
||||
.init(null,
|
||||
new TrustManager[] { TrustManagerFactory.get(
|
||||
mSettings.getHost(),
|
||||
mSettings.getPort(), secure) },
|
||||
mSettings.getPort(), true) },
|
||||
new SecureRandom());
|
||||
mSocket = TrustedSocketFactory.createSocket(sslContext);
|
||||
} else {
|
||||
@ -2473,19 +2469,17 @@ public class ImapStore extends Store {
|
||||
}
|
||||
}
|
||||
|
||||
if (mSettings.getConnectionSecurity() == ConnectionSecurity.STARTTLS_OPTIONAL
|
||||
|| mSettings.getConnectionSecurity() == ConnectionSecurity.STARTTLS_REQUIRED) {
|
||||
if (mSettings.getConnectionSecurity() == ConnectionSecurity.STARTTLS_REQUIRED) {
|
||||
|
||||
if (hasCapability("STARTTLS")) {
|
||||
// STARTTLS
|
||||
executeSimpleCommand("STARTTLS");
|
||||
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
boolean secure = mSettings.getConnectionSecurity() == ConnectionSecurity.STARTTLS_REQUIRED;
|
||||
sslContext.init(null,
|
||||
new TrustManager[] { TrustManagerFactory.get(
|
||||
mSettings.getHost(),
|
||||
mSettings.getPort(), secure) },
|
||||
mSettings.getPort(), true) },
|
||||
new SecureRandom());
|
||||
mSocket = TrustedSocketFactory.createSocket(sslContext, mSocket,
|
||||
mSettings.getHost(), mSettings.getPort(), true);
|
||||
@ -2502,7 +2496,7 @@ public class ImapStore extends Store {
|
||||
if (responses.size() != 2) {
|
||||
throw new MessagingException("Invalid CAPABILITY response received");
|
||||
}
|
||||
} else if (mSettings.getConnectionSecurity() == ConnectionSecurity.STARTTLS_REQUIRED) {
|
||||
} else {
|
||||
throw new MessagingException("TLS not supported but required");
|
||||
}
|
||||
}
|
||||
|
@ -62,11 +62,9 @@ public class Pop3Store extends Store {
|
||||
*
|
||||
* <p>Possible forms:</p>
|
||||
* <pre>
|
||||
* pop3://user:password@server:port CONNECTION_SECURITY_NONE
|
||||
* pop3+tls://user:password@server:port CONNECTION_SECURITY_TLS_OPTIONAL
|
||||
* pop3+tls+://user:password@server:port CONNECTION_SECURITY_TLS_REQUIRED
|
||||
* pop3+ssl+://user:password@server:port CONNECTION_SECURITY_SSL_REQUIRED
|
||||
* pop3+ssl://user:password@server:port CONNECTION_SECURITY_SSL_OPTIONAL
|
||||
* pop3://user:password@server:port ConnectionSecurity.NONE
|
||||
* pop3+tls+://user:password@server:port ConnectionSecurity.STARTTLS_REQUIRED
|
||||
* pop3+ssl+://user:password@server:port ConnectionSecurity.SSL_TLS_REQUIRED
|
||||
* </pre>
|
||||
*/
|
||||
public static ServerSettings decodeUri(String uri) {
|
||||
@ -84,21 +82,27 @@ public class Pop3Store extends Store {
|
||||
}
|
||||
|
||||
String scheme = pop3Uri.getScheme();
|
||||
/*
|
||||
* Currently available schemes are:
|
||||
* pop3
|
||||
* pop3+tls+
|
||||
* pop3+ssl+
|
||||
*
|
||||
* The following are obsolete schemes that may be found in pre-existing
|
||||
* settings from earlier versions or that may be found when imported. We
|
||||
* continue to recognize them and re-map them appropriately:
|
||||
* pop3+tls
|
||||
* pop3+ssl
|
||||
*/
|
||||
if (scheme.equals("pop3")) {
|
||||
connectionSecurity = ConnectionSecurity.NONE;
|
||||
port = 110;
|
||||
} else if (scheme.equals("pop3+tls")) {
|
||||
connectionSecurity = ConnectionSecurity.STARTTLS_OPTIONAL;
|
||||
port = 110;
|
||||
} else if (scheme.equals("pop3+tls+")) {
|
||||
} else if (scheme.startsWith("pop3+tls")) {
|
||||
connectionSecurity = ConnectionSecurity.STARTTLS_REQUIRED;
|
||||
port = 110;
|
||||
} else if (scheme.equals("pop3+ssl+")) {
|
||||
} else if (scheme.startsWith("pop3+ssl")) {
|
||||
connectionSecurity = ConnectionSecurity.SSL_TLS_REQUIRED;
|
||||
port = 995;
|
||||
} else if (scheme.equals("pop3+ssl")) {
|
||||
connectionSecurity = ConnectionSecurity.SSL_TLS_OPTIONAL;
|
||||
port = 995;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unsupported protocol (" + scheme + ")");
|
||||
}
|
||||
@ -161,15 +165,9 @@ public class Pop3Store extends Store {
|
||||
|
||||
String scheme;
|
||||
switch (server.connectionSecurity) {
|
||||
case SSL_TLS_OPTIONAL:
|
||||
scheme = "pop3+ssl";
|
||||
break;
|
||||
case SSL_TLS_REQUIRED:
|
||||
scheme = "pop3+ssl+";
|
||||
break;
|
||||
case STARTTLS_OPTIONAL:
|
||||
scheme = "pop3+tls";
|
||||
break;
|
||||
case STARTTLS_REQUIRED:
|
||||
scheme = "pop3+tls+";
|
||||
break;
|
||||
@ -299,13 +297,11 @@ public class Pop3Store extends Store {
|
||||
|
||||
try {
|
||||
SocketAddress socketAddress = new InetSocketAddress(mHost, mPort);
|
||||
if (mConnectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED ||
|
||||
mConnectionSecurity == ConnectionSecurity.SSL_TLS_OPTIONAL) {
|
||||
if (mConnectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED) {
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
final boolean secure = mConnectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED;
|
||||
sslContext.init(null,
|
||||
new TrustManager[] { TrustManagerFactory.get(mHost,
|
||||
mPort, secure) }, new SecureRandom());
|
||||
mPort, true) }, new SecureRandom());
|
||||
mSocket = TrustedSocketFactory.createSocket(sslContext);
|
||||
} else {
|
||||
mSocket = new Socket();
|
||||
@ -323,17 +319,15 @@ public class Pop3Store extends Store {
|
||||
String serverGreeting = executeSimpleCommand(null);
|
||||
|
||||
mCapabilities = getCapabilities();
|
||||
if (mConnectionSecurity == ConnectionSecurity.STARTTLS_OPTIONAL
|
||||
|| mConnectionSecurity == ConnectionSecurity.STARTTLS_REQUIRED) {
|
||||
if (mConnectionSecurity == ConnectionSecurity.STARTTLS_REQUIRED) {
|
||||
|
||||
if (mCapabilities.stls) {
|
||||
executeSimpleCommand(STLS_COMMAND);
|
||||
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
boolean secure = mConnectionSecurity == ConnectionSecurity.STARTTLS_REQUIRED;
|
||||
sslContext.init(null,
|
||||
new TrustManager[] { TrustManagerFactory.get(
|
||||
mHost, mPort, secure) },
|
||||
mHost, mPort, true) },
|
||||
new SecureRandom());
|
||||
mSocket = TrustedSocketFactory.createSocket(sslContext, mSocket, mHost,
|
||||
mPort, true);
|
||||
@ -344,7 +338,7 @@ public class Pop3Store extends Store {
|
||||
throw new MessagingException("Unable to connect socket");
|
||||
}
|
||||
mCapabilities = getCapabilities();
|
||||
} else if (mConnectionSecurity == ConnectionSecurity.STARTTLS_REQUIRED) {
|
||||
} else {
|
||||
throw new MessagingException("TLS not supported but required");
|
||||
}
|
||||
}
|
||||
|
@ -82,11 +82,9 @@ public class WebDavStore extends Store {
|
||||
*
|
||||
* <p>Possible forms:</p>
|
||||
* <pre>
|
||||
* webdav://user:password@server:port CONNECTION_SECURITY_NONE
|
||||
* webdav+tls://user:password@server:port CONNECTION_SECURITY_TLS_OPTIONAL
|
||||
* webdav+tls+://user:password@server:port CONNECTION_SECURITY_TLS_REQUIRED
|
||||
* webdav+ssl+://user:password@server:port CONNECTION_SECURITY_SSL_REQUIRED
|
||||
* webdav+ssl://user:password@server:port CONNECTION_SECURITY_SSL_OPTIONAL
|
||||
* webdav://user:password@server:port ConnectionSecurity.NONE
|
||||
* webdav+tls+://user:password@server:port ConnectionSecurity.STARTTLS_REQUIRED
|
||||
* webdav+ssl+://user:password@server:port ConnectionSecurity.SSL_TLS_REQUIRED
|
||||
* </pre>
|
||||
*/
|
||||
public static WebDavStoreSettings decodeUri(String uri) {
|
||||
@ -109,15 +107,23 @@ public class WebDavStore extends Store {
|
||||
}
|
||||
|
||||
String scheme = webDavUri.getScheme();
|
||||
/*
|
||||
* Currently available schemes are:
|
||||
* webdav
|
||||
* webdav+tls+
|
||||
* webdav+ssl+
|
||||
*
|
||||
* The following are obsolete schemes that may be found in pre-existing
|
||||
* settings from earlier versions or that may be found when imported. We
|
||||
* continue to recognize them and re-map them appropriately:
|
||||
* webdav+tls
|
||||
* webdav+ssl
|
||||
*/
|
||||
if (scheme.equals("webdav")) {
|
||||
connectionSecurity = ConnectionSecurity.NONE;
|
||||
} else if (scheme.equals("webdav+ssl")) {
|
||||
connectionSecurity = ConnectionSecurity.SSL_TLS_OPTIONAL;
|
||||
} else if (scheme.equals("webdav+ssl+")) {
|
||||
} else if (scheme.startsWith("webdav+ssl")) {
|
||||
connectionSecurity = ConnectionSecurity.SSL_TLS_REQUIRED;
|
||||
} else if (scheme.equals("webdav+tls")) {
|
||||
connectionSecurity = ConnectionSecurity.STARTTLS_OPTIONAL;
|
||||
} else if (scheme.equals("webdav+tls+")) {
|
||||
} else if (scheme.startsWith("webdav+tls")) {
|
||||
connectionSecurity = ConnectionSecurity.STARTTLS_REQUIRED;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unsupported protocol (" + scheme + ")");
|
||||
@ -203,15 +209,9 @@ public class WebDavStore extends Store {
|
||||
|
||||
String scheme;
|
||||
switch (server.connectionSecurity) {
|
||||
case SSL_TLS_OPTIONAL:
|
||||
scheme = "webdav+ssl";
|
||||
break;
|
||||
case SSL_TLS_REQUIRED:
|
||||
scheme = "webdav+ssl+";
|
||||
break;
|
||||
case STARTTLS_OPTIONAL:
|
||||
scheme = "webdav+tls";
|
||||
break;
|
||||
case STARTTLS_REQUIRED:
|
||||
scheme = "webdav+tls+";
|
||||
break;
|
||||
@ -367,9 +367,7 @@ public class WebDavStore extends Store {
|
||||
private String getRoot() {
|
||||
String root;
|
||||
if (mConnectionSecurity == ConnectionSecurity.STARTTLS_REQUIRED ||
|
||||
mConnectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED ||
|
||||
mConnectionSecurity == ConnectionSecurity.STARTTLS_OPTIONAL ||
|
||||
mConnectionSecurity == ConnectionSecurity.SSL_TLS_OPTIONAL) {
|
||||
mConnectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED) {
|
||||
root = "https";
|
||||
} else {
|
||||
root = "http";
|
||||
|
@ -38,11 +38,9 @@ public class SmtpTransport extends Transport {
|
||||
*
|
||||
* <p>Possible forms:</p>
|
||||
* <pre>
|
||||
* smtp://user:password@server:port CONNECTION_SECURITY_NONE
|
||||
* smtp+tls://user:password@server:port CONNECTION_SECURITY_TLS_OPTIONAL
|
||||
* smtp+tls+://user:password@server:port CONNECTION_SECURITY_TLS_REQUIRED
|
||||
* smtp+ssl+://user:password@server:port CONNECTION_SECURITY_SSL_REQUIRED
|
||||
* smtp+ssl://user:password@server:port CONNECTION_SECURITY_SSL_OPTIONAL
|
||||
* smtp://user:password@server:port ConnectionSecurity.NONE
|
||||
* smtp+tls+://user:password@server:port ConnectionSecurity.STARTTLS_REQUIRED
|
||||
* smtp+ssl+://user:password@server:port ConnectionSecurity.SSL_TLS_REQUIRED
|
||||
* </pre>
|
||||
*/
|
||||
public static ServerSettings decodeUri(String uri) {
|
||||
@ -61,21 +59,27 @@ public class SmtpTransport extends Transport {
|
||||
}
|
||||
|
||||
String scheme = smtpUri.getScheme();
|
||||
/*
|
||||
* Currently available schemes are:
|
||||
* smtp
|
||||
* smtp+tls+
|
||||
* smtp+ssl+
|
||||
*
|
||||
* The following are obsolete schemes that may be found in pre-existing
|
||||
* settings from earlier versions or that may be found when imported. We
|
||||
* continue to recognize them and re-map them appropriately:
|
||||
* smtp+tls
|
||||
* smtp+ssl
|
||||
*/
|
||||
if (scheme.equals("smtp")) {
|
||||
connectionSecurity = ConnectionSecurity.NONE;
|
||||
port = 587;
|
||||
} else if (scheme.equals("smtp+tls")) {
|
||||
connectionSecurity = ConnectionSecurity.STARTTLS_OPTIONAL;
|
||||
port = 587;
|
||||
} else if (scheme.equals("smtp+tls+")) {
|
||||
} else if (scheme.startsWith("smtp+tls")) {
|
||||
connectionSecurity = ConnectionSecurity.STARTTLS_REQUIRED;
|
||||
port = 587;
|
||||
} else if (scheme.equals("smtp+ssl+")) {
|
||||
} else if (scheme.startsWith("smtp+ssl")) {
|
||||
connectionSecurity = ConnectionSecurity.SSL_TLS_REQUIRED;
|
||||
port = 465;
|
||||
} else if (scheme.equals("smtp+ssl")) {
|
||||
connectionSecurity = ConnectionSecurity.SSL_TLS_OPTIONAL;
|
||||
port = 465;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unsupported protocol (" + scheme + ")");
|
||||
}
|
||||
@ -132,15 +136,9 @@ public class SmtpTransport extends Transport {
|
||||
|
||||
String scheme;
|
||||
switch (server.connectionSecurity) {
|
||||
case SSL_TLS_OPTIONAL:
|
||||
scheme = "smtp+ssl";
|
||||
break;
|
||||
case SSL_TLS_REQUIRED:
|
||||
scheme = "smtp+ssl+";
|
||||
break;
|
||||
case STARTTLS_OPTIONAL:
|
||||
scheme = "smtp+tls";
|
||||
break;
|
||||
case STARTTLS_REQUIRED:
|
||||
scheme = "smtp+tls+";
|
||||
break;
|
||||
@ -202,13 +200,11 @@ public class SmtpTransport extends Transport {
|
||||
for (int i = 0; i < addresses.length; i++) {
|
||||
try {
|
||||
SocketAddress socketAddress = new InetSocketAddress(addresses[i], mPort);
|
||||
if (mConnectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED ||
|
||||
mConnectionSecurity == ConnectionSecurity.SSL_TLS_OPTIONAL) {
|
||||
if (mConnectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED) {
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
boolean secure = mConnectionSecurity == ConnectionSecurity.SSL_TLS_REQUIRED;
|
||||
sslContext.init(null,
|
||||
new TrustManager[] { TrustManagerFactory.get(
|
||||
mHost, mPort, secure) },
|
||||
mHost, mPort, true) },
|
||||
new SecureRandom());
|
||||
mSocket = TrustedSocketFactory.createSocket(sslContext);
|
||||
mSocket.connect(socketAddress, SOCKET_CONNECT_TIMEOUT);
|
||||
@ -260,16 +256,14 @@ public class SmtpTransport extends Transport {
|
||||
m8bitEncodingAllowed = extensions.containsKey("8BITMIME");
|
||||
|
||||
|
||||
if (mConnectionSecurity == ConnectionSecurity.STARTTLS_OPTIONAL
|
||||
|| mConnectionSecurity == ConnectionSecurity.STARTTLS_REQUIRED) {
|
||||
if (mConnectionSecurity == ConnectionSecurity.STARTTLS_REQUIRED) {
|
||||
if (extensions.containsKey("STARTTLS")) {
|
||||
executeSimpleCommand("STARTTLS");
|
||||
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
boolean secure = mConnectionSecurity == ConnectionSecurity.STARTTLS_REQUIRED;
|
||||
sslContext.init(null,
|
||||
new TrustManager[] { TrustManagerFactory.get(mHost,
|
||||
mPort, secure) }, new SecureRandom());
|
||||
mPort, true) }, new SecureRandom());
|
||||
mSocket = TrustedSocketFactory.createSocket(sslContext, mSocket, mHost,
|
||||
mPort, true);
|
||||
mIn = new PeekableInputStream(new BufferedInputStream(mSocket.getInputStream(),
|
||||
@ -281,7 +275,7 @@ public class SmtpTransport extends Transport {
|
||||
*/
|
||||
extensions = sendHello(localHost);
|
||||
secureConnection = true;
|
||||
} else if (mConnectionSecurity == ConnectionSecurity.STARTTLS_REQUIRED) {
|
||||
} else {
|
||||
throw new MessagingException("TLS not supported but required");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user