pfSense + CloudFlare + Let’s Encrypt with acme bug

I’ve recently try to manage Let’s Encrypt certificates for my pfSense with acme package. My DNS is managed in CloudFlare.

I was happy to see that Let’s Encrypt and CloudFlare are supported and tried it out.

Unfortunately, I was stuck with error after error:

Error
Error add txt for domain:_acme-challenge.xxx.yyy.com
_on_issue_err
Please check log file for more details: /tmp/acme/xxx.yyy.com/acme_issuecert.log

Once updated this, it’s all working fine. Apparently, the package is expecting “success”:true but the actual returned payload has “success”: true where there is a space between : and true

To resolve this:

Update /usr/local/pkg/acme/dnsapi/dns_cf.h

Original:

if ! printf “%s” “$response” | grep “success\”:true >/dev/null; then
_err “Error”
return 1
fi

Update to:

if ! printf “%s” “$response” | grep \”success\”: true >/dev/null; then
_err “Error”
return 1
fi

Please note that there is a space between : and true.

About: author