Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Problem with OpenSSL on Mac OS X Yosemite
Forum Updated to NodeBB v4.3 + New Features

Problem with OpenSSL on Mac OS X Yosemite

Scheduled Pinned Locked Moved QML and Qt Quick
qmljavascriptsslnetwork
3 Posts 3 Posters 2.1k Views 2 Watching
  • 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.
  • dontdoevalD Offline
    dontdoevalD Offline
    dontdoeval
    wrote on last edited by dontdoeval
    #1

    Hello,

    I try to fetch information from https://maps.googleapis.com/maps/api/geocode/json?sensor=false&key=[my_key]&address=... within QML. I use the standard XMLHttpRequest.

    Qt 5.4.2 with QtCreator 3.4.1 on Mac OS X 10.10.3 Yosemite (64 bit) building with Clang 6.0

    var xhr = new XMLHttpRequest();
    xhr.onreadystatechange = function () {
        console.log(xhr.readyState);
        if (xhr.readyState === 4) {
            console.log(xhr.status, xhr.statusText);
            if (xhr.status === 200) {
                console.log(xhr.responseText);
            } else {
                console.log("service unavaible");
            }
        }
    }
    xhr.open("GET", , true);
    xhr.send("https://maps.googleapis.com/maps/api/geocode/json?sensor=false&key=[my_key]&address=Google");
    

    I get the following output:

    qml: 1
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method
    qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
    qt.network.ssl: QSslSocket: cannot resolve SSL_get0_next_proto_negotiated
    qml: 4
    qml: 4 0 
    qml: service unavaiable
    

    If I change the protocol to HTTP I get:

    qml: 1
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method
    qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
    qt.network.ssl: QSslSocket: cannot resolve SSL_get0_next_proto_negotiated
    qml: 2
    qml: 3
    qml: 4
    qml: 200 OK
    qml: Requests to this API must be over SSL.
    

    If I then remove the key parameter it works, but obviously that's not an option.
    Is this because Qt uses a deprecated OpenSSL lib?
    If I check the SSL version with ...

    qDebug() << "Support SSL:  " << QSslSocket::supportsSsl()
                << "\nLib Version Number: " << QSslSocket::sslLibraryVersionNumber()
                << "\nLib Version String: " << QSslSocket::sslLibraryVersionString()
                << "\nLib Build Version Number: " << QSslSocket::sslLibraryBuildVersionNumber()
                << "\nLib Build Version String: " << QSslSocket::sslLibraryBuildVersionString();
    

    ... the following is returned:

    Lib Version Number:  9470431 
    Lib Version String:  "OpenSSL 0.9.8zd 8 Jan 2015" 
    Lib Build Version Number:  268439727 
    Lib Build Version String:  "OpenSSL 1.0.1j 15 Oct 2014"
    
    1 Reply Last reply
    0
    • DongD Offline
      DongD Offline
      Dong
      wrote on last edited by
      #2

      Hi @dontdoeval !

      I'm working with Google AdWords API and I'm dealing with same situation as you posted here.
      The only different is I'm even can't get WebView load a simple https page like https://google.com

      I wondering did you find your answer? do you have any ideal how to get it work?

      Thanks a lot !!!

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        One alternative to consider is to rebuild Qt using the new Secure Transport backend for OS X.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

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