Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
expertinet
New Contributor II

How to choose a VPN SSL certificate in API

Hello,

 

I would like to do the equivalent of

# config vpn ssl settings
(settings) # set servercert MyCert
(settings) # end

In REST API

In other terms, change the certificate via API

 

I would like to know which API call to use.

 

Right now I'm able to push MyCert on the Fortigate via API.

 

Thank you

 

1 Solution
expertinet
New Contributor II

Hello,

I tried to reply yesterday but the message disapeared.

Yes, I'm was trying to update the certificate name that is used by the SSL VPN portal sent to the browser or to the Forticlient.

I'm coding a PHP script that relies on curl and REST.

 

In the mean time I was able to reach my goal by using this call /api/v2/cmdb/vpn.ssl/settings along with a PUT request that update the servercert field.

 

Prior to that the API call is /api/v2/monitor/vpn-certificate/local/import in order to upload the certificate.

 

Regards

View solution in original post

3 REPLIES 3
mpeddalla
Staff
Staff

Hello @expertinet 

 

Thank you for contacting the Fortinet forum community.

 

Can you please provide more information on the issue:

-Are you trying to update the SSL VPN ca signed certificate under the SSL VPN settings?

-Which API are you referring to?

-Do you want to use some tool to automatically update the SSL VPN certificate? if yes which tool are you using ?

 

Best Regards,

Manasa.

expertinet

Hello,

I found my answer today.

Updating the VPN SSL certificate is done by using /api/v2/cmdb/vpn.ssl/settings and PUT the name of the certificate.

I did my code in PHP, my goal was to renew my certificate, a let's encrypt one. I don't use FortiOS 7x

Thank you

expertinet
New Contributor II

Hello,

I tried to reply yesterday but the message disapeared.

Yes, I'm was trying to update the certificate name that is used by the SSL VPN portal sent to the browser or to the Forticlient.

I'm coding a PHP script that relies on curl and REST.

 

In the mean time I was able to reach my goal by using this call /api/v2/cmdb/vpn.ssl/settings along with a PUT request that update the servercert field.

 

Prior to that the API call is /api/v2/monitor/vpn-certificate/local/import in order to upload the certificate.

 

Regards

Labels
Top Kudoed Authors