OPEnSLab-OSU/SSLClient

ESP32 panic when use setVerificationTime

AB-informatica-service opened this issue · 2 comments

I've read in the documentation that it would be better to set the time with setVerificationTime() and I'm doing it.

I made the formulas to get the days and seconds, for example time for the test, 738715 and 4816 respectively.

Function call:
this->sslClient->setVerificationTime(daysSinceFirstDay, secondsSinceMidnight);

I get the error:

Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x42097542 PS : 0x00060f30 A0 : 0x8200e3d1 A1 : 0x3fcebd50
A2 : 0x00000d00 A3 : 0x000b459b A4 : 0x000012d0 A5 : 0x0000005a
A6 : 0x3c0d3995 A7 : 0x000b459b A8 : 0x82097542 A9 : 0x3fcebd30 `
A10 : 0x00000007 A11 : 0x00000005 A12 : 0x0000003f A13 : 0x00000071
A14 : 0x3c0d2d34 A15 : 0xff000000 SAR : 0x00000011 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000eb8 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xffffffff


I'm using ESP32-S3 and wifi connection and TinyGsm with SIM7000E.

How can I do to not panic ESP32?

Maybe I'm wrong with the implementation time?

My code:
this->sslClient->setVerificationTime(daysSinceFirstDay, secondsSinceMidnight);
this->sslClient = new SSLClient(*this->rawClient, TAs, (size_t)TAs_NUM, 17, 2, SSLClient::DebugLevel::SSL_WARN);
this->sslClient->setMutualAuthParams(mTLS);

Update:
I turned the call to the setverificationTime function to the bottom.

Now I get other errors:
(SSLClient)(SSL_WARN)(m_run_until): Terminating because the ssl engine closed
(SSLClient)(SSL_ERROR)(m_start_ssl): Failed to initlalize the SSL layer
(SSLClient)(SSL_ERROR)(m_print_br_error): Certificate is expired or not yet valid.

Maybe the days I count from 1st Jan 0AD are wrong?
As of today 07/15/2023 account 738715.

There is a function to see timestamp of the SSLClient?