r/ssl • • Oct 21 '26

SSL Certificate Server for centralized certificate distribution

Hope it's OK to post this ...

I've been working on a tool for ourselves for a while now to make distribution of both commercial and LE/ACME certificates for all our servers - as well as customer machines - easier, considering the upcoming further reduction of validity next February.

The package consist of a central server process with custom client for retrieval, plus an ACME server to also allow embedded / custom OS systems to retrieve certificates. Upstream requests are handled with acme.sh, with integration of (currently) PowerDNS to allow for authentication via DNS.

The admin end is CLI based, with an admin tool with TUI to make most of the admin processes easier. HTTP GUI is still in the works.

After working on the project for almost a year in total, I just released the code to github last weekend. Comments and suggestions welcome ...

https://github.com/GarryG/sslcrtsrv

0 Upvotes

13 comments sorted by

2

u/sslbrain Oct 21 '26

Hi Garry_G, I’m the main developer of a similar commercial product, sslbrain.com. We built our own ACME server a few years ago, so I’m curious what made you decide to build yours.

Have you run into any client compatibility quirks yet? We’ve found that some appliance clients don’t always accept the expected HTTP status code when requesting a nonce, 204 for GET and 200 for HEAD. Which clients have you tried yours with?

One suggestion for your custom agent: download into a working directory and check the files, including that the key and certificate match, before replacing anything the service uses. Keep “downloaded” separate from “installed”, and only mark installation as successful once the service reload or start has succeeded. That makes it easier to retry if something goes wrong.

1

u/Garry_G Oct 22 '26

Looks like you have a bit of a longer history (or quicker implementation - I originally started 13 months ago), looking at the quite larger base of supported commercial CAs and other features.

I added the ACME-server feature as we (and many of our customers) are using Fortigate firewalls, for which implementing manual certificate swap isn't exactly a simple (albeit manageable) feat. I imagine there are other embedded devices or appliances which might support ACME, but not support externally initiated certificate replacement. At the moment, the only system I actually tested it against is Fortigate, will look into other devices as I can get my hands on them (or e.g. if there are VM versions of their OS are available). So at the moment, I can't really tell if the ACME implementation I run would play nice with non-standard-compliant clients ...

Good suggestion for the client, the protocol does try to keep everything secured with encryption and signature, so corruption on the transport should be unlikely. But that of course doesn't prevent problems if any of the files are corrupted on the server side ... should be easy to implement, too ... will add a FR to the project ...

1

u/sslbrain 8d ago

Sorry for the late reply, I missed the notifications. We have been thinking about this kind of software for 10+ years, and our own commercial ACME server, which does the domain validation outside the client, has been running for 3 years. We dedicated our team to sslbrain in December 2025, so we are not that far apart.

Fortigate's built-in ACME is still limited: one name, no wildcards, no DNS validation or pre-validation like dns-persist-01, and EAB for commercial CAs only came in 7.6.3. Almost no appliance has full ACME support, i.e. Kemp only does DNS validation through eight built-in DNS providers. So until they implement ACME better, connecting to the Fortigate and installing the certificate ourselves works best.

It is hard and takes huge amounts of time to test and build each integration. We would love help in testing.

How do you get the commercial certificates today into your appliance? If you upload them by hand because they are OV or EV, we can help: FairSSL ACME issues OV and EV from DigiCert, Thawte and GeoTrust over ACME, with the organisation validated once. There are also more options.

1

u/Garry_G 8d ago

Commercial certs at the moment (with 200 days validity) are uploaded, though I did implement the german SSL CA / reseller InternetX' renewal/retrieval interface based on their technical documentation. Haven't had the time to do any testing yet, but it should be able to retrieve new certificates automatically. As their interface is proprietary (from what I can tell), I'm hoping for somewhat of a standardized way of API access, like ACME, that CAs would implement ...

1

u/Garry_G Oct 25 '26

not sure how to reliably implement the service check (guess I could hand the client an IP and port, let it connect via SSL and see if it's using the new certificate? Would only work if using the client's exec command option, though)
For now, 0.9.9 will get the file-level checks

1

u/Garry_G Oct 25 '26

Made a separate issue for this enhancement ... got an idea WHAT I can do to check to a certain degree, not sure what it takes to implement the changes yet ...

1

u/redirhub 11d ago

We ran into the same question with our own central issuance (we're RedirHub, 1M+ domains on it), though we had it a bit easier because we control the web server on every node. Certs go out as a signed, append-only log that each node applies to a local store, and the server looks the cert up by SNI at handshake time, so there's no reload step that can quietly fail. Each node then reports which log position it has applied, and that's what we count as "installed".

For services you don't own, your IP + port idea is the closest thing to that.

Curious what you see on the Fortigate side, does it pick up the new cert on its own after the ACME renewal, or does something still need a nudge?

1

u/Garry_G 8d ago

AFAIK, ACME renewals are fully automatic, with no further manual step to activate ... at least using ACME for admin interface with direct access to LE has always worked that way ... currently, I only have one test cert running through the custom ACME server, and with the validity range, testing is somewhat limited ;) But it seems to do the job correctly ...

→ More replies (1)

2

u/sslbrain 5d ago

Your IP and port idea works if you also check before the change. Then you know a missing handshake afterwards is caused by the change, and you can put the old certificate back. If the deploy host can't reach the listener at all, which is common inside networks, we read the configuration back from the device instead.

Our lego deploy hook for FortiGate works this way, you can steal from it free under Apache-2.0: https://sslbrain.com/free-acme-scripts/fortigate-linux/

1

u/ksteink Oct 21 '26

Cam generate self signed certs for private networks?

1

u/Garry_G Oct 22 '26

No, not yet - I mainly built it to cover our use case first, which is providing both a way to distribute commercially bought certs (with manual upload, then distributed to one or multiple servers), as well as enabling servers or devices without external reachability and dynamic DNS access to ACME certs. In either case, publicly trusted certs. Implementing your own CA is a bit outside the scope, and probably better handled with tools like xca or similar ...

1

u/kevdogger Oct 21 '26

Nice. Will look into this to see specifics.