k9mail/k-9 — pull request #474 by dschuermann (2014-06-05 19:14:03+00:00)
Title: Client Certificate Authentication

This implements client certificate authentication for K-9 Mail.
It contains some classes from the old pull request at https://github.com/k9mail/k-9/pull/351/ which have been cleaned up and refactored.
While there are some TODOs left, I would appreciate any feedback before I go on!

* This implementation should make client certificates really usable, so I tried to make it obvious that they serve as a direct replacement of passwords. Thus, I introduced a small view which can be used to select client certificates, which is shown instead of the password field when client cert authentication is selected. There are also checks implemented in ``AccountSetupCheckSettings`` to ask the user for a client cert if the server requires one.
* Opening SSL sockets has been externalized into ``SslHelper``
* I have tested this patch carefully, but I will do even more testing in the next days.

What is left:
* Import/Export
* More testing
* WebDAV support?!

Some observations made in the K-9 codebase for future refactoring:
* We should try to move the code that is used to display server certificates into its own DialogFragment
* The transport and store uris should be replaced by using ServerSettings only.
* Fun fact: While Imap and Pop3 uris are designed like ``imap+tls+://auth:user:password@server:port``, Smtp uris are designed like ``smtp+tls+://user:password:auth@server:port``. Spot the difference ;)