I am trying to use a cert with an ESP8266. The identical code works fine on ab ESP32, but in the ESP8266 I am getting errors.
I set the cert as follows:
const char *ROOT_CERT PROGMEM = R"EOF(= "-----BEGIN CERTIFICATE-----
MIIFYDCCBEigAwIBAgIQQAF3ITfU6UK47naqPGQKtzANBgkqhkiG9w0BAQsFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
...
-----END CERTIFICATE--------)EOF";
For the ESP32 I use:
wifiClient.setCACert(ROOT_CERT)
This works fine, but on the 8266 I get:
no matching function for call to 'BearSSL::WiFiClientSecure::setCACert(const char*&)'
I have done some research and there are some suggestions the length is required, so I tried that also:
wifiClient.setCACert(ROOT_CERT, sizeof(ROOT_CERT)-1);
But that produces the following error:
invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]
I am using the 2.7.4 8266 board library as I have heard the 3.X has similar issues.
I have tried V 3.X but I get the following:
class BearSSL::WiFiClientSecure' has no member named 'setCACert'