javax.net.ssl.SSLHandshakeException

22 views
Skip to first unread message

Mohamed Bouichou

unread,
Sep 16, 2019, 12:26:13 PM9/16/19
to CodenameOne Discussions
Hi,
i'm trying to communicate with an API published in a remote server using  https protocol, the https certificate is installed in the server but still i get this error whenever i call the server from the simulator or the APK :

"Exception: javax.net.ssl.SSLHandshakeException - sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)"

What is exactly might be the issue? and please note the emergency of this problem .

Thank you.





Gareth Murfin

unread,
Sep 16, 2019, 6:27:01 PM9/16/19
to CodenameOne Discussions
Hi, I had this issue once, it turned out to be a server side problem. My server guy fixed it, this is what he said:

"ok.... ssl issue is resolved. i had to put the full chain cert in the ssl.conf file


just fyi, and in case it comes up again for any of your other customers, you create a fullchain,pem file and paste in the root certificate and the intermediate certificate from the cert authority and then enable that file in the ssl.conf file

SSLCertificateChainFile /root/.ssh/fullchain.pem

then restart the httpd service" 



 

Shai Almog

unread,
Sep 17, 2019, 1:35:08 AM9/17/19
to CodenameOne Discussions
What certificate are you using on the server and whats the version of the JDK you're using locally?
Reply all
Reply to author
Forward
0 new messages