Commit Graph

8 Commits

Author SHA1 Message Date
Joe Steele dab8d3807f 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-04 12:10:12 -05:00
Joe Steele cedcd7e47c 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-03 19:24:37 -05:00
Joe Steele 9333f4f7f4 Don't delete certs. on account creation, & assure that only one instance of LocalKeyStore is created. 2013-12-03 19:21:57 -05:00
cketti 765b390eb5 Remove LocalKeyStore's dependency on K9.app 2013-12-03 13:28:48 +01:00
cketti 2a9ac867b9 Remove LocalKeyStore's dependency on Account to reduce coupling 2013-12-03 12:56:31 +01:00
Joe Steele 0f39a9d5ba "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-02 14:49:53 -05:00
Joe Steele 8eef43c282 Implement pruning of old certificates from LocalKeyStore
Certificates are deleted whenever server settings are changed
or an account is deleted.
2013-12-02 14:49:47 -05:00
Joe Steele 40404c3700 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-02 14:07:57 -05:00