Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. load https: Self Signed Certificate encryption

load https: Self Signed Certificate encryption

Scheduled Pinned Locked Moved Mobile and Embedded
androidandroid 2.3.3qt5.4.1mobileandroiddeployqtandroidqtqt 5.4
1 Posts 1 Posters 4.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Buleron
    wrote on 19 May 2015, 08:06 last edited by Buleron
    #1

    I use soap to call web service with certificate encryption deploying in Android 2.3
    how to proceed https or load certificate
    any idea?

    I'm using this code below , but appears "Network transport error (6): SSL handshake failed" error
    void QtSoapHttpTransport::setHost(const QString &host, bool useSecureHTTP, int port)
    {
    url.setHost(host);
    url.setScheme(useSecureHTTP ? QLatin1String("https") : QLatin1String("http"));
    https = useSecureHTTP;
    if (port)
    url.setPort(port);
    else
    url.setPort(useSecureHTTP ? 443 : 80);
    }

    /*!
    Sets the HTTP header SOAPAction to \a action.
    */
    void QtSoapHttpTransport::setAction(const QString &action)
    {
    soapAction = action;
    }

    /*!
    Submits the SOAP message \a request to the path \a path on the
    HTTP server set using setHost().
    */
    void QtSoapHttpTransport::submitRequest(QtSoapMessage &request, const QString &path)
    {
    QNetworkRequest networkReq;
    networkReq.setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String("text/xml;charset=utf-8"));
    networkReq.setRawHeader("SOAPAction", soapAction.toLatin1());
    url.setPath(path);
    networkReq.setUrl(url);

    soapResponse.clear();
    qDebug() << url.port();
    qDebug() << url.host();
    
     networkRep = networkMgr.post(networkReq, request.toXmlString().toUtf8().constData());
    

    }

    1 Reply Last reply
    0

    1/1

    19 May 2015, 08:06

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved