| Description |
This article explains the conditions under which FortiWeb displays the error message 'The imported local certificate is invalid' or 'The certificate does not match any private key generated on FortiWeb. Please verify that you have the correct certificate file' when importing certificates and clarifies the correct certificate import workflows.
|
| Scope |
FortiWeb. |
| Solution |
FortiWeb validates certificates differently depending on how the certificate signing request was generated and which certificate import type is selected. The error 'The imported local certificate is invalid' is expected behavior in the scenarios described below.
Scenario 1: Externally generated certificate imported as Local Certificate.
The Local Certificate import type is only supported when the certificate signing request was generated directly on FortiWeb. In this workflow, FortiWeb already stores the private key internally and expects only the signed certificate to be uploaded.
The Local Certificate import type rejects externally generated certificates because no matching private key exists on FortiWeb. The correct procedure if the certificate signing request was generated externally is to select Certificate and upload both Certificate file and Key file. Go to Server Objects -> Certificates -> Certificate and import both the certificate file and the private key file. Alternatively, if the certificate and private key are packaged as a PKCS#12 bundle, import the file using the PKCS12 Certificate type.
Scenario 2: Certificate name mismatch for FortiWeb-generated certificate signing requests.
When a certificate signing request is generated on FortiWeb, the private key is stored internally and associated with the certificate object name. During certificate import, FortiWeb attempts to associate the uploaded certificate with the stored private key using the certificate file name. If the returned certificate file name does not match the original certificate signing request object name, FortiWeb cannot associate the certificate with the stored private key and displays the error. Examples:
The certificate file name must match the original certificate signing request name, excluding the file extension. The Common Name or Subject Alternative Name values do not affect this validation process.
Related document: |
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.