Rather than store a list of pinned certs each with a set of idenities,
just use a map of idenities to certs. This simplifies both storage,
lookup, retreival, and will allow pins to be persisted on a per-identity
bassis, allowing a cert to be saved for one host but not saved for
another.
Make the cert mamager easily available to acccount editor panes, hook up
to untrusted-host when validating the new account and prompt to pin
certs as needed.
The docs for accept-certificate require that clients do not block while
handling it, and Geary will typically prompt the user when handling it.
This fix schedules handling the signal to be executed seperately on the
main loop.
This moves connection error notification in ImapClientService to one
place, so status updates and errors are only reported once, and the
correct status changes are made. This fixes TLS cert problems both
being reported as such, and as a service problem.
The new class encapsulates cert pinning functionality and provides a
GIO GTlsDatabase implementation for hooking pinned certs directly into
GTlsConnection. Initial impl just stores pinned certs in memory for now.
Remove it from Geary.Engine, since it just adds complexity without
making API client use any easier. Replace the TLS negotiate method on
the remaining versions of the signal with the Endpoint, since it's handy
to have and the negotiation method can be obtained from that if needed.
This will enable using other connectable types (e.g. those needed to
connect to SRV records). Rename `address_error_reported` to reflect the
error could be more general.
This adds a cancellable property to each account pane and uses it for
all I/O operations, and allows it to be cancelled and pane state to be
updated when either Esc is pressed, or Cancel is clicked on the servers
pane.
This moves the individual in-app notification implementation on each of
the editor panes to the editor itself, reducing redundancy and allowing
the editor to issue notifications if needed (spoiler: it will).
Move update_command_actions() from CommandPane to Editor, call that when
updating state internally and make the implementation details of it
private. Make more use of the generic command management code in the
list pane.
This breaks out the problem details dialog out into a seperate class so
it can be used for both problem reports and status problems. Pass in any
service errors to the main window when updating account status, show a
Details button on the service status info bar and show the details
dialog when clicked.
Require ClientService implementations and ProblemReport use contexts
rather than bare errors. Move code for generating backtraces and and
formatting errors from ProblemReport to ErrorContext.
Instead of opening a dialog and quitting when an account throws an error
on being opened (except when we have the option to rebuild it for now),
use infobars and and just disable an account.
This re-ads support for prompting for service passwords in the client,
and also gracefully handles showing auth failure infobar and getting
multple failures at once.
By checking for a NO/BAD status reponse and throwing an error if found
when parsing the server's response, the responses were treated as
invalid rather than being simply rejected by the server.
This updates Imap.Command so that when chcking its status response,
it only throws an error on NO/BAD from the high-level API used by
ClientSession, not ClientConnection, and fixes a minor cleanup issue.
Rather than using cascading signals to indicate an auth error, have
ImapClientSession throw an appropriate exception, and catch that as
needed in ImapClientService and the Engine's validation code.
Set account default to ONLINE, so we don't initially show up as being
offline before even having checked connectivity. Add an UNKNOWN to
client service status so that when the initial connectivity check comes
up offine, the account actually gets notified and hence also the client.
Similarly to ClientService, add a `current_status` property that denotes
the account's operational state, so that clients can just set a notify
on that to be informed of all account status changes. Keep the property
updated by watching for changes to the client service's status property.
Add a signal to AccountInformation for notifying the client that an
auth failure has occurred, and remove code for prompting the user from
both IMAP and SMTP services. This means the same mechanism is used for
both for handling this and untrusted hosts, and allows the client to
implement desired policy, e.g. saving passwords and number of prompts to
retry.
This adds a `current_status` property to ClientService to track the
service's operational state, wich can be monitored by both the engine
and clients for changes. Hook up subclasses to keep that update, and
move connectivity management in to ClientService to provide a common
implementation.