1
Development and Code Review / [Solved] Re: Unable to update certificate with ACME Client API
« on: May 04, 2023, 11:47:02 pm »
OK, I figured it out!
I looked at the source code [1] for the ACME Client plugin and noticed the set method is called 'updateAction'. So I changed my POST to use /api/acmeclient/certificates/update/<uuid>, and removed the spaces from the CSV value for altNames, and it works now!
I've attached the working version of my script in case it helps anyone.
1. https://github.com/opnsense/plugins/blob/master/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/CertificatesController.php
I looked at the source code [1] for the ACME Client plugin and noticed the set method is called 'updateAction'. So I changed my POST to use /api/acmeclient/certificates/update/<uuid>, and removed the spaces from the CSV value for altNames, and it works now!
I've attached the working version of my script in case it helps anyone.
1. https://github.com/opnsense/plugins/blob/master/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/CertificatesController.php