fortigate-api icon indicating copy to clipboard operation
fortigate-api copied to clipboard

cannot update local certificate

Open niklsj opened this issue 2 months ago • 3 comments

I'm unable to update a local certificate using the API, I can do it manually in the console by entering the same new private-key and certificate values that the API is rejecting.

When running the following snippet the API returns 500:

api = FortiGateAPI(host=HOST, username=USERNAME, password=PASSWORD) data = { "name" : "acme-test", "private-key": privkey.read(), "certificate": certificate.read() } response = api.cmdb.certificate.local.update(data)

In command debugging on the FortiGate I can see a different private-key and the old certificate is reentered.

niklsj avatar Sep 18 '25 14:09 niklsj