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: ParseCertificate duplicate extensions errors should include OID of the affected extension #66880

Open
Techassi opened this issue Apr 18, 2024 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@Techassi
Copy link

Techassi commented Apr 18, 2024

I recently ran into the issue that generated X.509 certificates very rejected by Go due to containing duplicate extensions. The exact extension was not reported in the error message, which made the debugging process rather complicated - it required manual changes in the standard library. The current error message reads: x509: certificate contains duplicate extensions.

Therefore, I would like to propose to change the error message to include the detected duplicate OID. The error message could then look like: x509: certificate contains duplicate extension {oid}. Feel free to suggest a different error message format.

I'm also happy to contribute the required changes in a separate PR if it is decided to move forward.


References

@Techassi Techassi changed the title crypto/x509: ParseCertificate and ParseCertificateRequest duplicate extensions errors should include OID of the affected extension crypto/x509: ParseCertificate duplicate extensions errors should include OID of the affected extension Apr 18, 2024
@cherrymui
Copy link
Member

cc @FiloSottile @rolandshoemaker @golang/security

@cherrymui cherrymui added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 18, 2024
@cherrymui cherrymui added this to the Backlog milestone Apr 18, 2024
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