Created on
08-28-2024
11:21 PM
Edited on
06-28-2025
07:45 AM
By
Jean-Philippe_P
Description |
This article describes how to resolve invalid certificate errors seen on FortiClient when attempting to authenticate to an SSL VPN or IPsec VPN on a FortiGate with SAML authentication. |
Scope |
FortiOS. |
Solution |
When attempting to complete SAML authentication to a VPN on a FortiGate, an error may be displayed indicating the certificate in use is not trusted. Example error from FortiClient connecting to an SSL VPN with SAML authentication:
The steps to check/select which certificate is in use for the SAML authentication vary depending on whether an SSL VPN or an IPsec VPN is in use.
SSL VPN. The certificate used by FortiGate for the SSL VPN will be the same certificate selected as the ‘Server Certificate’ for the SSL VPN. This can be checked on the GUI by going to ‘VPN’ -> ‘SSL-VPN Settings’ and checking the ‘Server Certificate’ field:
This can be checked on the CLI using the command ‘show vpn ssl settings | grep servercert’.
SSL VPN Resolution. The server certificate can be set on the GUI under ‘VPN’ -> ‘SSL-VPN Settings’ as seen here:
These CLI commands can also be used:
set servercert <trusted-certificate> end
Ensure that it is also updated in the SAML SSO configuration, replacing the default 'Fortinet_Factory' with the newly uploaded certificate:
To update certificates from the CLI, use the following commands:
config user saml edit ' name of SSO '
IPsec VPN. As an IPSec VPN, there is no option to set a server cert. The certificate in use by FortiGate for SAML authentication on an IPsec VPN can be viewed by checking the ‘User & Authentication’ -> ‘Authentication Settings’ on the FortiGate GUI. FortiGate user certificate visible on the GUI:
Note: The ‘Authentication Settings’ page under ‘User & Authentication’ may not be visible by default, it can be enabled on the GUI under ‘System’ -> ‘Feature Visibility’. Refer to this document for more information: Feature visibility.
This can also be checked on the FortiGate CLI by using the CLI command ‘show full user setting | grep auth-cert’. FortiGate authentication certificate visible on the CLI:
IPsec VPN Resolution. This can be set on the GUI on the previously shown ‘User & Authentication’ -> ‘Authentication Settings’ page. Setting the correct certificate on the GUI:
Or with these CLI commands:
set auth-cert <trusted-certificate> end
Additional Notes:
|
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.