Skip to content

Commit

Permalink
src: add node_crypto_common and refactor
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jasnell committed Mar 2, 2020
1 parent a0c3c4d commit e1b0c3d
Show file tree
Hide file tree
Showing 8 changed files with 1,313 additions and 611 deletions.
2 changes: 2 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -823,9 +823,11 @@
[ 'node_use_openssl=="true"', {
'sources': [
'src/node_crypto.cc',
'src/node_crypto_common.cc',
'src/node_crypto_bio.cc',
'src/node_crypto_clienthello.cc',
'src/node_crypto.h',
'src/node_crypto_common.h',
'src/node_crypto_bio.h',
'src/node_crypto_clienthello.h',
'src/node_crypto_clienthello-inl.h',
Expand Down
2 changes: 2 additions & 0 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ constexpr size_t kFsStatsBufferLength =
V(dest_string, "dest") \
V(destroyed_string, "destroyed") \
V(detached_string, "detached") \
V(dh_string, "DH") \
V(dns_a_string, "A") \
V(dns_aaaa_string, "AAAA") \
V(dns_cname_string, "CNAME") \
Expand All @@ -219,6 +220,7 @@ constexpr size_t kFsStatsBufferLength =
V(done_string, "done") \
V(dot_string, ".") \
V(duration_string, "duration") \
V(ecdh_string, "ECDH") \
V(emit_warning_string, "emitWarning") \
V(empty_object_string, "{}") \
V(encoding_string, "encoding") \
Expand Down
Loading

0 comments on commit e1b0c3d

Please sign in to comment.