crypto: always return certificate serial numbers as uppercase#61752
crypto: always return certificate serial numbers as uppercase#61752addaleax wants to merge 1 commit intonodejs:mainfrom
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 |
tniessen
left a comment
There was a problem hiding this comment.
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 😅 ) |
This hides a discrepancy between OpenSSL and BoringSSL, as the latter returns lowercase hex values. Refs: #61459 (comment) PR-URL: #61752 Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
Landed in 4a13a62 |
This hides a discrepancy between OpenSSL and BoringSSL, as the latter returns lowercase hex values.
Refs: #61459 (comment)