Dear all,
I have a rather popular third party plasmoid that I am currently porting to Plasma6.
The issue that I am facing: that plasmoid communicates with a device (a Philips / Signyfy Hue Bridge Pro) that uses a certificate by a CA not trusted on any OS, and obviously with a “wrong” certificate subject.
I am using XMLHttpRequest ( XMLHttpRequest QML Type | Qt Qml | Qt 6.9.2 ) to call that devices REST API, and due to a 301 by the device, https is enforced. Now QML quite silently fails if it does a TLS request to a certificate it doesn’t trust, and there seems to be no option to disable that.
Now what should I do?
Requirement:
- I need to talk to https. You can’t enforce http, you can’t disable https
- I do have the CA (Philips provides it) that I could inject. However, the certificate subject would obviously still be wrong, as that device has an IP and not a name, and that IP is different for everyone
- I can’t install the CA as a OS trusted CA, and even if I could, see above, certificate subject
- I can’t use C++ (or any other, non-qml) code, since the plasmoid should be distributable via KDE store / get hot new stuff etc., so only plain qml allowed
So basically I need a way in pure QML to disable TLS verification in XMLHttpRequest or do a simple http(s) request that returns json without TLS vertification.
I know that this defeats the purpose of TLS and is insecure, please no discussions about that, since I can’t change the world or a multi-billion company such as Philips / Signyfy, but I would like the plasmoid to be usable again, as it seems quite a lot of people installed and liked it.
Thanks in advance for solutions, hints or ideas.
Fox