Commit Graph

8 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 0e969171bb Update client connection manager w/ bdc fix in AOSP branch
Bug: 6838215
Change-Id: I39a2ea0b54aca34062e1a2ccc472e701c3ef2f79
2012-08-16 11:45:13 -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
Marc Blank f419287f22 DO NOT MERGE: Move emailcommon2 sources to emailcommon
Change-Id: I06df7e467cd2e0117df8b8db3ddc6ff9da13f1c7
2012-06-28 11:15:06 -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
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