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. The backend "cert-only" does not support QSslKey Qt android
Forum Updated to NodeBB v4.3 + New Features

The backend "cert-only" does not support QSslKey Qt android

Scheduled Pinned Locked Moved Solved Mobile and Embedded
9 Posts 4 Posters 1.8k Views 1 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.
  • S Offline
    S Offline
    Sheep
    wrote on 16 Sept 2023, 08:10 last edited by
    #1

    Greetings

    I have a project am testing, at first i tested on Windows 10, and every thing was fine, then i tested it on windows 11, (Using the same machine but booting in different OSs), just after i finished testing it with windows 11, i could nolonger make network requests, i keet getting these errors...PLEASE I CHANGED NOTHING DURING THE TEST!

    
    W qt.network.ssl:  unknown unknown The backend "cert-only" does not support QSslKey
    W qt.network.ssl:  unknown unknown Active TLS backend does not support key creation
    W qt.network.ssl:  unknown unknown The backend "cert-only" does not support QSslKey
    W qt.network.ssl:  unknown unknown Active TLS backend does not support key creation
    W qt.network.ssl:  unknown unknown The backend "cert-only" does not support QSslSocket
    W qt.network.ssl:  unknown unknown The backend named "cert-only" does not support TLS
    W qt.network.ssl:  unknown unknown QSslSocket::connectToHostEncrypted: TLS initialization failed
    

    i really don`t know what to doa next because i every time i make a request, i get

    "TLS initialization failed"
    

    here is how i have been linking the openssl in CMAKE

    set_target_properties(${GW_LIBRARY_NAME} PROPERTIES QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android)
    
        list(APPEND android_extra_libs
          ${CMAKE_CURRENT_SOURCE_DIR}/../assets/libs/openssl/arm64/libcrypto_1_1.so
      ${CMAKE_CURRENT_SOURCE_DIR}/../assets/libs/openssl/arm64/libssl_1_1.so)
    
    
    set_target_properties(${GW_LIBRARY_NAME} PROPERTIES
       QT_ANDROID_EXTRA_LIBS "${android_extra_libs}")
    

    I tried my code in a different Qt project on windows 10 and it successfully worked without any issues..

    Please take note, everthing was working ...it just failed to work out of the blue after testing with windows 11,
    Am using Qt 6.5, android ndk 25.

    And also, i noticed on forums recommending QSslSocket::sslLibraryBuildVersionString() and QSslSocket::sslLibraryVersionString() to get the openssl verstion used by qt...but when i tried it..i got totally different results

    Here is my code

      qDebug() << "My build Version String is - "
               << QSslSocket::sslLibraryBuildVersionString() << "  "
                " and version string is  "
               << QSslSocket::sslLibraryVersionString();
    

    Here are my results...

    "My build Version String is - "Secure Channel (NTDDI: 0xA00000C)" and version string is  "Secure Channel, Windows 10.0.18363";
    
    

    Any help please!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Sept 2023, 19:20 last edited by
      #2

      Hi,

      Something is not clear.

      Do you mean that the deployment on Androïd from Win10 is working properly but not from Win11 ?

      Might be a silly question but are you sure the you have the arm based OpenSSL properly available on both systems ?

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

      S 1 Reply Last reply 17 Sept 2023, 11:55
      0
      • S SGaist
        16 Sept 2023, 19:20

        Hi,

        Something is not clear.

        Do you mean that the deployment on Androïd from Win10 is working properly but not from Win11 ?

        Might be a silly question but are you sure the you have the arm based OpenSSL properly available on both systems ?

        S Offline
        S Offline
        Sheep
        wrote on 17 Sept 2023, 11:55 last edited by Sheep
        #3

        @SGaist said in The backend "cert-only" does not support QSslKey Qt android:

        Might be a silly question but are you sure the you have the arm based OpenSSL properly available on both systems

        Its not silly and am glad for your response....My answer is yes ...every thing was working wihout any issues, am using Android Qt 6.5.1 Clang arm64-v8a

        @SGaist said in The backend "cert-only" does not support QSslKey Qt android:

        Do you mean that the deployment on Androïd from Win10 is working properly but not from Win11 ?

        The project is mainly target for both desktop and android...the desktop version is working fine...(no issues), but the same code when its run in android it fails...

        When i try to get the openssl version used by qt by

        qDebug() << "My build Version String is - "
                  << QSslSocket::sslLibraryBuildVersionString()
                  << "  "
                     " and version string is  "
                  << QSslSocket::sslLibraryVersionString();
        

        :.....i get My build Version String is - "Secure Channel (NTDDI: 0xA00000C)" and version string is "Secure Channel, Windows 10.0.18363"..This output is for windows...but for android get an empty string for both functions!

        S 1 Reply Last reply 17 Sept 2023, 12:11
        0
        • S Sheep
          17 Sept 2023, 11:55

          @SGaist said in The backend "cert-only" does not support QSslKey Qt android:

          Might be a silly question but are you sure the you have the arm based OpenSSL properly available on both systems

          Its not silly and am glad for your response....My answer is yes ...every thing was working wihout any issues, am using Android Qt 6.5.1 Clang arm64-v8a

          @SGaist said in The backend "cert-only" does not support QSslKey Qt android:

          Do you mean that the deployment on Androïd from Win10 is working properly but not from Win11 ?

          The project is mainly target for both desktop and android...the desktop version is working fine...(no issues), but the same code when its run in android it fails...

          When i try to get the openssl version used by qt by

          qDebug() << "My build Version String is - "
                    << QSslSocket::sslLibraryBuildVersionString()
                    << "  "
                       " and version string is  "
                    << QSslSocket::sslLibraryVersionString();
          

          :.....i get My build Version String is - "Secure Channel (NTDDI: 0xA00000C)" and version string is "Secure Channel, Windows 10.0.18363"..This output is for windows...but for android get an empty string for both functions!

          S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 17 Sept 2023, 12:11 last edited by
          #4

          I just realized, since Qt 6.5, it's OpenSSL 3 that is used by default. That would explain your issue since you are using 1.1.

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

          S 1 Reply Last reply 17 Sept 2023, 14:45
          2
          • S SGaist
            17 Sept 2023, 12:11

            I just realized, since Qt 6.5, it's OpenSSL 3 that is used by default. That would explain your issue since you are using 1.1.

            S Offline
            S Offline
            Sheep
            wrote on 17 Sept 2023, 14:45 last edited by
            #5

            @SGaist Thanks for the help...let try to use openssl 3 as i will let your know of my progress

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sheep
              wrote on 18 Sept 2023, 10:22 last edited by
              #6

              I successfully fixed the issue after upgrading to OPenssl 3...Thanks you @SGaist for the help

              1 Reply Last reply
              1
              • kkoehneK kkoehne has marked this topic as solved on 18 Sept 2023, 14:44
              • P Offline
                P Offline
                PappyJoe
                wrote on 11 Jan 2024, 23:20 last edited by
                #7

                @Sheep, I am having the same error you had could you please guide me through how you resolve yours?

                if(ANDROID)
                add_library(test2 SHARED
                ${PROJECT_SOURCES}
                )
                set_properties(TARGET ${PROJECT_SOURCES} PROPERTY QT_ANDROID_EXTRA_LIBS
                ${PROJECT_SOURCES}/ui/assets/ssl_3/arm64-v8a/libcrypto_3.so
                ${PROJECT_SOURCES}/ui/assets/ssl_3/arm64-v8a/libssl_3.so)

                P 1 Reply Last reply 12 Jan 2024, 00:56
                0
                • P PappyJoe
                  11 Jan 2024, 23:20

                  @Sheep, I am having the same error you had could you please guide me through how you resolve yours?

                  if(ANDROID)
                  add_library(test2 SHARED
                  ${PROJECT_SOURCES}
                  )
                  set_properties(TARGET ${PROJECT_SOURCES} PROPERTY QT_ANDROID_EXTRA_LIBS
                  ${PROJECT_SOURCES}/ui/assets/ssl_3/arm64-v8a/libcrypto_3.so
                  ${PROJECT_SOURCES}/ui/assets/ssl_3/arm64-v8a/libssl_3.so)

                  P Offline
                  P Offline
                  PappyJoe
                  wrote on 12 Jan 2024, 00:56 last edited by
                  #8

                  I fixed the issue already.

                  I 1 Reply Last reply 6 Feb 2024, 17:01
                  0
                  • P PappyJoe
                    12 Jan 2024, 00:56

                    I fixed the issue already.

                    I Offline
                    I Offline
                    Ivelin
                    wrote on 6 Feb 2024, 17:01 last edited by
                    #9
                    This post is deleted!
                    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