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. SOLVED sslError: "The certificate is not yet valid" only on Android device

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

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidsslcertificate
3 Posts 2 Posters 2.2k Views
  • 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 Offline
    N Offline
    Nando
    wrote on 2 Dec 2015, 17:37 last edited by Nando 12 Feb 2015, 18:22
    #1

    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
    0
    • N Offline
      N Offline
      Nando
      wrote on 2 Dec 2015, 18:21 last edited by
      #2

      @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
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 2 Dec 2015, 23:04 last edited by
        #3

        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
        0

        3/3

        2 Dec 2015, 23:04

        • Login

        • Login or register to search.
        3 out of 3
        • First post
          3/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved