# javax.net.ssl.SSLHandshakeException

**URL:** <https://forum.keycloak.org/t/javax-net-ssl-sslhandshakeexception/9692>\
**Category:** Getting advice\
**Tags:** authentication\
**Created:** [June 21, 2021, 2:24pm UTC](https://forum.keycloak.org/t/javax-net-ssl-sslhandshakeexception/9692 "2021-06-21T14:24:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mangeshshrotey](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@mangeshshrotey](https://forum.keycloak.org/u/mangeshshrotey)\
**Post date:** [June 21, 2021, 2:24pm UTC](https://forum.keycloak.org/t/javax-net-ssl-sslhandshakeexception/9692/1 "2021-06-21T14:24:47Z")

</div>

Hi Team,

I am getting below mentioned error while accessing keycloak API with self-sign certificate .Please note that same code is working file we installed proper certificate.

**Error Message :** _RESTEASY004655: Unable to invoke request: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target_

Keycloak Version : 11.0.2

Please help me how to resolve this issue .

Thanks in advance 😊

Regards,

Mangesh Shrotey

---

<div class="post-metadata">

**Author:** ![Antarion](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/antarion/32/3285_2.png) [@Antarion](https://forum.keycloak.org/u/Antarion)\
**Post date:** [June 29, 2021, 6:33am UTC](https://forum.keycloak.org/t/javax-net-ssl-sslhandshakeexception/9692/2 "2021-06-29T06:33:11Z")

</div>

Hello,

You should add your certificate in the trusted ca

keytool -import -file myecert.cer -keystore /etc/ssl/certs/java/cacerts -alias mycert
