ESP32 with MQTT secured connection By adding certificates

Hello guys,
I am using ESP32 module to connect to mqtt secured broker with 8883 port no.
I am unable to connect the module n facing error of state code -2.

I am using pubsubclient and wificlientserver libraries.

PLease help me with adding certificates and how to program the ESP32