Flickr app issues

I have my own app to sync my photos with Flickr which I built with Matlab. The app suddenly stopped working a week or so ago. The failure was happening in urlread. After stepping through the code, I was able to get following exception to show up:

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

This was happening because updated security certificate of Flickr. Fix of this problem is essentially adding the new security certificate to JRE’s keystore. A general solution is available at:
http://stackoverflow.com/questions/9619030/resolving-javax-net-ssl-sslhandshakeexception-sun-security-validator-validatore

Since Matlab uses its own JRE, this might be little tricky to achieve. However, I was able to locate following solution which essentially achieves same thing as above for Matlab.

http://www.mathworks.com/matlabcentral/answers/92506-can-i-force-urlread-and-other-matlab-functions-which-access-internet-websites-to-open-secure-websi

So I downloaded the Flickr certificate using Chrome and proceeded to apply the fix. But alas, the problem persisted. One thing I noticed while installing the certificate was that it was issued by AVG which appeared odd to me (I run AVG antivirus on my computer). So I dug around to find following which states that AVG (Avast) installs Man-in-the-Middle certificate.

http://superuser.com/questions/901474/windows-8-1-certificate-problems-ie-cant-open-google

So I was installing a wrong certificate all this time, which was causing the fix to fail. I went an “AVG free” computer and downloaded the security certificate for Flickr and proceeded with the fix. The app is now working again smoothly.

Leave a Reply

Your email address will not be published.