Skip to content
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

Don't show multiple decision dialogs for same certificate #54

Open
rfc2822 opened this issue Jul 14, 2016 · 2 comments
Open

Don't show multiple decision dialogs for same certificate #54

rfc2822 opened this issue Jul 14, 2016 · 2 comments

Comments

@rfc2822
Copy link
Contributor

rfc2822 commented Jul 14, 2016

At the moment, when several threads (for instance, synchronization workers called by Android) with MTM simultaneously access a host with unknown certificate, multiple decision activities will pop up, so the user will have to do the same decision multiple times. This makes it look like the application is not working correctly.

If there's already a pending decision for a given certificate, this decision should be waited for/used instead of creating a new one.

@ge0rg
Copy link
Owner

ge0rg commented Jul 14, 2016

That's an awesome idea. I've encountered that problem myself in yaxim, where the connection times out after some inactivity and a new one is opened.

I estimate that this needs a change of the openDecisions array into a map that is indexed with the server's hostname. However, the TrustManager API does not expose host names, so we'd need to supply it as a constructor parameter (or have some MTM factory that is passed the hostname).

Initially I planned such an API change for the HostnameVerifier implementation, but did it another way in the end.

@PeterEdens
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants