ESP32 WPA2 Enterprise Connection via Identity and Certificate with EAP-TLS


I am trying to connect my ESP32 Adafruit to a WPA2 enterprise.
However, the connection gets stuck in the radius server.
I got the report log and it shows the following error:
"EAP-TLS failed SSL/TLS handshake because the client rejected the ISE local-certificate".

this is how i initialize the connection:
void initialise_wifi(void)
Serial.print("Connecting to network: ");
WiFi.disconnect(true); //disconnect form wifi to set new wifi connection
esp_wpa2_config_t config = WPA2_CONFIG_INIT_DEFAULT();

WiFi.mode(WIFI_STA); //init wifi mode
if ( esp_wifi_sta_wpa2_ent_set_ca_cert((uint8_t *)ca_pem, strlen(ca_pem)) ) {
Serial.println("Failed to set WPA2 CA Certificate with ca_pem");

if ( esp_wifi_sta_wpa2_ent_set_cert_key((uint8_t *)client_crt, strlen(client_crt), (uint8_t *)client_key, strlen(client_key), NULL, 0) ) {
Serial.println("Failed to set WPA2 Client Certificate and Key using client_crt ");

if ( esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)EXAMPLE_EAP_ID, strlen(EXAMPLE_EAP_ID)) ) {
Serial.println("Failed to set WPA2 Identity");
// dont return for now.
// return;


I've been searching for an example or guide on how to connect via EAP-TLS but i haven't found any as all the
search shows TTLS and PEAP/MSCHAPv2 as EAP method.

Please help point me to a guide.