fortigate-api
fortigate-api copied to clipboard
cannot update local certificate
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.