-
Notifications
You must be signed in to change notification settings - Fork 18k
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
x/crypto/acme/autocert: allow easy use of certificate alternate chains #48747
Comments
Hello, are there any updates? |
@andreasschulze If you are looking for a shot term work around you can use https://github.com/hochhaus/crypto/commit/ba7d272dee0b9dccf253ddc91a14797a6af88f47. If this change is directionally acceptable to an OWNER I could clean it up and submit upstream. |
@hochhaus: my go skills are limited. Could you show me how to use your version https://github.com/hochhaus/crypto/commit/ba7d272dee0b9dccf253ddc91a14797a6af88f47? I would try it here: https://github.com/andreasschulze/scmdhttpd/blob/main/scmdhttpd.go |
@andreasschulze Absolutely. The API change is very minimal. Basically just add the PreferredChain to your
Depending on your needs you will need to modify the value of the PreferredChain. |
yes, how do I decleare "please use https://github.com/hochhaus/crypto/commit/ba7d272dee0b9dccf253ddc91a14797a6af88f47"? |
@andreasschulze I use bazel / rules_go (instead of the normal go build tools) so unfortunately I'm not sure the correct method to plug this into |
ok, this is my change I've removed all certs from cache and let autocert fetch a new one. But the server still deliver The file in the cache contain 3 PEM blocks.
|
Hi @andreasschulze. Thanks. You are correct -- my change is buggy. Can you try https://github.com/hochhaus/crypto/commit/cceb102a4601f585dbc03ecdff0ae8483cd1f310 instead? I reimplemented this feature from memory without testing as it originally was written in a closed source repo. During the rewrite I incorrectly checked |
Yea! with this commit, go1.18beta2 and a forced cert renew the server now no longer present |
Glad it worked! Thanks for debugging. |
now we've to wait your change get merged upstream ... |
If an OWNER is willing to review I will clean it up, add tests and send it out. |
@hochhaus Could you please make a pull request with your change? |
Webserver using acme/autocert/autocert.go still deliver the old "DST Root CA X3". Users like to disable this. is there a chance, to get this fixed (at least let the user have a choice) in go-1.20? What would be needed? I'like to see some progress. |
are there any news / progress? |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (using golang.org/x/crypto v0.0.0-20210921155107-089bfa567519)
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The new acme
Client.ListCertAlternates
API from @jameshartig and @FiloSottile is great when directly using an acme client. However, most users likely use autocert instead and no easy method to select an alternative / preferred chain is provided.What did you expect to see?
An easy way to select the preferred certificate chain in autocert.
What did you see instead?
The need to use the acme library directly to select an alternate cert chain.
The text was updated successfully, but these errors were encountered: