Commit Graph

13 Commits

Author SHA1 Message Date
Paul Westbrook bc47398187 Merge Email1 into MR1
Change-Id: I45289d46b65faffc7a3a3dd46382899162f3aaab
2012-09-24 15:32:00 -07:00
Marc Blank 7d5e2a7c08 Do "same certificate" checking when using "trust certificates"
* Refactor/simplify Transport/MailTransport
* Add serverCert column to HostAuth table in EmailProvider
* During first connection to server, save the server certificate
  in the HostAuth; on subsequent connections, ensure that the
  certificate presented has the same public key as the one
  stored
* For now, we'll just fail to connect (with a CertificateException)
  if there's a mismatch

TODO: Add some UI to handle different certificates

Bug: 6888866
Change-Id: Ia79497e89eaad8d43617b50d3771121b2ed7f687
2012-08-01 09:04:44 -07:00
Ben Komalo 4d3f3f3ab9 Fix hostname verifier for Exchange connections.
When the socketfactory init code was moved, I forgot to re-add in the check
to skip hostname verification. This made "Trust all SSL certificates"
checkbox useless.

Bug: 5450563
Change-Id: Ie4cba749aaf8c0fd9f9c43f09ebf354c6600d4f0
2011-10-12 13:41:59 -07:00
Ben Komalo f4f10a3fdf Make client certificate requests optional.
This prevents things from always failing if the server requires a client
SSL certificate.

Note that the solution used to determine if a certificate request was
made for a given request is approximate; it is timestamp based and can
theoretically give a false positive. In practice, this is very unlikely,
since another cert request had to have happened around the same time,
AND the response must be a 401/403.

Change-Id: Ieb77cf91db3bd52ba4adf1fb07357fef7e204ba5
2011-07-11 09:28:33 -07:00
Makoto Onuki 745b33b8ff Fix all NoSuchMethodErrors
Change-Id: I05adf2b99c819d6aa2d3b52c52a8c655d9307337
2011-07-01 12:44:27 -07:00
Ben Komalo 877b9070fa Misc cleanups and avoid logging PII
Change-Id: I9f906dabe0dd00a434ff88878f0639c835b2e2a7
2011-06-23 19:41:47 -07:00
Ben Komalo cb24e515b7 Add one more error state to certificate process
When the KeyStore fails to give us back a certificate for any reason (it
was removed from the keystore perhaps), propagate the error back up.

Change-Id: I4f0ef783c1665589cc8ccb43d95da43a297a3e9a
2011-06-16 16:14:03 -07:00
Ben Komalo f4dbbf1099 Indicate to the user when a cert error happens.
This introduces an exception which needs to be thrown from a KeyManager
when it tries to establish a connection with a server requesting a
certificate.

Change-Id: I06dfad7789ed5d320b630e7e4380e15da42a48df
2011-06-16 11:37:23 -07:00
Ben Komalo 78959916e7 Add support for client side SSL certificates
This introduces the ability for clients (i.e. the exchange service) to
register "special connection types" that use a client certificate stored
in the system keystore. The alias is encoded into the URI scheme for
those clients, and the socket factory used for those connections will
use the approprate KeyManager.

Lots of TODO's, including bubbling a lot of this up to the higher level
and wiring the UI to actually set the alias in the HostAuth table.

Change-Id: If5e1901c5b58731fdabd3e6b6da7198134b512d2
2011-06-13 18:16:22 -07:00
Ben Komalo 724c3a81cd Introduce scheme name escaping in SSLUtils.
Change-Id: I73f19e7d40d0b19dfd41cfaf7db0879ef2e3a3ea
2011-06-08 13:33:38 -07:00
Ying Wang 37f3385803 Split out emailcommon/Android.mk
Change-Id: I846ee2a4b541f4709e647aa537c61549db2bec2e
2011-03-01 15:56:27 -08:00
Ying Wang a07f2ae0b1 Revert "Split out emailcommon/Android.mk"
This reverts commit c28bf35319.
2011-03-01 14:52:05 -08:00
Ying Wang c28bf35319 Split out emailcommon/Android.mk
Change-Id: I90653e8601ee3ee6a8719d87ffb93222a11a22c0
2011-03-01 12:29:05 -08:00