You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 29, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 29, 2023. It is now read-only.
SSLClientParameters mTLS not at beginning but at runtime #31
not at the beginning of the module but at runtime inside another function.
I explain you why i need to do this it is because i want to read from a txt file the certificates and keys for the connection instead of change the code manually for every device that is deployed.
But when i try to do this
uint8_t setup_ethernet(void)
{
uint8_t result_connection = 0;
/*retrieve security info for aws from memory*/
Load_secrets_from_memory();
SSLClientParameters mTLS = SSLClientParameters::fromPEM(my_cert, sizeof my_cert, my_key, sizeof my_key);
/*authentication on aws*/
ethClientSSL.setMutualAuthParams(mTLS);
Ethernet.init(ETH_CS, ðernetSPI, ETH_SCLK, ETH_MISO, ETH_MOSI);
Serial.begin(115200);
while (!Serial)
{
; // wait for serial port to connect. Needed for native USB port only
}
Ethernet.begin(mac, TIME_OUT_WAITING_ETH_CABLE);
// Check for Ethernet hardware present
if (Ethernet.hardwareStatus() == EthernetNoHardware)
{
result_connection = 1;
Serial.println("Ethernet shield was not found. Sorry, can't run without hardware. :(");
while (true)
{
delay(1); // do nothing, no point running without Ethernet hardware
}
}
if (Ethernet.linkStatus() == LinkOFF)
{
result_connection = 1;
Serial.println("Ethernet cable is not connected.");
}
Serial.print("Joined LAN with IP ");
Serial.println(Ethernet.localIP());
Serial.flush();
setup_time();
// Create a message handler
mqtt_istance.setCallback(callback);
return result_connection;
}
my esp32 is crashing and restarting..
I wonder if in your opinion it is possible to call that instruction once i have read the txt file..
Thanks a lot for your help
Activity
Repository owner locked and limited conversation to collaborators on Dec 22, 2022
Activity