Results 1 to 10 of 10

Thread: QNetworkAccessManager: "SSL handshake failed"

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QNetworkAccessManager: "SSL handshake failed"

    No,I mean how you found out that there is a bug!
    The strange thing is: I connect to gammel.de using setHost("gammel.de", true);
    and there I try to get the method "j_security_check" n the same subfolder.,
    As soon as I do thos I receive the sslError Signal. Telling me that I do not have ca cert and so on!

    But when I do this local this doesnt work! I just receive readyRead and the message is Fault!

    May I see your code?

    What do you think the the error comes from?
    ow/where when do you submit your Sslconfiguraion?

    Qt Code:
    1. QSslConfiguration sslConfiguration = request->sslConfiguration();
    2. sslConfiguration.setLocalCertificate(cert);
    3. file.close();
    4. QString passphrase = "antivir_default";
    5. file.open(QIODevice::ReadOnly);
    6.  
    7. QSslKey key(&file, QSsl::Rsa, QSsl::Pem,QSsl::PrivateKey , passphrase.toAscii());
    8.  
    9. sslConfiguration.setCaCertificates(QList<QSslCertificate>() << cert);
    10. sslConfiguration.setPrivateKey(key);
    11. sslConfiguration.setProtocol(QSsl::TlsV1);
    12. sslConfiguration.setPeerVerifyMode(QSslSocket::QueryPeer);
    To copy to clipboard, switch view to plain text mode 


    Where request is QNetworkReply *request = http.networkReply(); // this fails....ok its a NULL ptr. when is it initialied? Or better what to use to set the cert?
    and http is QtSoapHttpTransport http;

    So I thought with request->setSslConfiguration(sslConfiguration);
    this would be used for next request but doesnt!

  2. #2
    Join Date
    Oct 2009
    Posts
    37
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: QNetworkAccessManager: "SSL handshake failed"

    Hi,

    Does it work when you do setProtocol(QSsl::AnyProtocol) ?
    Disclaimer: Although I work on Qt for Nokia, anything I post here is personal

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
  •  
Qt is a trademark of The Qt Company.