Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved SOLVED sslError: "The certificate is not yet valid" only on Android device

    Mobile and Embedded
    android ssl certificate
    2
    3
    1998
    Loading More Posts
    • 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.
    • N
      Nando last edited by Nando

      Hi,

      my app uses ssl key encryption for the communication.
      Everything works fine when running directly on the developer machine.

      After calling:

      m_tcpSocket->connectToHostEncrypted(hostname, port);
      

      on a real (android) device leads to this error:

      QAbstractSocket::SocketError(13)
      "The certificate is not yet valid"

      Again, exactly the same code works fine direct on my developer machine.
      Any ideas what this could be?

      Greetings
      Nando

      1 Reply Last reply Reply Quote 0
      • N
        Nando last edited by

        @Nando said:

        "The certificate is not yet valid"

        I solved it:
        Date was wrong on my android device (was year 2012).
        After settings correct date and time it works.

        Greeting
        Nando

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          Glad you found out and thanks for sharing !

          Just a side note, you can now mark the thread as solved using the "Topic Tool" button. So there's no need to modify the title anymore.

          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 Reply Quote 0
          • First post
            Last post