[SailfishDevel] How to use self-signed certificates transparently in a https POST/GET request with a QT Quick application?

juice juice at swagman.org
Mon Aug 17 19:56:31 UTC 2015


This might be a FAQ or otherwice so self-evident question it just shows 
up my
stupidity but I really could not find any pointers on how to do this.

Scenario:

I am writing a client application that periodically polls for data from 
a
web service, located on a server that may either have a real certificate 
or
might just have a self-signed certificate.

The authenticity of the server is not so important that it definitely 
requires
a true certificate, it is just enough that the communication between the 
client
and the server is encrypted. The user anyway configures the used server 
by DNS
name or IP address and usually the server is controlled by the user 
anyway.

Now how can I do this, so that in the client I need not preload any 
certificates,
so that for example when the user changes the server address, the next 
request
just goes thru encrypted, without caring whether the server certificate 
is valid?

Can anybody give me a pointer to some example code?
Can this be done in QML only or do I need to extend it in a c++ module?


-- 
    - Juice -



More information about the Devel mailing list