Skip to content

crypto/x509: accepts DN with all empty values #73021

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

Open
onepeople158 opened this issue Mar 24, 2025 · 1 comment
Open

crypto/x509: accepts DN with all empty values #73021

onepeople158 opened this issue Mar 24, 2025 · 1 comment
Labels
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 Mar 24, 2025

Go version

go version go1.24.1 linux/amd64

Output of go env in your module/workspace:

OU=,O=,L=,ST=,C=
2025-01-01 00:00:00 +0000 UTC
2025-12-01 00:00:00 +0000 UTC
1

What did you do?

RFC 5280 specifies that the number of DN values must be greater than or equal to 1, but I successfully printed the issuer name of a CRL file with an empty DN value using Go.

What did you see happen?

Go printed the CRL issuer as: OU=, O=, L=, ST=, C=.

What did you expect to see?

For comparison, when using GnuTLS to print this CRL file, it displayed the error: (error: get_issuer_dn: ASN1 parser: Value is not valid.).

main.zip

@seankhliao seankhliao changed the title crypto/X509: Go accepts a CRL with an empty DN value. crypto/x509: accepts DN with all empty values Mar 24, 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 Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants