Hi All,
We are doing REST API call integration. For this REST API call integration, we need to add a trusted SSL Certificate.
We are exploring 2 approaches:
1. Add the certificate into AEM Truststore, and then get the truststore as a keystore object. Next, added the keystore object into SSLContext, and added the sslContext into HTTPClient to call the API. We are getting this "org.apache.sling.engine.impl.SlingMainServlet service: Uncaught Problem handling the request javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_required" exception.
![Dave2511_0-1678776400143.png Dave2511_0-1678776400143.png](https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/54910i452880627F493487/image-size/medium?v=v2&px=400)
![Dave2511_1-1678776643171.png Dave2511_1-1678776643171.png](https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/54911iD026C8879D25A20F/image-size/medium?v=v2&px=400)
2. The second approach is - to add the certificate to the java keystore (cacerts), restarted AEM instance and called the API using HTTPClient. We are still getting the same "org.apache.sling.engine.impl.SlingMainServlet service: Uncaught Problem handling the request javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_required" exception.
![Dave2511_2-1678776746427.png Dave2511_2-1678776746427.png](https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/54912iA4E7E60C0AB55F63/image-size/medium?v=v2&px=400)
If anyone has done a similar implementation, please advise us.