SSL handshake error on QNX (BB playbook)

  • Hello,

    I've build my Enginio based application for the blackberry playbook but get stuck with an "SSL handshake error" when the application is trying to connect to the backend.

    I'm very familiar with SSL, could someone give me a hint that help to solve the problem.

    The same application works ok on Windows.
    The playbook has no problem accessing https websites


  • I assume that you built Qt5 yourself. Have you built it with openssl support? Enginio depands on QtNetworking and ssl support inside it.

  • Yes I build Qt5 myself with the -openssl configure option.

    I think it is Qt related and not particular to enginio, I build the sslclient example and I also have CA error with this one...

    Is there any recent patch to Qt5 for QNX that would correct this, which branch of Qt5 do you advise to build on ?


  • You can try to check if the ssl suport was enabled during configure

    cat config.summary |grep -i ssl

    Sorry, I haven't tried to run Enginio client on BB device (yet). I'm not familiar with Qt5 state on QNX.

  • Alleluia,

    I found out the problem, it was the path to the root certificate directory of the device that was incorrect, hence no root certificates trusted.

    The change is in qsslsocket.cpp:
    in unixRootCertDirectories() function, add the following path
    << "/var/certmgr/web/user_trusted/" // BlackBerry TABLET OS
    to the path list.

    This is a regression of commit 4c8d8a72ec65f409394075ef50401265e495c1dd
    which replaced this location.

    Now the Enginio Qt App is running on the Playbook, hurra !

    PS: tomorrow I will post a bug report or ask blackberry maintainer about this change

  • Nice! I want to try that to, do you have any special hints?

  • If I remember:

    1. Install BB playbook NDK from blackberry website
    2. Get signing keys from blackberry :
    3. Build Qt5 (I used latest stable branch) :
    4. Build and install Enginio module the same way you do with other modules (qmake- make -make install).
      NOTE: latest git didn't compile (but it didn't on windows neither...), I used this commit 21842981cb86c97b28e6a8dbc125c38b8a739fc7
      and I had to do little correction for it to compile with qcc :
      @diff --git a/src/enginio_plugin/enginioqmlobjectadaptor_p.h b/src/enginio_plugin/enginioqmlobjectadaptor_p.h
      index 9397734..ac98501 100644
      --- a/src/enginio_plugin/enginioqmlobjectadaptor_p.h
      +++ b/src/enginio_plugin/enginioqmlobjectadaptor_p.h
      -85,18 +85,18 template <> struct ValueAdaptor<QJSValue>
      template <> struct ObjectAdaptor<QJSValue> : public ValueAdaptor<QJSValue>
      ObjectAdaptor(const QJSValue &value, EnginioQmlClientPrivate *client)
    •    : ValueAdaptor(value, client)
    •    : ValueAdaptor<QJSValue>(value, client)

    template <> struct ArrayAdaptor<QJSValue> : public ValueAdaptor<QJSValue>
    ArrayAdaptor(const QJSValue &value, EnginioQmlClientPrivate *client)

    •    : ValueAdaptor(value, client)
    •    : ValueAdaptor<QJSValue>(value, client)


      ArrayAdaptor(const ArrayAdaptor<QJSValue> &value)

    •    : ValueAdaptor(value)
    •    : ValueAdaptor<QJSValue>(value)


      struct const_iterator

    1. Add Enginio libs to the "bar" file of your application and deploy.

    I ran this from Windows8 machine, but it should work as well from Linux.

  • I forwarded your comment to Peter, author of 4c8d8a72ec65f409394075ef50401265e495c1dd commit. He will look into it :-)

    Thank you for the instructions I will check them as soon as I will have a bit of time. A propos step number 4, you can push the change to I would be happy to integrate that.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.