Results 1 to 1 of 1

Thread: load https: Self Signed Certificate encryption

  1. #1
    Join Date
    Mar 2015
    Posts
    3
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Post load https: Self Signed Certificate encryption

    I use soap to call web service with encryption certificate deploying in Android
    how to open https , load certificate
    any idea?

    I'm using this code below , but appears "Network transport error (6): SSL handshake failed" error
    Qt Code:
    1. void QtSoapHttpTransport::setHost(const QString &host, bool useSecureHTTP, int port)
    2. {
    3. url.setHost(host);
    4. url.setScheme(useSecureHTTP ? QLatin1String("https") : QLatin1String("http"));
    5. https = useSecureHTTP;
    6. if (port)
    7. url.setPort(port);
    8. else
    9. url.setPort(useSecureHTTP ? 443 : 80);
    10. }
    11.  
    12. /*!
    13. Sets the HTTP header SOAPAction to \a action.
    14. */
    15. void QtSoapHttpTransport::setAction(const QString &action)
    16. {
    17. soapAction = action;
    18. }
    19.  
    20. /*!
    21. Submits the SOAP message \a request to the path \a path on the
    22. HTTP server set using setHost().
    23. */
    24. void QtSoapHttpTransport::submitRequest(QtSoapMessage &request, const QString &path)
    25. {
    26. QNetworkRequest networkReq;
    27. networkReq.setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String("text/xml;charset=utf-8"));
    28. networkReq.setRawHeader("SOAPAction", soapAction.toLatin1());
    29. url.setPath(path);
    30. networkReq.setUrl(url);
    31.  
    32. soapResponse.clear();
    33. qDebug() << url.port();
    34. qDebug() << url.host();
    35.  
    36. networkRep = networkMgr.post(networkReq, request.toXmlString().toUtf8().constData());
    37. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by anda_skoa; 23rd May 2015 at 14:15. Reason: missing [code] tags

Similar Threads

  1. QWebView::Load https problem
    By milo c in forum Qt Programming
    Replies: 1
    Last Post: 6th January 2015, 20:01
  2. Replies: 3
    Last Post: 20th November 2014, 17:12
  3. QWebView + HTTPS with certificate example
    By kylls in forum Qt Programming
    Replies: 1
    Last Post: 16th March 2011, 06:07
  4. Symbian - self-signed certificate
    By metRo_ in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 10th March 2010, 06:10

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.