1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-09 04:38:10 -05:00
Commit Graph

4788 Commits

Author SHA1 Message Date
cketti
e54cba22fd Add support for bitcoin URIs 2013-12-17 02:37:38 +01:00
Joe Steele
927950b16c Change LocalKeyStore error reporting
The error reporting assures an exception is thrown if
setKeyStoreFile(null) is called without a prior call to
setKeyStoreLocation(String directory).

Also, fix TrustManagerFactoryTest indentation.
2013-12-17 02:37:38 +01:00
cketti
f7f6a0e9f3 Change the way we harden SSL/TLS sockets
Blacklist a couple of weak ciphers, bring known ones in a defined order and sort unknown
ciphers at the end. Also re-enable SSLv3 because it's still used a lot.
2013-12-17 02:37:38 +01:00
cketti
182c9dd95f Merge branch 'cert_validation' 2013-12-17 02:37:37 +01:00
Joe Steele
8099aff8e7 Eliminate the need to pass a context to LocalKeyStore.getInstance
Instead, have K9.onCreate initialize the location of the key
store file (similar to what is done with
BinaryTempFileBody.setTempDirectory).

Also, LocalKeyStore.getInstance has been changed so that it
no longer needs to be synchronized.
2013-12-17 02:37:37 +01:00
Joe Steele
255bf1fb36 Don't delete certs. on account creation, & assure that only one instance of LocalKeyStore is created. 2013-12-17 02:37:37 +01:00
cketti
8d85fe7e9e Remove LocalKeyStore's dependency on K9.app 2013-12-17 02:37:37 +01:00
cketti
16aa119d65 Remove LocalKeyStore's dependency on Account to reduce coupling 2013-12-17 02:37:37 +01:00
Joe Steele
9727cd6bca Move unit test class to match changes in commit 40404c3 2013-12-17 02:37:37 +01:00
cketti
dc5afd4b67 Merge branch 'cert_validation' of git://github.com/k9mail/k-9.git into cert_validation
Conflicts:
	tests/src/com/fsck/k9/mail/store/TrustManagerFactoryTest.java
2013-12-17 02:37:27 +01:00
Joe Steele
7296b67126 "upgrade" the LocalKeyStore
Implement an "upgrade" capability for the key store file,
and then use it to delete the old file.

The existing certs in the old file are not a security
risk, but they are now useless because the format of
their aliases was changed in commit a4440b4.  They now are
just taking up storage space and memory.

Users will need to re-accept *ALL* certificates that they had
previously accepted and are still using.  (Actually, this requirement
was effective with commit 4b57d79a.  Before that, certificates whose
Subject matched did not require re-accepting.)
2013-12-17 02:35:27 +01:00
cketti
ee69bd0845 Add more unit tests for TrustManagerFactory 2013-12-17 02:35:27 +01:00
Joe Steele
7a9663c4f9 Implement pruning of old certificates from LocalKeyStore
Certificates are deleted whenever server settings are changed
or an account is deleted.
2013-12-17 02:35:27 +01:00
cketti
0c96c799eb Only check against the certificate stored for a server, not all of them 2013-12-17 02:35:26 +01:00
Joe Steele
fd9eb78aa3 Move some classes out of com.fsck.k9.mail.store
The classes are just as much related to com.fsck.k9.mail.transport
as com.fsck.k9.mail.store, so having them in
com.fsck.k9.mail.store doesn't seem appropriate.

Move LocalKeyStore to com.fsck.k9.security

Move TrustManagerFactory and TrustedSocketFactory to com.fsck.k9.net.ssl
2013-12-17 02:35:26 +01:00
cketti
07e4eb9042 Add test to make sure we don't check the wrong certificates
Right now we happily accept every certificate in our local key store as long as
the hostname matches the certificate DN. So this test fails.
It's not a huge deal since the user accepted the certificate at one point. But we
want to do this right.
2013-12-17 02:35:26 +01:00
Joe Steele
a2162e4c37 Extract code into new LocalKeyStore class
Also, implement the ability to configure an alternate key store
file location. This permits the running of unit tests without
clobbering the live key store file.

Also, add a test to confirm that the key store file is being written
out and reread correctly.
2013-12-17 02:35:26 +01:00
cketti
9cc98bcd33 Add unit tests for TrustManagerFactory 2013-12-17 02:35:26 +01:00
Joe Steele
8a6e8de56d Eliminate the need for reflection to access hidden API 2013-12-17 02:35:26 +01:00
cketti
5282fe482f Properly save and restore instance state in AccountSetupBasics 2013-12-17 02:35:26 +01:00
Danny Baumann
f95ab8f6a8 Fix contact picture color generation.
Make sure to return different colors for senders with different name,
but the same mail address (e.g. mails sent by certain issue tracking
systems).
2013-12-17 02:35:25 +01:00
Joe Steele
583d1d403f Fix inadequate certificate validation
Proper host name validation was not being performed for certificates
kept in the local keystore.  If an attacker could convince a user to
accept and store an attacker's certificate, then that certificate
could be used for MITM attacks, giving the attacker access to all
connections to all servers in all accounts in K-9.

