diag: trace RTC synchronization and WSS clock state

This commit is contained in:
chenjintao
2026-10-26 11:55:40 +08:00
parent b2c78208bf
commit c53a117368
14 changed files with 439 additions and 4 deletions
@@ -28,6 +28,7 @@
#include "sockets.h"
#include "ql_rtos.h"
#include <time.h>
#include "time_diag.h"
#include "rws_handshake.h"
#ifdef LIBRWS_USING_MBED_TLS
#include "mbedtls/base64.h"
@@ -1945,7 +1946,8 @@ int rws_ssl_conn(_rws_socket *s)
LOG_E("WSS requires a trusted root CA\n");
goto exit;
}
if (time(NULL) < 1704067200) {
stage = "check RTC time";
if (talkingq_time_diag_wss_time() < 1704067200) {
LOG_E("WSS requires valid network/RTC time before certificate verification\n");
goto exit;
}