-
Notifications
You must be signed in to change notification settings - Fork 72
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
Certificate bundle does not contain exactly 2 certificates #154
Comments
Experiencing the same issue since this morning Not sure if relevant but after trying to run apply several times I'm either getting "Certificate bundle does not contain exactly 2 certificates" or "failed to initiate challenge: net/http: timeout awaiting response headers" |
As @lonegunmanb suggested, commenting the two checks raising |
Any updates on this? @vancluever |
Hey all, I'm reviewing the recent updates to the certificate chain on Let's Encrypt, which I'm imagining is the source of this issue. I'm able to reproduce this on staging. I'll update soon. Thanks for bringing this to my attention! |
Deleted my last comment regarding chain introspection, don't worry about it. I've been able to find plenty of background regarding this and also a possible path to getting some better assertions regarding the certificate chain as per the PreferredChain option (which I'd imagine will be more important here now with the varying options in light of the update). Just going to finish reading up on things before putting in a fix as a stop-gap, then we can add the option after if need be. References: |
Let's Encrypt, in part of the work in migrating to their own independent root CA certificate, has introduced an additional intermediate in the default chain to help compatibility with older systems, namely Android devices. The new chain is now being issued with new requests, which has caused issues with our current assertions where we look for two certificates. This assertion possibly could fail with other ACME CAs that are not Let's Encrypt that may eventually need to do something similar. For now, we are just removing the assertion that expects this. For PEM encoding we are just concatenating the entire collection of issuer certificates in issuer_pem. This will be migrated to a list at a later time. Since PFX encoding takes certificates un-encoded, this is a more natural, graceful change. Additionally, we should look to add a certificate chain preference at a later time, as Let's Encrypt will be eventually transitioning their default chain to one that does not include the cross-signed intermediate. Related to #154.
Hey all, 2.1.2 is out now which should fix this - can everyone test and let me know? |
@vancluever, works for me on LE staging. Thanks a lot! |
Thanks a lot @vancluever ,2.1.2 works perfect! |
Thanks for the update @lonegunmanb and thanks for reporting! |
Let's Encrypt, in part of the work in migrating to their own independent root CA certificate, has introduced an additional intermediate in the default chain to help compatibility with older systems, namely Android devices. The new chain is now being issued with new requests, which has caused issues with our current assertions where we look for two certificates. This assertion possibly could fail with other ACME CAs that are not Let's Encrypt that may eventually need to do something similar. For now, we are just removing the assertion that expects this. For PEM encoding we are just concatenating the entire collection of issuer certificates in issuer_pem. This will be migrated to a list at a later time. Since PFX encoding takes certificates un-encoded, this is a more natural, graceful change. Additionally, we should look to add a certificate chain preference at a later time, as Let's Encrypt will be eventually transitioning their default chain to one that does not include the cross-signed intermediate. Related to vancluever#154. (cherry picked from commit a8f59aa)
Dear Provider's Developer,
I like this provider very much, makes day easier in a cloud-native environment. But when I apply tf code as below, I encountered "Certificate bundle does not contain exactly 2 certificates" error:
I traced this error message to
acme_structure.go
, there're two functions throw this error message:splitPEMBundle
andbundleToPKCS12
. I modified code and compiled my own plugin then replaced plugin downloaded from registry, I foundparsePEMBundle
function returned 3 certs instead of 2, so the guard code throws error. After bypassed the guard, everything was fine, the cert this provider returned worked just perfect.Was there something wrong in my Terraform code? Many Thanks!
The text was updated successfully, but these errors were encountered: