-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace MemorizingActivity with a pluggable UI interface #29
Comments
|
|
For (1) I suppose "UI thread" is the right thing. Currently, I'm getting an Android Handler reference from What would you think about the following proposal for (2): interface TrustDecisionHandler {
public void decideOnCertificateException(X509Certificate[] chain,
CertificateException cause, int decisionId);
// optionally separate API method for hostname validation:
public void decideOnHostnameMismatch(X509Certificate[] chain,
String hostname, int decisionId);
} The result would be communicated via static It looks like (3) is a non-issue as long as we are living in the same process, which we are. I only used serialization in MTM for the startActivity() intent. That would move inside the example, making the above API possible without woes. |
For me it would also be sufficient if I could somehow turn an 'interactive mode' on and off. On a per connection basis. Where the interactive mode displays the dialog and the non-interactive mode just throws an InvalidCertifiacateException |
@iNPUTmice It looks like your use case can be easily implemented with the above interface. Another problem I am pondering about is TOFU / pinning. The above API is "stateless" as it does not support information about what MTM stored previously for a given server name. Therefore, it does not allow the application to show a more severe warning screen when it encounters a self-signed certificate for a host that already has a (different) certificate known to MTM. To support this use-case I'd either need to add more methods (think of |
Some apps (F-Droid, ChatSecure, maybe others) want to have better control of when and how to ask the user about certificates, for example to suppress the dialog when connecting to a server for the first time (TOFU/POP approach).
For this, the
startActivity()
/interactResult()
"API" is insufficient, so it needs to be replaced with a real API.MemorizingActivity
will become the default / example implementation for how to use this interface.Before this can be implemented, some things need to be specified:
Please contribute to the discussion!
The text was updated successfully, but these errors were encountered: