WallPanel-Project / wallpanel-android

This project is deprecated; try out this active fork: https://thanksmister.com/wallpanel-android/
Apache License 2.0
205 stars 26 forks source link

Does not work with SSL, only blank white screen #35

Open tiszavolgyi opened 7 years ago

tiszavolgyi commented 7 years ago

I am using version 0.6.1. (latest), it is not working with SSL for me, I only see a blank white screen anytime I am trying to launch the HA (or any website) with SSL. I tried on different devices with the same result. First I tried with self signed SSL than I read maybe the Android webview has issues with Self signed SSL, so I bought an SSL certificate, but the result is the same.

Maybe the solution can be found on this link: https://stackoverflow.com/questions/7416096/android-webview-not-loading-an-https-url

and only these lines have to be inserted:

 @Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    handler.proceed(); // Ignore SSL certificate errors
}
TUISTERa commented 7 years ago

Same was with me, i manually selected Android WebView engine fixed the problem.

michaelhenningersrb commented 6 years ago

I use a self signed certificate. Not working :( I think @tisavolgyi mentioned the right solution? Can't we add an toggle to switch off SSL verfication?

Thx, Michael

quadportnick commented 6 years ago

Planning for that SSL change to be in the next update, yes!

quadportnick commented 6 years ago

SSL errors ignored currently in https://github.com/WallPanel-Project/wallpanel-android/commit/4307376e01aed12b7c98f0aef6ef32fc6327cbb5

At this time, it only works in the Native WebView, as the CrossWalk devs seem to have mucked up the exception before the project was abandoned.

michaelhenningersrb commented 6 years ago

@quadportnick could we make a new release? I'm unable to use the app without this commit...

quadportnick commented 6 years ago

Yes I do plan on a test build shortly. Out of curiosity do you know which certificate aspect is the issue in your case, is it just the self-signed or also maybe common name? I will definitely need to make some changes to get in the Play store to how its handled right now or it will be rejected.

michaelhenningersrb commented 6 years ago

I think it's because it is self signed. Haven't you tried a self signed certificate yourself? Did you only try http ?

quadportnick commented 6 years ago

Oh it’s definitely https/Certificate errors we are dealing with here. It’s just the example code to do so is such a broad stroke, apparently Google Play’s code analyzer will just reject it for the gaping security hole. It wouldn’t hold up the short term but there will probably have to be a toggle and some other logic in there to avoid the beatdown (eg, you will have to opt in).

On Feb 21, 2018, at 2:03 AM, michaelhenningersrb notifications@github.com wrote:

I think it's because it is self signed. Haven't you tried a self signed certificate yourself? Did you only try http ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

quadportnick commented 6 years ago

Test release: https://github.com/WallPanel-Project/wallpanel-android/releases/tag/0.7b1

michaelhenningersrb commented 6 years ago

Thanks to @quadportnick it works...