mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-11 22:30:44 +01:00
Cannot use --signcsr : "Invalid character in DNS name" #381
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bortzmeyer on GitHub (Sep 25, 2018).
I can use
dehydrated --cron --domain www.bortzmeyer.orgfor my domain and it works. Now, I want to use my own CSR and I try--signcsr:The domain name seems perfectly OK (and it works with
--cron). In the CSR:It seems the same subject as in the CSR generated by
dehydrated --cron.I tried with a ECDSA CSR and a RSA one, same result.
I'm not sure it is a dehydrated bug, of course, it can be a Let's Encrypt one, or a fault on my side but I cannot find it.
@cpu commented on GitHub (Sep 25, 2018):
👋 @bortzmeyer
Can you share the full CSR? Are the Subject Alternate Names well formed?
I can at least rule out that its a bug with Let's Encrypt :-)
In the server side logs I can see that Dehydrated POSTed new-authz with an invalid domain identifier in the authenticated JWS body:
I can't tell where the
"Subject:"value came from: a bug with Dehydrated, a problem with the CSR, or both. It should be a domain name instead.@bortzmeyer commented on GitHub (Sep 25, 2018):
Oh, yes, I should have send the full CSR. Here it is:
This is the ECDSA one, but the RSA one triggers the same error.
@bllfr0g commented on GitHub (Sep 25, 2018):
This CSR has no SAN(s) defined. At the very least, have one SAN equal to the CN and I bet you’ll be good.
@cpu commented on GitHub (Sep 25, 2018):
@bllfr0g That part of the CSR @bortzmeyer shared stands out to me as well, but it does appear based on a quick skim of the Dehydrated source that this case should be handled:
fba49ba28e/dehydrated (L644-L648)I'm afraid we're outside of my depth now. It seems to me to be a Dehydrated bug so I'm going to drop off this thread with the hope a maintainer can take over from here.
Good luck!
@bllfr0g commented on GitHub (Sep 25, 2018):
I don’t think dehydrated is balking on the CSR, I think LetsEncrypt is. Nothing dehydrated can do to fix that.
@cpu commented on GitHub (Sep 25, 2018):
@bllfr0g Sorry, I should have made my affiliation clearer. I work for Let's Encrypt and verified from the server-side Let's Encrypt logs that this is not the case.
Dehydrated is processing the CSR and something strange happens that results in an ACME request to the Let's Encrypt ACME server's new-authz endpoint with an invalid identifier value. The CSR isn't sent to Let's Encrypt (in the ACME v1 world) until the new-cert POST and the error is occurring before then so we can say with double confidence it isn't Let's Encrypt rejecting the CSR.
@lukas2511 commented on GitHub (Sep 26, 2018):
Mh... @bortzmeyer what OS are you running dehydrated on? Can you please post the output of
dehydrated -v?@bortzmeyer commented on GitHub (Sep 26, 2018):
@bortzmeyer commented on GitHub (Sep 26, 2018):
OK, I regenerated the CSR with:
Now, there is a SAN:
And this time, dehydrated makes a correct request and Let's Encrypt signs the certificate. Hooray.
Suggestion: dehydrated should produce a proper error message such as "Missing Subject Alternative Name in the CSR" (or generate the domain name from the CN if there is no SAN).
@txr13 commented on GitHub (Sep 26, 2018):
@bortzmeyer You’re using a really, really old version of dehydrated, if it doesn’t even support the “version” command. You really should consider using the current version instead, which has obviously fixed many bugs (and added some new features).
Edit: Yeah, Debian Stretch has dehydrated 0.3.1 packaged, while dehydrated is currently on 0.6.2.
@lukas2511 commented on GitHub (Oct 20, 2018):
Like @txr13 said this issue was already fixed quite a while ago.
Please update your version of dehydrated, it's just a shell-script so it shouldn't be much of a problem to "install" manually.