Main Content

Resolve Security Exception Error When Accessing Help

Problem

Your end user runs a doc command at the MATLAB® command prompt, for example:

doc plot

They see an error similar to the following:

Error using doc>displayDocPage (line 171) 
Java exception occurred: 
com.mathworks.webservices.client.core.MathWorksClientException: unable 
to connect to host sun.security.validator.ValidatorException: PKIX 
path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to 
find valid certification path to requested target 
. . . 

Solution

This exception occurs when the Local CA certificate store is missing one or more intermediate CA certificates required for LDAP authentication. For the client to validate the server, Root CA certificates must be available in the local certificate store. Without these intermediate Certificates, the client considers the secure connection untrusted and, in most cases, rejects it.

The figure below shows an example of a certificate path that can be viewed from the Chrome® browser. In this example, the Certificate of *.yourdomain.com has GlobalSign Root CA as root and three intermediate certificates: GlobalSign, Trusted Root CA SH256 G2, and DPDHL TLS SHA2 CA I3.

Example certificate path

To resolve missing certificates:

  1. Append the missing intermediate CA certificates to your public key file (for example, publicKey.pem).

  2. Open your publicKey.pem file, and then append only the missing intermediate certificates to it in the reverse order. Do not append the root certificate to this file.

For this example, the file publicKey.pem must contains the intermediate certificates in this order:

-----BEGIN CERTIFICATE-----
       PDHL TLS SHA2 CA I3
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
       Trusted Root CA SH256 G2
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
       GlobalSign
-----END CERTIFICATE-----

Related Topics