-
Notifications
You must be signed in to change notification settings - Fork 121
[BED-6605] Allow negative serials for x509 certificate verification #155
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
Conversation
WalkthroughA Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
main.go (1)
21-22: Thex509negativeserialdirective is valid and correctly implemented.This directive enables Go 1.23's pre-1.23 behavior for parsing certificates with negative serial numbers, addressing the breaking change in crypto/x509.ParseCertificate. The
//go:debugpragma syntax shown is correct and documented.Adding an inline comment explaining the directive's purpose would improve maintainability:
//go:build !windows // +build !windows +// Allow negative serial numbers in x509 certificates for proxy compatibility. //go:debug x509negativeserial=1
Prior to Go 1.23, negative serial numbers were allowed in certificates. Some clients are reporting errors using Azurehound in their proxy environments under their current configurations. We can relax our need for perfectly compliant certificates here to accommodate.
Summary by CodeRabbit