MrBuddyCasino / ESP32_Alexa

An Alexa Smart Speaker project for the ESP32.
Mozilla Public License 2.0
264 stars 72 forks source link

ERROR: SSL error 54 (BR_ERR_X509)EXPIRED) #38

Open jhpark555 opened 5 years ago

jhpark555 commented 5 years ago

I'm implementing this application on different ARM processor. In the meanwhile , I got SSL error 54 like below. But I can't find what causes of this. Could you let me know how I can debug ?

........................................................ adding task: refresh_auth_token adding task: downchannel
adding task: send_initial_state Initializing SNTP
Current local time and data: Thu Jan 1 00:00:00 1970
Current local time and data: Thu Nov 29 01:25:44 2018

new nghttp session, uri: https://alexa.boeckling.net/auth/refresh/Atzr|IwEBINm95QtTVXzGvBKBbOW3S7yYwHIAHFbl6QvLY0nLR4Agzr6KAj7xesrinYpc29t7pIbtNHKQT-k3ll_JKw4ZzzWPuLMxUCqudIz9OfrFvdy1CKglQzObE3-8orTxvMKVZHuV8BzDmdIGuHLRSEITvuRELwxGE6xQureAw-e_j201Grd4EhK6 Writing HTTP request... Request headers:
:method: GET
:scheme: https :authority: alexa.boeckling.net :path: /auth/refresh/Atzr|IwEBINm95QtTVXzGvBKBbOW3S7yYwHIAHFbl6QvLY0nLR4Agzr6KAj7xesrinYpc29t7pIbtNHKQT-k3ll_JKw4ZzzWPuLMxUCqudIz9OfrFvdy1CKglQzObE3-8orTxvMKVZHuV8BzDmdIGuHLRSEITvuRELwxGE6xQureAw-e_j201Grd4EhK6KEOLscvfzxPVjWz9xiDHlcUShzVq4pnuJUcpPL9kqxBxJ created new stream: 1 adding task: alexa.boeckling.net Algorithms:
removing task: refresh_auth_token connecting to: 188.166.102.176
connected.
WARNING: no configured trust anchor ERROR: SSL error 54 (BR_ERR_X509_EXPIRED) asio_ssl_handle_close
freeing http2_session_data

jhpark555 commented 5 years ago

I found the problem in my code. I didn't realize the time(...) function. I fixed it. Thanks.

void br_x509_minimal_run(void *t0ctx) { ...................................

if (CTX->days == 0 && CTX->seconds == 0) {

if BR_USE_UNIX_TIME

    time_t x = time(NULL);

printf("time x= %x \n",(int)x);

    T0_PUSH((uint32_t)(x / 86400) + 719528);
    T0_PUSH((uint32_t)(x % 86400));

elif BR_USE_WIN32_TIME