ICloud Binding not working anymore

My ICloud binding had been working great since I installed and then the other day it stopped working.
In my Icloud account in the paperui I get this message:

Status: OFFLINE - COMMUNICATION_ERROR sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.

I remember installing an IPhone update not to long ago, not sure if that has something to do with it.
Has anybody ran into this problem or know how to fix?

Hi Mike,

please have a look into Icloud binding - General SSLEngine problem, there you should find what needs to be done to get the connection working again.

with kind regards,

Thanks Patrik. Just to make sure I will be doing it correctly. I have my OpenHAB installation on an ubuntu operating system. I would type these commands to fix it?

echo -n | openssl s_client -servername fmipmobile.icloud.com -host fmipmobile.icloud.com -port 443 -prexit -showcerts 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/icloud2.crt
cd /tmp

csplit -f cert /tmp/icloud2.crt '/^-----BEGIN CERTIFICATE-----/' {*}

// back to java dir, in my case /usr/lib/java-8
bin/keytool -importcert -file /tmp/cert01 -alias icloudfmi1 -trustcacerts -keystore ./jre/lib/security/cacerts -storepass changeit
bin/keytool -importcert -file /tmp/cert02 -alias icloudfmi2 -trustcacerts -keystore ./jre/lib/security/cacerts -storepass changeit

I don’t see my java directory at /usr/lib/java-8 , do you know where it should be?
Thanks for your help.

After more searching I found this directory.

/usr/lib/jvm/java-8-oracle/jre/lib/security$ ls
blacklist  blacklisted.certs  cacerts  java.policy  java.security  javaws.policy  policy  trusted.libraries

Would this be the correct directory? If so, I would I execute the last 2 commands from the /usr/lib/jvm/java-8-oracle directory?

1 Like

I ended up trying it, but it didn’t work. I got this message when I tried the last 2 commands:

Trust this certificate? [no]: yes
Certificate was added to keystore
keytool error: java.io.FileNotFoundException: ./jre/lib/security/cacerts (Permission denied)

Maybe you should try your commands with “sudo”

Thanks apfelflo89, that fixed it for me!!!

1 Like

in additition with sudo, it worked for me.

Thanks MikeH

…In my case, different java folder:

keytool -importcert -file /tmp/cert01 -alias icloudfmi1 -trustcacerts -keystore /usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/security/cacerts -storepass changeit

keytool -importcert -file /tmp/cert02 -alias icloudfmi2 -trustcacerts -keystore /usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/security/cacerts -storepass changeit

is working now…Thanks for the help !!!