Skip to main content
FortiKoala
Staff
Staff
Jan 24, 2018 1:39 PM UTC

Technical Tip: How to avoid certificate error message by chaining Root CA and Intermediate CA certificates on FortiGate

  • Jul 21, 2026 6:55 AM UTC
  • 0 replies
  • 47243 views
  • Translate All

Description

This article describes a scenario about when using third-party certificates signed by intermediate CA/root CA, sometimes FortiOS will not send the complete certificate chain to the client. This occurs due to an incorrect configuration and a certificate error message is displayed on the client browser.

This article helps to avoid such error messages.


Scope


This article applies to the following authentication types:

  • Admin WebUI login to FortiGate.

  • SSL VPN authentication to FortiGate.

  • Captive Portal authentication over HTTPS to FortiGate.

 

This article applies to the following certificate types:

  • Locally signed certificates.

  • Certificates signed by well-known CAs.


Solution

While authenticating against the captive portal of a FortiGate, a certificate error message is sometimes displayed.
The certificate error can be caused by several Alert messages as described in the TLS/SSL RFCs. Viewing the developer tools available in the web browser helps narrow down the exact root cause of the certificate error message:

 

kb_11509_1.png

 

In this case, the certificate error message was caused by an invalid/no chain of certificates verifying the authenticity of the server certificate provided in the SSL/TLS handshake.
 

The certificate chain is missing, as shown in the certification path tab:

 

kb_11509_2.png

 

Using Wireshark, the same can be verified by capturing the SSL/TLS handshake between the browser and the server.
 

kb_11509_3.png

 

Select Export Packet Bytes and save the file as certificate.cer, and open the certificate.cer, which looks like below.

 

kb_11509_4.png

 

Go to the FortiGate GUI and upload the public key/certificate of Root CA and Intermediate CA in the CA Certificate section in PEM/cer format.

 

kb_11509_5.png

 

Make sure that you have the Root CA and Intermediate CA under the External CA certificates.

 

kb_11509_6.png

 

In new versions, the location is under 'Remote CA Certificate':
 

ScreenHunter 1424.png

 

Restart the authd process:

 

kb_11509_7.png

 

For SSL VPN web services to take effect, either restart the SSLVPND daemon or reconfigure the server certificate in the SSL VPN settings by switching to another certificate and reverting back to the original certificate.

Note:
Restarting the SSLVPND daemon or reconfiguring the SSL VPN server certificate will interrupt active SSL VPN connections.

 

On the browser, ensure that the Root CA is present/installed/trusted.
Intermediate CA doesn't need to be installed on the browser because the intermediate CA will be sent in the SSL/TLS handshake by the FortiGate.

 

kb_11509_8.png

 

 

 

Re-open the browser and access any web page. This redirects to the captive portal login page on the FortiGate.

 

 

kb_11509_9.png

 

 

 

The certificate chain is present this time, and no error is seen on the browser.

 

 

kb_11509_10.png

 

 

 

Verify using Wireshark to capture the SSL/TLS Handshake.

 

 

kb_11509_11.png

 

Another option is to use OpenSSL to validate the certificate chain:
 

openssl s_client -verify 5 -connect 192.168.170.33:10443 </dev/null
verify depth is 5
CONNECTED(00000003)
depth=2 C = MX, ST = CDMX, L = Mexico, O = Fortinet, OU = TAC, CN = CA_XCA-root, emailAddress = oxxx@fortinet.com
verify error:num=19:self signed certificate in certificate chain
verify return:1
depth=2 C = MX, ST = CDMX, L = Mexico, O = Fortinet, OU = TAC, CN = CA_XCA-root, emailAddress = oxxx@fortinet.com
verify return:1
depth=1 C = MX, ST = CDMX, L = MEXICO, O = TAC XCA, OU = SOPORTE, CN = CA_XCA_2025, emailAddress = oxxx@fortinet.com
verify return:1
depth=0 C = MX, ST = MEXICO, L = DCMX, O = MEXICOTAC, OU = TACMEX, CN = *vpn2.tacmexico.mx, emailAddress = oxxx@fortinet.com
verify return:1
---
Certificate chain
0  s:/C=MX/ST=MEXICO/L=DCMX/O=MEXICOTAC/OU=TACMEX/CN=*vpn2.tacmexico.mx/emailAddress=oxxx@fortinet.com
   i:/C=MX/ST=CDMX/L=MEXICO/O=TAC XCA/OU=SOPORTE/CN=CA_XCA_2025/emailAddress=oxxx@fortinet.com
1  s:/C=MX/ST=CDMX/L=MEXICO/O=TAC XCA/OU=SOPORTE/CN=CA_XCA_2025/emailAddress=oxxx@fortinet.com
   i:/C=MX/ST=CDMX/L=Mexico/O=Fortinet/OU=TAC/CN=CA_XCA-root/emailAddress=oxxx@fortinet.com
2  s:/C=MX/ST=CDMX/L=Mexico/O=Fortinet/OU=TAC/CN=CA_XCA-root/emailAddress=oxxx@fortinet.com
   i:/C=MX/ST=CDMX/L=Mexico/O=Fortinet/OU=TAC/CN=CA_XCA-root/emailAddress=oxxx@fortinet.com


Note:

  1. Public key of the Root and Intermediate CA needs to be uploaded to FortiGate, as Remote CA certs.

  2. The following two CLI commands are in place.
     

kb_11509_12.png

       

  1. Instead of IP, FQDN should be used, and the FQDN should exist on CN or SAN.

  2. Sometimes, the WIFI client may fail to obtain the complete chain of this certificate signed by the public CA and still got the certificate warning at the Authentication Portal. That could be because the client's browser failed download the CA cert from the Internet as the Internet access was still not available. The solution for this situation can be found in following article:

Troubleshooting Tip: Prevent certificate warning when using public CA signed certificate for captive portal

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024