-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does caddy support ECDSA+RSA certificates without a manager? #5450
Comments
Digging into the golang source, I am checking whether this is because my test certs lack a subject_alternative_name. |
Yeah, this is a golang... I'm not even sure if it's fair to call it a bug. Not Caddy's fault. If I generate certificates like so:
It works fine. |
Yep - you must use a SAN for Caddy to pick up the cert, because that's what it uses to know what hostnames the certificate supports. The subject field is deprecated in clients, and not used at all in Caddy. |
The sad thing is I already knew the subject field is deprecated, and even wrote a tool in python for generating certificates acceptable for modern software, but then was lazy and used openssl. 🤦 |
This seems to have been brought up in #1575, which was closed, however I don't see any way to actually configure this.
If I specify
tls
twice, then start caddy 2.6.4 with debug enabled, I can see that it's loading both certificates, but then the first certificate seems to always be chosen, withno cipher suite supported by both client and server
being logged if I try to connect with a cipher suite not supporting it.I have enabled both RSA and ECDSA cipher suites explicitly.
commands to create keys and self-signed certificates
Caddyfile
openssl s_client commands to test connection
I see from the code it's using certmagic.DefaultCertificateSelector, which in turn calls ClientHelloInfo.SupportsCertificate, which appears to do the right thing.
Here's the log output from starting caddy, then trying ECDSA (which fails) and RSA (which works) in turn:
Am I missing something?
I tried curl as well, but switched to
s_client
to make sure signature schemes was being set appropriately.The text was updated successfully, but these errors were encountered: