Results 1 to 2 of 2

Thread: QML accept self-singed SSL certificate

  1. #1
    Join Date
    Apr 2014
    Posts
    116
    Thanks
    8
    Qt products
    Qt5
    Platforms
    MacOS X

    Default QML accept self-singed SSL certificate

    Hi,

    I am building an app where I try to talk to an external webserver. At the moment I am opening php files on the server with specific get variables and the sever answers with a xml file. On the server are user specific information where the user needs to login to have access. To the login over my app I would like to secure the connection to the server by using SSL. Unfortunately I only have a self-signed SSL certificate available, witch is not working out of the box. Currently I am getting a SSL handshake failed error message.

    Is there a way in QML to accept self-signed SSL certs?

    Here is what I am currently doing and what is working with http

    Qt Code:
    1. Page {
    2. id: root
    3. property string dataURL: "https://..."
    4. property bool modelDataError: false
    5. property string statusMessage: ""
    6. property string filter: ""
    7. property var datum : new Date()
    8. property int jetzt: datum.getTime()/1000 - 24*3600
    9.  
    10. XmlListModel {
    11. id: planModel
    12. source: root.dataURL
    13. query: "/xml/"
    14. ...
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QML accept self-singed SSL certificate

    Maybe adding your certificate to Qt's default SSL configuration?
    QSslConfiguration::defaultConfiguration().

    Cheers,
    _

Similar Threads

  1. Qt Certificate Programmer
    By freddy311082 in forum Newbie
    Replies: 1
    Last Post: 3rd October 2013, 06:23
  2. Replies: 1
    Last Post: 29th October 2012, 07:25
  3. Replies: 0
    Last Post: 18th October 2012, 03:54
  4. Replies: 3
    Last Post: 17th October 2012, 09:30
  5. Accept/Not accept symbols in QLineEdit
    By naturalpsychic in forum Qt Programming
    Replies: 2
    Last Post: 28th March 2012, 16:26

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.