Websocket API - certificate.delete endpoint revokes cert?

I’m working on updating my deploy-freenas script to use the newer Websockets API, and running into what sounds like (per the docs) a misfeature of the new API. My current script, using the REST API, performs the following operations:

  • Uploads the specified cert
  • Sets the UI to use the newly-uploaded cert
  • Optionally, sets other services (FTP, WebDAV, S3) to use that cert
  • Optionally, sets apps to use that cert
  • Deletes any old certs so the list doesn’t get cluttered.

Of course, the S3 and WebDAV services have gone away, so I don’t need to worry about implementing those in the new version. And I haven’t figured out how to iterate through the list of installed apps to update the certificate yet, but no doubt that will come in time.

But it’s the cert deletion I’m concerned about. In the API docs, under the certificate.delete endpoint, is this note:

If the certificate is an ACME based certificate, certificate service will try to revoke the certificate by updating it’s status with the ACME server, if it fails an exception is raised and the certificate is not deleted from the system. However, if force is set to True, certificate is deleted from the system even if some error occurred while revoking the certificate with the ACME Server

Does the middleware actually do this? If so, why? This is a completely nonsensical operation–the only real reason to revoke a cert is if you suspect compromise of the private key. And to raise a fatal error because it failed to do what it never should have tried to do in the first place?