I use Let's Encrypt certificates on my MikroTik Routers, and setup a script for auto-renew certificates.
It works fine for a long time(years).
At the begin of June 2024, I found some of my MT devices didn't renew its certificates.
When I try to renew certificates manually, it shows some error message (as below).
==================================================
enable-ssl-certificate dns-name=RB4XXX.example.com
progress: [error] Invalid identifiers requested :: Cannot issue for "RB4XXX.example.com": Domain name contains an invalid character, type: urn:ietf:params:acme:error:rejectedIdentifier, code: 400
I found that Let's Encrypt don't accept UPPER case domain name since June 2024.
Is it possible for MikroTik to automatic change "enable-ssl-certificate dns-name=" to lowercase ?
I just happen to never use uppercase names, so I guess I never noticed. And LE IMO shouldn’t force this - DNS names should be case-insensitive per RFCs.
Perhaps RouterOS should do that internally… since it might not someone first thought as to the issue. I’d imagine there are at least some folks who use some /system/identity to build the dns-names= for LE, like:
Because he wants to name his routers properly … and proper personal names are with capital initial (e.g. Normis, not normis). And he now needs some kind of work around the LE requirement.
First, thanks for accept my advice.
I found this function appeared in changelog.
*) certificate - automatically parse uppercase symbols to lowercase when registering domain on Let’s Encrypt;
A late explain to “Why don’t you just write it lowercase” :
I managed more then 1500 MT routers.
each of them has own identity like “Dorm-C-801”
I would like all of them worked with correct LetsEncrypt Cert, and of course update every 3 month.
so I write a scheduled script as following:
/ip service set www disabled=no
/certificate
enable-ssl-certificate dns-name=([/system identity get name].".example.org")
remove [find name!=[/ip service get www-ssl certificate]]
/ip service set www disabled=yes
config for each router are the same. (use CAPsMAN to modify identity, and DHCP for ip addresses) so don’t want to change script for each router.
Please don’t take Normis too seriously. He is known for initially dismissing issues when he doesn’t immediately see the problem. Your use case is perfectly valid. Why shouldn’t one be allowed to use capital letters in a hostname? Sometimes, the reasoning from Mikrotik can be a bit puzzling. In the end, they did recognize the issue, realized it wasn’t due to user error, and fixed it. That’s just how things work here.