SSLense: a new open-source ACME client for IIS, looking for feedback

Hi all,

I'm the author of SSLense, an open-source (Apache-2.0) ACME client for Windows Server and IIS: a desktop app, a CLI and a Windows service, written in C# on .NET 10 with the Certes library.

I built it because of IIS renewals that "succeed" while the site keeps serving the old certificate. After an install or renewal, SSLense connects to each IIS site over HTTPS, checks that the new certificate is the one served, and puts the previous binding back if not.

How it behaves towards the CA:

- **Staging by default.** A CA that issues trusted certificates has to be confirmed when a certificate is first issued from it. Automatic renewals don't ask again.

- **Before asking for validation:** for HTTP-01, it checks that it can fetch the challenge file itself. For DNS-01, it checks CAA and waits for the zone's authoritative name servers. If it can't query them because outbound port 53 is blocked, it says so, waits 2 minutes and continues.

- **ARI:** it picks a fixed pseudo-random time in the suggested window for each certificate, honors Retry-After on renewal info (between 1 hour and 1 day), and sends `replaces` on renewal orders where the CA supports ARI. Without ARI, it renews at 30 days or a third of the lifetime before expiry, whichever is later.

- **Polling:** it waits for Retry-After while an authorization or order is pending (up to 5 minutes, then gives up until the next attempt rather than ask early), otherwise 3 seconds for authorizations and 1 second for orders. Requests carry `SSLense/` in the User-Agent.

- **Failures:** automatic retries after 1 hour, 2 hours, then every 6 hours, or hourly in the last 2 days. After a rateLimited error it waits 24 hours, even close to expiry. A renewal started by hand runs at once.

- **Validation:** HTTP-01 through the site, or answered through HTTP.sys when the site has no port 80 binding. DNS-01 through Cloudflare, Route 53, Azure DNS, Google Cloud DNS, DigitalOcean, Hetzner, acme-dns, a script, or by hand.

- **Other CAs** by directory URL, with External Account Binding.

It's young: first public in October, and I'm the only maintainer. Releases aren't code-signed yet; each has a SHA-256 and an SBOM.

- Docs: https://docs.sslense.com

- Source: GitHub - panchalvimaldev/sslense: Free, open-source Let's Encrypt SSL for IIS: issue, install, auto-renew, and expiry reminders for certificates from any provider. GUI, CLI and Windows service · GitHub

I'd value feedback on any of this, especially anything it does that you'd rather a client didn't.

Hello, heck that the new cert is actually served is the part I like most, that silent IIS thing has bitten me too. One case to watch is a site behind Cloudflare or a load balancer, connecting to the public name will see the proxy's cert. Maybe hit the binding's local IP with SNI instead.

Thanks! That's how it does it: it connects to the binding's own IP address (127.0.0.1 if the binding is on all addresses) with the host name as SNI, so public DNS isn't involved and a proxy's certificate isn't what it sees. A binding without a host name is checked without SNI.

The other side of that is that it only proves what IIS serves, not what visitors get through the proxy. For a load balancer or appliance with its own certificate, there's a separate watch command that reads it over TLS every day and reminds you before it expires.

Your reply did make me look at my error text, though. It suggests checking for a proxy or CDN in front of the server, which makes little sense for a local check. I'll fix that.

Might be better to look at the Retry-After header to figure out when to retry, which the spec says servers "SHOULD" be sending for rate limit errors.

Good point, thanks. It only honors Retry-After while polling and on renewal info, so this is a gap. A fixed 24 hours is wrong in both directions: far too long when the CA says 20 minutes, and too early when it says more than a day.

I'll change it to use Retry-After on rateLimited errors, and keep 24 hours only for when the header is missing.

Both suggestions are in 0.24.3, released today:

  • After a rateLimited error it waits for Retry-After (up to 7 days), even close to expiry, and 24 hours only if the header is missing or unusable. A 503 with Retry-After isn't retried sooner either.
  • The error hints for the served-certificate check no longer mention a proxy or CDN.

While changing this I found that a rate-limited renewal was ordered again at once without replaces. That's fixed too.

Release: Release SSLense 0.24.3 · panchalvimaldev/sslense · GitHub

Thanks, both. This was useful.

Hey folks, just so everyone is aware- if IIS is serving the wrong certificate after you have updated the binding thumbprint it's because your server has a conflicting certificate binding on the same IP or without a hostname (non-SNI). Bindings for specific IPs or those that are non-deterministic will cause the wrong cert to be served.

If you have any questions about a particularly scenario I can probably help, but IIS does not have a bug related to certificate selection.

@panchalvimaldev could I request you try to make your managed certificate list look a little less like Certify Certificate Manager, that would be much appreciated as we don't really want users getting the two confused.