deepessh / mqttclpro

MQTT Client for android with tasker support
MIT License
99 stars 30 forks source link

Android 9 SSL Bug #82

Open devmau5 opened 4 years ago

devmau5 commented 4 years ago

I currently run the app on two devices: a phone (Galaxy S9) and a tablet. The tablet has no issues connecting to my mosquitto broker. However my phone does not seem to connect no matter what I do, despite both having identical settings, except for the client certificates of course. I keep getting this error in the mosquitto logs:

OpenSSL Error: error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown
OpenSSL Error: error:140940E5:SSL routines:ssl3_read_bytes:ssl handshake failure
Socket error on client <unknown>, disconnecting.

I have tested the certificate itself with mosquitto_pub/sub and it seems to be working, but once I copy it to the app the status area says reconnecting and the above keeps showing up in the logs every minute or so.

deepessh commented 4 years ago

Thanks for raising the issue. I’ll look into it.

MrMiracles commented 4 years ago

Have the some problem. Weird thing is, any configuration changes after the first one are not picked up. I tried for example the websocket version (which runs on port 8833) but according to the Mosquitto log it keep trying to connect to port 8883. Which is weird if you ask me, and might help you figuring out this problem...

btw:

1585141101: New connection from xx.xxx.xxx.xxx on port 8883.
1585141101: OpenSSL Error[0]: error:14035416:SSL routines:ACCEPT_SR_CERT:sslv3 alert certificate unknown
1585141101: OpenSSL Error[1]: error:140350E5:SSL routines:ACCEPT_SR_CERT:ssl handshake failure
1585141101: Socket error on client <unknown>, disconnecting.
devmau5 commented 4 years ago

@dc297 some additional notes on this issue: