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. Problem under Android with OpenSSL 1.1.1c and Qt 5.12.4.
Qt 6.11 is out! See what's new in the release blog

Problem under Android with OpenSSL 1.1.1c and Qt 5.12.4.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 4 Posters 1.5k 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.
  • K Offline
    K Offline
    KarlHal
    wrote on last edited by
    #1

    Hello.

    I have a problem with OpenSSL v1.1.1b and Qt 5.12.4 under Android

    Everything works fine with a phone running with Android 7.1 but I get some error messages on tablets running on Android 4.4 and 5.0:

    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_init_ssl
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_init_crypto
    qt.network.ssl: QSslSocket: cannot resolve ASN1_STRING_get0_data
    qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_reset
    qt.network.ssl: QSslSocket: cannot resolve RSA_bits
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_new_null
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_push
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_free
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_num
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_pop_free
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_sk_value
    qt.network.ssl: QSslSocket: cannot resolve DH_get0_pqg
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_options
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_ciphersuites
    qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_use_session_callback
    qt.network.ssl: QSslSocket: cannot resolve SSL_get_client_random
    qt.network.ssl: QSslSocket: cannot resolve SSL_SESSION_get_master_key
    qt.network.ssl: QSslSocket: cannot resolve SSL_session_reused
    qt.network.ssl: QSslSocket: cannot resolve SSL_set_options
    qt.network.ssl: QSslSocket: cannot resolve TLS_method
    qt.network.ssl: QSslSocket: cannot resolve TLS_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLS_server_method
    qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get0_chain
    qt.network.ssl: QSslSocket: cannot resolve X509_getm_notBefore
    qt.network.ssl: QSslSocket: cannot resolve X509_getm_notAfter
    qt.network.ssl: QSslSocket: cannot resolve X509_get_version
    qt.network.ssl: QSslSocket: cannot resolve OpenSSL_version_num
    qt.network.ssl: QSslSocket: cannot resolve OpenSSL_version
    qt.network.ssl: Incompatible version of OpenSSL
    qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
    qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
    

    In the pro file, I insert the files .so using this way.

    ANDROID_EXTRA_LIBS = \
                       $$PWD/android/lib/armv7/1.1/libcrypto.so \
                       $$PWD/android/lib/armv7/1.1/libssl.so
    

    I tried to compile the.so files or retrieve them from this site https://github.com/KDAB/android_openssl but the result is the same.

    Why do I get the message "Incompatible version of OpenSSL"? However, I use Openssl 1.1.1.1c with Qt 5.12.4

    Thanks,

    Best regards !

    Francky033

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

      Hi,

      IIRC these old versions of Android provided OpenSSL so I wonder if it's that version that gets loaded for some reason.

      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
      • K Offline
        K Offline
        KarlHal
        wrote on last edited by
        #3

        Yes. The problem seems to come from the fact that Android versions < 6.0 do not have the TLS 1.2 protocol enabled.
        So, the most prudent thing to do is to stay at the version of Qt 5.12.3 to maintain compatibility with the Android versions < 6.0

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vcamblor
          wrote on last edited by vcamblor
          #4

          I had same problem and I obtained the next conclusion:
          In versions < 6.0, Android includes this libraries in system. To use your libraries must be rename it to libcrypto_1_1.so and libssl_1_1.so. Furthermore, this libraries must be compiled with ANDROID_API 16 (to works over Android 4.1).

          You can get the libraries from: https://github.com/KDAB/android_openssl/

          X 1 Reply Last reply
          1
          • V vcamblor

            I had same problem and I obtained the next conclusion:
            In versions < 6.0, Android includes this libraries in system. To use your libraries must be rename it to libcrypto_1_1.so and libssl_1_1.so. Furthermore, this libraries must be compiled with ANDROID_API 16 (to works over Android 4.1).

            You can get the libraries from: https://github.com/KDAB/android_openssl/

            X Offline
            X Offline
            xtingray
            wrote on last edited by xtingray
            #5

            @vcamblor I think there is a typo in the name of the libraries. The right names are: libcrypto_1_1.so and libssl_1_1.so

            Missing a "_" can be a nightmare at the moment of testing the APK :P


            Qt Developer

            V 1 Reply Last reply
            1
            • X xtingray

              @vcamblor I think there is a typo in the name of the libraries. The right names are: libcrypto_1_1.so and libssl_1_1.so

              Missing a "_" can be a nightmare at the moment of testing the APK :P

              V Offline
              V Offline
              vcamblor
              wrote on last edited by
              #6

              @xtingray Yes, you're right. I've made a mistake writing it

              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