Sending HTTPS requests caused SSLHandshakeException

smartapp

#1

I’m trying to create a Smartapp that can collect some sensor data and send it out to my server via HTTPS requests. I have a DigiCert SSL certificate for my server but SmartThings still raised these exceptions:

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.

Any idea how I can make SmartThings talking to my certified server with HTTPS? Appreciate your help!


(Eric Bright) #2

First, with all due respect, why do you need SSL? Are you really worried that someone might see your sensor data? Second you do not have enough information to determine the cause of the handshake failure. I would suggest debug logging or network traces to gather more information about the handshake.