First of all need to create self-signed certificate with the help of open source tool (OpenSSL).
You may read our post for create certificate.
Now to move for import certificate into the Fortigate Device.
Login into the FortiGate device via Web Gui console.
Go to System > Certificates > Local Certificates
Browse the certificate file from OpenSSL folder where certificate and privet key stored and add password which was used at CSR generation time.
Click ‘OK” to save the configuration and check the certificate is successfully imported.
This process shrinks the vulnerability (CVE-2004-2761).