Retrieving images from HTTPS servers using Java

From version 4.7.3.9 onwards Ibex can retrieve images from HTTPS servers. This functionality has some limitations:

  • JDK/JRE 1.5 or higher is required;
  • The web server or the URL you are connecting to must have a valid certificate from an authorized CA which your JRE/JDK is aware of.

The second point above is important. This is the reason this image can be retrieved:

<fo:external-graphic src="url(https://www.thawte.com/assets/shared/images/thawte_logo.jpg)"/>
      

but this one cannot:

<fo:external-graphic src="url(https://cdn.thawte.com/assets/shared/images/thawte_logo.jpg)"/>
      

Attempting to retrieve the second image from cdn.thawte.com may result in this exception:

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

This problem can be fixed by importing the server certificate and installing it in your JDK's keystore. Instructions on how to do this can be found here.