-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/x509: crlSign key missing for CreateRevocationList #49414
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
Comments
@solyard , can you give an example of a certificate that exhibits this problem? To me it sounds like CreateRevocationList works as it should when it doesn't agree to sign a CRL when the issuer certificate that doesn't have that key usage. I think the question is why the issuer certificate doesn't have that key usage bit set. An example would be great and a description of how you got the x509.Certificate struct. Did you use x509.ParseCertificate? Here is an example to show that CreateRevocationList works, if the certificate struct does have the right key usage bit set: https://play.golang.org/p/2u7bk8cB__s |
You are right I used certificate that was created without keyUsage block. Can I use certificate that I have and add keyUsage for CRL in code runtime? I cannot replace certificates that already exists with that who have keyUsage block :( Any workaround here? |
Sure you can set the correct key usage bit and get the CreateRevocationList to produce a result, like |
Thanks a lot I will try this workaround and give feedback. I want to use generated CRL in my Nginx installation so I think CRL will be work fine. You are my saviour 👍 |
@antong Thanks for helping. Everything works fine. Closing this thread |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
IDK
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I used method x509.CreateRevocationList to create CRL and gave on input my cert and private key for signing CRL. But library returns error :
x509: issuer must have the crlSign key usage bit set
In attributes of my certificate I see this:
Maybe the problem is my cert is x509.v3 and CreateRevocationList returns x509.v2? (who knows?)
After I commented this lines in
x509.go
everything started works nice:What did you expect to see?
CRL []byte
What did you see instead?
x509: issuer must have the crlSign key usage bit set
The text was updated successfully, but these errors were encountered: