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:

    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



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


  • Lifetime Qt Champion

    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.


Log in to reply
 

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