Skip to content

Commit a6a41f4

Browse files
jasnellcodebytere
authored andcommitted
src: add node_crypto_common and refactor
Two things in one on this commit: (a) For the QUIC implementation, we need to separate out various bits from node_crypto.cc to allow them to be reused. That's where this commit starts. (b) Quite a bit of the node_crypto.cc code was just messy in terms of it's organization and lack of error handling and use of Local vs. MaybeLocal. This cleans that up a bit and hopefully makes certain parts a bit more manageable also. Signed-off-by: James M Snell <[email protected]> PR-URL: #32016 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
1 parent 96c7226 commit a6a41f4

File tree

8 files changed

+1313
-611
lines changed

8 files changed

+1313
-611
lines changed

node.gyp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,9 +816,11 @@
816816
[ 'node_use_openssl=="true"', {
817817
'sources': [
818818
'src/node_crypto.cc',
819+
'src/node_crypto_common.cc',
819820
'src/node_crypto_bio.cc',
820821
'src/node_crypto_clienthello.cc',
821822
'src/node_crypto.h',
823+
'src/node_crypto_common.h',
822824
'src/node_crypto_bio.h',
823825
'src/node_crypto_clienthello.h',
824826
'src/node_crypto_clienthello-inl.h',

src/env.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ constexpr size_t kFsStatsBufferLength =
206206
V(dest_string, "dest") \
207207
V(destroyed_string, "destroyed") \
208208
V(detached_string, "detached") \
209+
V(dh_string, "DH") \
209210
V(dns_a_string, "A") \
210211
V(dns_aaaa_string, "AAAA") \
211212
V(dns_cname_string, "CNAME") \
@@ -219,6 +220,7 @@ constexpr size_t kFsStatsBufferLength =
219220
V(done_string, "done") \
220221
V(dot_string, ".") \
221222
V(duration_string, "duration") \
223+
V(ecdh_string, "ECDH") \
222224
V(emit_warning_string, "emitWarning") \
223225
V(empty_object_string, "{}") \
224226
V(encoding_string, "encoding") \

0 commit comments

Comments
 (0)