This commit changes how the certificates are stored.  Previously, an
entire certificate chain was stored for a server (and any of those
certificates in the chain were available for validating signatures on
certificates received when connecting).  Now just the single
certificate for the server is stored.

This commit changes how locally stored certificates are retrieved.
They can only be retrieved using the host:port that the user
configured for the server.

This also fixes issue 1326.  Users can now use different certificates
for different servers on the same host (listening to different ports).

The above changes mean that users might have to re-accept certificates
that they had previously accepted and are still using (but only if the
certificate's Subject doesn't match the host that they are connecting
to).

This commit modifies AccountSetupBasics so that it now calls
AccountSetupCheckSettings twice -- once for checking the incoming
settings and once for the outgoing settings.  Otherwise, an exception
could occur while checking incoming settings, the user could say
continue (or the user could accept a certificate key), and the
outgoing settings would not be checked.  This also helps with
determining if a certificate exception was for the incoming or
outgoing server, which is needed if the user decides to add the
certificate to the keystore.
2013-12-17 02:35:25 +01:00
cketti
6ebec69383 Recreate app icon from SVG file
Add higher resolution icons so K-9 looks snazzy on newer devices.
2013-12-16 18:59:43 +01:00
brian m. carlson
266a715138 Use TrustedSocketFactory for STARTTLS.
The TrustedSocketFactory, which provides goodies like better cipher suites and
TLSv1.2, was only being used for tunnelled connections.  Use it for STARTTLS
connections as well.
2013-12-16 18:59:37 +01:00
cketti
7ab9d5c3e8 Merge branch 'translations' 2013-11-10 23:19:20 +01:00
cketti
3170de4229 Clean up Hungarian translation 2013-11-10 23:18:41 +01:00
RootRulez
c4b44bb6e3 Update Hungarian translation 2013-11-10 23:18:40 +01:00
igavio
14b291a4de Update Greek translation 2013-11-10 23:18:39 +01:00
Igor Nedoboy
b8786d27bf Update Russian translation 2013-11-10 23:18:38 +01:00
Jan Urbánek
45a725b51b Update Czech translation 2013-11-10 23:18:37 +01:00
Jacek Sowiński
ee98624a41 Update Polish translation
new strings + one typo
2013-11-10 23:18:36 +01:00
Koji Arai
ad2fdbdc00 Updated Japanese translation of the changelog. 2013-11-10 17:24:16 +09:00
Jesse Vincent
bc144d684b Bumped manifest to 4.801 2013-11-07 10:43:16 -08:00
Jesse Vincent
9469a433bd release notes for 4.801 2013-11-07 10:42:58 -08:00
Jesse Vincent
68d0a5823b Revert "Revert "Temporarily bump ourselves up only install on KitKat for a market hack""
This reverts commit 3a0dcd70b8.
2013-11-07 10:41:23 -08:00
Jesse Vincent
be14a88103 With the new webview scrollview combo we've got loadinoverviewmode seems to behave better. 2013-11-07 10:40:01 -08:00
cketti
ed3a160403 Fix file selection for import
Using FLAG_ACTIVITY_NO_HISTORY will cause the file selection
to fail when KitKat's "Open from" activity opens a third-party activity.
2013-11-07 09:31:21 -08:00
Koji Arai
d97176e6c7 Fixed typo. 2013-11-06 23:47:28 +09:00
Koji Arai
4ac1b6328b Updated Japanese translation of the changelog. 2013-11-06 23:34:11 +09:00
Jesse Vincent
3a0dcd70b8 Revert "Temporarily bump ourselves up only install on KitKat for a market hack"
This reverts commit 4134685c65.
2013-11-05 21:12:23 -05:00
Jesse Vincent
c0b6793053 changelog version bump 2013-11-05 20:58:24 -05:00
Jesse Vincent
99193195f9 Bumped manifest to 4.800 2013-11-05 20:57:53 -05:00
Jesse Vincent
e8bbd01cd5 4.800 release version 2013-11-05 20:57:23 -05:00
Jesse Vincent
4134685c65 Temporarily bump ourselves up only install on KitKat for a market hack 2013-11-05 20:56:56 -05:00
Jesse Vincent
bc10b8d965 turn off developer mode for release 2013-11-05 20:55:44 -05:00
Jesse Vincent
20ce31146a changelog for 4.800 2013-11-05 20:55:16 -05:00
Jesse Vincent
5475f47bcf Bumped manifest to 4.701 2013-11-05 20:29:16 -05:00
Jesse Vincent
0986e822d2 changelog for 4.701 2013-11-05 20:28:46 -05:00
Jesse Vincent
e20e513039 Sadly, KitKat's file manager fails to recognize our mimetype and won't let users import settings 2013-11-05 20:19:27 -05:00
Jesse Vincent
8f19d56f00 Merge pull request #415 from zjw/non_locking_scroll_view_rebased
Kit Kat UI issue
2013-11-05 16:59:12 -08:00