-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/x509: An invalid certificate chain may be returned by "Certificate.Verify(opts VerifyOptions)" #8029
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
Labels
Milestone
Comments
To agl for review. Owner changed to @agl. |
Cert verification is much more complex than I like and I don't exclude the possibility of a bug in there, but do you have a case where this has gone wrong, or is it based on inspection? I'm trying to build a test case where an extra chain can be returned but no luck so far. In the code, if there's no valid path from an intermediate to a root, then childChains is intended to be empty. So the append should be a noop (note the "..." in the append line). My best guess for triggering a problem was this structure: leaf -> issuer2 -> issuer2Parent -> issuer1 -> root* Both issuer1 and issuer2 are possible issuers for leaf. issuer2 is listed first and the chain builds up to another parent, but no root. issuer1 is then considered and does chain to a trusted root. (Where a trusted certificate is indicated by a *.) However, this works as expected. |
Comment 4 by us@ulrich-simon.de: This is on inspection and I didn't really recognize the "...". This "noop append" will wor. The function is built so that there are no chains returned when there is err != nil. Even the cache seems to work right if I think it through. Things are very dependend on each other. Unfortunatelly there are no source comments. I guess this is the advanced stuff... Thanks for verifying :) . |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by us@ulrich-simon.de:
The text was updated successfully, but these errors were encountered: