FortiWeb
A FortiWeb can be configured to join a Security Fabric through the root or downstream FortiGate.
mtse
Staff
Staff
Article Id 200935
Description In FortiWeb, when a local certificate is imported, the error “invalid length of value” may appear even when the certificate itself is valid. This is because only the certificate file is imported but the private key has not been provided. Both the certificate file (.cer) and the private key file (.key) must be imported.
Scope

 FortiWeb

Solution

For FortiWeb to perform SSL “Offloading” or “Inspection”, it must have the private key for the server certificate it presents to the client so that it can decrypt the HTTPS traffic.  When importing the local certificate (System -> Certificate -> Local), the three options below are available. If Local Certificate is selected (which only prompts for the certificate file), it will be denied with the error “Invalid length of value”.

  • Local Certificate
  • PKCS12 Certificate
  • Certificate

mtse_0-1639362060676.png

 

 

mtse_1-1639362060679.png

mtse_2-1639362060683.png

 

The correct procedure for importing certificates in PEM format is to select “Certificate” and import both the certificate file (.cer) and private key file (.key). Then the certificate will be imported successfully as shown below.

mtse_3-1639362089013.png

 

 

mtse_4-1639362089014.png

 

mtse_5-1639362089015.png

 

mtse_6-1639362089018.png

 

 

In the PEM format certificate, the certificate and private key files can be identified by the text like below.

Certificate file:

-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----

 

Private key file:

-----BEGIN PRIVATE KEY-----

-----END PRIVATE KEY-----

 

Warning:

Disclosure of private keys compromises the security of your network. So the private key must be kept secret.

 

https://help.fortinet.com/fweb/587/index.htm#FortiWeb/fortiweb-admin/offload_https.htm#ssl_414712646...

https://help.fortinet.com/fweb/587/index.htm#FortiWeb/fortiweb-admin/offloading_vs.htm%3FTocPath%3DS...

Contributors