Topic: Error -150 results in a BACKWARDS issue
I am getting an error -150 when attempting to call "wolfSSL_CTX_load_verify_buffer()"
But only in my embedded project. Not on my PC.
The issue: The SERVER tells the unit what the time is. There is no battery backed RTC.
We can't get to the server to tell us the time because the CAs cannot be loaded.
The CAs I am testing are from DigiCert
Validity
Not Before: Mar 30 00:00:00 2021 GMT
Not After : Mar 29 23:59:59 2031 GMT
Validity
Not Before: Aug 1 12:00:00 2013 GMT
Not After : Jan 15 12:00:00 2038 GMT
I tried setting our internal clock to 2022 01 01 00 00 00 001 (Jan1 2022) BEFORE even calling
m_sslCtx = wolfSSL_CTX_new(meth);
But it is still failing to load the CAs.
And to verify it is set, I display the time immediately AFTER calling
wolfSSL_CTX_load_verify_buffer()
and getting a failure.
So, how/where is the Wolf lib getting the time that it decides to reject the CA's?
How can I force it to load the CA file before the time is set?
<Code shown is not to scale>