Skip to content
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: Go accepts the IDP extension with DER encoding as an empty sequence #73284

Open
onepeople158 opened this issue Apr 9, 2025 · 2 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@onepeople158
Copy link

onepeople158 commented Apr 9, 2025

Go version

go version go1.24.2 linux/amd64

Output of go env in your module/workspace:

IDP Extension Flags:
 Only Contains User Certificates: false
 Only Contains CA Certificates: false
 Indirect CRL: false

What did you do?

Hello Developer,

RFC5280 specifies that if onlyContainsUserCerts, onlyContainsCACerts, indirectCRL, and OnlyContainsAttributeCerts are all FALSE, there must be either a distributionPoint field or an onlySomeReasons field present.

However, when I am using Go to parse a CRL file, this CRL file has onlyContainsUserCerts, onlyContainsCACerts, indirectCRL, and OnlyContainsAttributeCerts all set to FALSE, and it does not have a distributionPoint field or an onlySomeReasons field. Go does not throw an error. Is this a bug, or is it a feature of Go?

What did you see happen?

Go parses the IDP extension information with a DER encoding of an empty sequence.

What did you expect to see?

crl_IDP_None.zip

@gabyhelp
Copy link

gabyhelp commented Apr 9, 2025

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Apr 9, 2025
@dmitshur dmitshur changed the title crypto/x509:Go accepts the IDP extension with DER encoding as an empty sequence. crypto/x509: Go accepts the IDP extension with DER encoding as an empty sequence Apr 9, 2025
@dmitshur
Copy link
Contributor

CC @golang/security.

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants