-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
crypto/x509: check the Key Usage extension #40100
Comments
Change https://golang.org/cl/246877 mentions this issue: |
I searched the crypto pkg and found there are two functions in crypto which relate to KU extension checking: |
KU extensions can also be checked with the Verify method available for certificates. If you are considering rewriting KU extension checking I suggest you also take a look at this: I think the method makes a bit too straightforward assumption about KUs if the opts.KeyUsages is left empty. I'm not sure if it would be better to then assume that no usage is ok or to get the acceptable KUs from the cert chain. |
Thanks everyone for the interaction. Not much action during Go1.16, thus I'll punt to Go1.17, and I'll kindly tag you @FiloSottile @katiehockman @rolandshoemaker to help review @SparrowLii's CL from #40100 (comment) |
Is anything going to happen here for 1.17? Thanks. |
Moving to Backlog since it doesn't appear someone is actively working on getting this into 1.17, and it can wait. Please update this issue if needed. |
We currently ignore the Key Usage extension because some old roots had gotten it wrong. Things probably improved by now and we can take a stab at following the spec again. AFAIK other verifiers do check them.
The text was updated successfully, but these errors were encountered: