-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
crypto: always return certificate serial numbers as uppercase #61752
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
base: main
Are you sure you want to change the base?
Conversation
This hides a discrepancy between OpenSSL and BoringSSL, as the latter returns lowercase hex values. Refs: nodejs#61459 (comment)
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61752 +/- ##
==========================================
- Coverage 89.74% 89.73% -0.02%
==========================================
Files 675 675
Lines 204601 204601
Branches 39317 39314 -3
==========================================
- Hits 183625 183601 -24
- Misses 13240 13284 +44
+ Partials 7736 7716 -20
🚀 New features to boost your workflow:
|
|
Nice |
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.
Nice
tniessen
left a 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.
I believe that the difference in behavior is due to BN_bn2hex, which ncrypto wraps in BignumPointer::toHex(). Maybe we should just wrap that call when Node.js is linked against BoringSSL?
|
@tniessen Yeah, I considered that too, but a) I didn't want to do this while the discussion in #61613 is alive and well and b) this is the only site where we expose this to users, and it's not obvious to me that we always care whether the call returns uppercase or lowercase hex? But I'm not feeling particularly strongly about this, and I'm happy to make that change there as well (if you feel confident about the repo in which that should happen 😅 ) |
tniessen
left a 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.
That works for me @addaleax :)
This hides a discrepancy between OpenSSL and BoringSSL, as the latter returns lowercase hex values.
Refs: #61459 (comment)