When timeout occurs Activity is not closed
Closed this issue · 3 comments
When the timeout ends for accepting a new certificate, if the TrustCertificateActivity
is open, it's never finished, so the Activity just lays there. It should be closed automatically.
When the timeout ends for accepting a new certificate, if the
TrustCertificateActivity
is open, it's never finished, so the Activity just lays there. It should be closed automatically.
That's actually by (half) intent. I thought people may need some time to verify the fingerprint, and the visible Activity shouldn't vanish under their hands. So I let it open even if the request was already rejected. But if they accept the certificate, all further requests should be accepted.
In my tests, it works as I have intented: open requests time out, but future requests are behaving as selected by the user.
Steps to reproduce:
- Set timeout to 5 sec in code
- Start demo, access URL with untrusted cert
- Activity opens
- Wait 5 sec, timeout is logged in logcat and connection rejected. Activity stays open.
- Either reject or accept certificate in the Activity.
- For further connections, the cert is either accepted or rejected, as previously selected.
Or does that crash for you?