Important: Please read the Qt Code of Conduct -

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

  • 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:

    "The certificate is not yet valid"

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


  • @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.


  • Lifetime Qt Champion


    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.