From e5bfef33446fcf0aec257bf451627cee038d5215 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 18 Sep 2020 10:14:58 -0700 Subject: [PATCH] crypto: move node_crypto files to src/crypto Signed-off-by: James M Snell --- node.gyp | 16 ++++++++-------- src/{node_crypto_bio.cc => crypto/crypto_bio.cc} | 2 +- src/{node_crypto_bio.h => crypto/crypto_bio.h} | 6 +++--- .../crypto_clienthello-inl.h} | 8 ++++---- .../crypto_clienthello.cc} | 4 ++-- .../crypto_clienthello.h} | 6 +++--- .../crypto_common.cc} | 2 +- .../crypto_common.h} | 6 +++--- .../crypto_groups.h} | 6 +++--- src/node_crypto.cc | 8 ++++---- src/node_crypto.h | 2 +- src/quic/node_quic.cc | 2 +- src/quic/node_quic_crypto.cc | 2 +- src/quic/node_quic_session-inl.h | 2 +- src/quic/node_quic_session.cc | 2 +- src/tls_wrap.cc | 4 ++-- 16 files changed, 39 insertions(+), 39 deletions(-) rename src/{node_crypto_bio.cc => crypto/crypto_bio.cc} (99%) rename src/{node_crypto_bio.h => crypto/crypto_bio.h} (98%) rename src/{node_crypto_clienthello-inl.h => crypto/crypto_clienthello-inl.h} (93%) rename src/{node_crypto_clienthello.cc => crypto/crypto_clienthello.cc} (98%) rename src/{node_crypto_clienthello.h => crypto/crypto_clienthello.h} (97%) rename src/{node_crypto_common.cc => crypto/crypto_common.cc} (99%) rename src/{node_crypto_common.h => crypto/crypto_common.h} (96%) rename src/{node_crypto_groups.h => crypto/crypto_groups.h} (99%) diff --git a/node.gyp b/node.gyp index 5a0b1ea112c2a7..59a92e02e00d05 100644 --- a/node.gyp +++ b/node.gyp @@ -902,16 +902,16 @@ } ], [ 'node_use_openssl=="true"', { 'sources': [ + 'src/crypto/crypto_common.cc', + 'src/crypto/crypto_bio.cc', + 'src/crypto/crypto_clienthello.cc', + 'src/crypto/crypto_common.h', + 'src/crypto/crypto_bio.h', + 'src/crypto/crypto_clienthello.h', + 'src/crypto/crypto_clienthello-inl.h', + 'src/crypto/crypto_groups.h', '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', - 'src/node_crypto_groups.h', 'src/tls_wrap.cc', 'src/tls_wrap.h' ], diff --git a/src/node_crypto_bio.cc b/src/crypto/crypto_bio.cc similarity index 99% rename from src/node_crypto_bio.cc rename to src/crypto/crypto_bio.cc index 8c58e31f86b3fa..a4d74e4ad78be5 100644 --- a/src/node_crypto_bio.cc +++ b/src/crypto/crypto_bio.cc @@ -22,7 +22,7 @@ #include "base_object-inl.h" #include "memory_tracker-inl.h" #include "allocated_buffer-inl.h" // Inlined functions needed by node_crypto.h. -#include "node_crypto_bio.h" +#include "crypto/crypto_bio.h" #include "openssl/bio.h" #include "util-inl.h" #include diff --git a/src/node_crypto_bio.h b/src/crypto/crypto_bio.h similarity index 98% rename from src/node_crypto_bio.h rename to src/crypto/crypto_bio.h index 333a50848c7efd..606ac1d7d43925 100644 --- a/src/node_crypto_bio.h +++ b/src/crypto/crypto_bio.h @@ -19,8 +19,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -#ifndef SRC_NODE_CRYPTO_BIO_H_ -#define SRC_NODE_CRYPTO_BIO_H_ +#ifndef SRC_CRYPTO_CRYPTO_BIO_H_ +#define SRC_CRYPTO_CRYPTO_BIO_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS @@ -192,4 +192,4 @@ class NodeBIO : public MemoryRetainer { #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#endif // SRC_NODE_CRYPTO_BIO_H_ +#endif // SRC_CRYPTO_CRYPTO_BIO_H_ diff --git a/src/node_crypto_clienthello-inl.h b/src/crypto/crypto_clienthello-inl.h similarity index 93% rename from src/node_crypto_clienthello-inl.h rename to src/crypto/crypto_clienthello-inl.h index 7d1671f72eeb3b..555920b2f0830d 100644 --- a/src/node_crypto_clienthello-inl.h +++ b/src/crypto/crypto_clienthello-inl.h @@ -19,12 +19,12 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -#ifndef SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_ -#define SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_ +#ifndef SRC_CRYPTO_CRYPTO_CLIENTHELLO_INL_H_ +#define SRC_CRYPTO_CRYPTO_CLIENTHELLO_INL_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#include "node_crypto_clienthello.h" +#include "crypto/crypto_clienthello.h" #include "util.h" namespace node { @@ -88,4 +88,4 @@ inline bool ClientHelloParser::IsPaused() const { #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#endif // SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_ +#endif // SRC_CRYPTO_CRYPTO_CLIENTHELLO_INL_H_ diff --git a/src/node_crypto_clienthello.cc b/src/crypto/crypto_clienthello.cc similarity index 98% rename from src/node_crypto_clienthello.cc rename to src/crypto/crypto_clienthello.cc index 8c1be7871acfa1..f4dc6c5c572f94 100644 --- a/src/node_crypto_clienthello.cc +++ b/src/crypto/crypto_clienthello.cc @@ -19,8 +19,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -#include "node_crypto_clienthello.h" // NOLINT(build/include_inline) -#include "node_crypto_clienthello-inl.h" +#include "crypto/crypto_clienthello.h" // NOLINT(build/include_inline) +#include "crypto/crypto_clienthello-inl.h" namespace node { namespace crypto { diff --git a/src/node_crypto_clienthello.h b/src/crypto/crypto_clienthello.h similarity index 97% rename from src/node_crypto_clienthello.h rename to src/crypto/crypto_clienthello.h index 725be889e26d64..b79210c0b47d1e 100644 --- a/src/node_crypto_clienthello.h +++ b/src/crypto/crypto_clienthello.h @@ -19,8 +19,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -#ifndef SRC_NODE_CRYPTO_CLIENTHELLO_H_ -#define SRC_NODE_CRYPTO_CLIENTHELLO_H_ +#ifndef SRC_CRYPTO_CRYPTO_CLIENTHELLO_H_ +#define SRC_CRYPTO_CRYPTO_CLIENTHELLO_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS @@ -129,4 +129,4 @@ class ClientHelloParser { #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#endif // SRC_NODE_CRYPTO_CLIENTHELLO_H_ +#endif // SRC_CRYPTO_CRYPTO_CLIENTHELLO_H_ diff --git a/src/node_crypto_common.cc b/src/crypto/crypto_common.cc similarity index 99% rename from src/node_crypto_common.cc rename to src/crypto/crypto_common.cc index 6473b652ac9560..8c54ac89c969a1 100644 --- a/src/node_crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -3,7 +3,7 @@ #include "env-inl.h" #include "node_buffer.h" #include "node_crypto.h" -#include "node_crypto_common.h" +#include "crypto/crypto_common.h" #include "node.h" #include "node_internals.h" #include "node_url.h" diff --git a/src/node_crypto_common.h b/src/crypto/crypto_common.h similarity index 96% rename from src/node_crypto_common.h rename to src/crypto/crypto_common.h index c373a97e4763a4..fdbc268e251535 100644 --- a/src/node_crypto_common.h +++ b/src/crypto/crypto_common.h @@ -1,5 +1,5 @@ -#ifndef SRC_NODE_CRYPTO_COMMON_H_ -#define SRC_NODE_CRYPTO_COMMON_H_ +#ifndef SRC_CRYPTO_CRYPTO_COMMON_H_ +#define SRC_CRYPTO_CRYPTO_COMMON_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS @@ -135,4 +135,4 @@ v8::MaybeLocal X509ToObject( #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#endif // SRC_NODE_CRYPTO_COMMON_H_ +#endif // SRC_CRYPTO_CRYPTO_COMMON_H_ diff --git a/src/node_crypto_groups.h b/src/crypto/crypto_groups.h similarity index 99% rename from src/node_crypto_groups.h rename to src/crypto/crypto_groups.h index 108edda01bb4eb..c49b4356d8a919 100644 --- a/src/node_crypto_groups.h +++ b/src/crypto/crypto_groups.h @@ -19,8 +19,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -#ifndef SRC_NODE_CRYPTO_GROUPS_H_ -#define SRC_NODE_CRYPTO_GROUPS_H_ +#ifndef SRC_CRYPTO_CRYPTO_GROUPS_H_ +#define SRC_CRYPTO_CRYPTO_GROUPS_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS @@ -412,4 +412,4 @@ static const modp_group modp_groups[] = { #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#endif // SRC_NODE_CRYPTO_GROUPS_H_ +#endif // SRC_CRYPTO_CRYPTO_GROUPS_H_ diff --git a/src/node_crypto.cc b/src/node_crypto.cc index ed886abd749661..61ad1fcc0b6eef 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -21,10 +21,10 @@ #include "node_crypto.h" #include "node_buffer.h" -#include "node_crypto_bio.h" -#include "node_crypto_common.h" -#include "node_crypto_clienthello-inl.h" -#include "node_crypto_groups.h" +#include "crypto/crypto_bio.h" +#include "crypto/crypto_common.h" +#include "crypto/crypto_clienthello-inl.h" +#include "crypto/crypto_groups.h" #include "node_errors.h" #include "node_mutex.h" #include "node_process.h" diff --git a/src/node_crypto.h b/src/node_crypto.h index bef98b3e244d9e..d818a850310386 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -25,7 +25,7 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS // ClientHelloParser -#include "node_crypto_clienthello.h" +#include "crypto/crypto_clienthello.h" #include "allocated_buffer.h" #include "env.h" diff --git a/src/quic/node_quic.cc b/src/quic/node_quic.cc index 48ab6ac2fdc56f..2228ef3f520e7b 100644 --- a/src/quic/node_quic.cc +++ b/src/quic/node_quic.cc @@ -2,7 +2,7 @@ #include "node.h" #include "env-inl.h" #include "node_crypto.h" // SecureContext -#include "node_crypto_common.h" +#include "crypto/crypto_common.h" #include "node_errors.h" #include "node_process.h" #include "node_quic_crypto.h" diff --git a/src/quic/node_quic_crypto.cc b/src/quic/node_quic_crypto.cc index 11a7deccb4f003..3bbf04b9be3cf8 100644 --- a/src/quic/node_quic_crypto.cc +++ b/src/quic/node_quic_crypto.cc @@ -1,7 +1,7 @@ #include "node_quic_crypto.h" #include "env-inl.h" #include "node_crypto.h" -#include "node_crypto_common.h" +#include "crypto/crypto_common.h" #include "node_process.h" #include "node_quic_session-inl.h" #include "node_quic_util-inl.h" diff --git a/src/quic/node_quic_session-inl.h b/src/quic/node_quic_session-inl.h index 29cf689be7b8ef..c506812b0447f4 100644 --- a/src/quic/node_quic_session-inl.h +++ b/src/quic/node_quic_session-inl.h @@ -5,7 +5,7 @@ #include "debug_utils-inl.h" #include "node_crypto.h" -#include "node_crypto_common.h" +#include "crypto/crypto_common.h" #include "node_quic_crypto.h" #include "node_quic_session.h" #include "node_quic_socket-inl.h" diff --git a/src/quic/node_quic_session.cc b/src/quic/node_quic_session.cc index ed1293a2210d12..371e3585dfeeed 100644 --- a/src/quic/node_quic_session.cc +++ b/src/quic/node_quic_session.cc @@ -5,7 +5,7 @@ #include "async_wrap-inl.h" #include "debug_utils-inl.h" #include "env-inl.h" -#include "node_crypto_common.h" +#include "crypto/crypto_common.h" #include "ngtcp2/ngtcp2.h" #include "nghttp3/nghttp3.h" // NGHTTP3_ALPN_H3 #include "ngtcp2/ngtcp2_crypto.h" diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 85591902d5fabd..1a1c5c41fec1d7 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -26,9 +26,9 @@ #include "memory_tracker-inl.h" #include "node_buffer.h" // Buffer #include "node_crypto.h" // SecureContext -#include "node_crypto_bio.h" // NodeBIO +#include "crypto/crypto_bio.h" // NodeBIO // ClientHelloParser -#include "node_crypto_clienthello-inl.h" +#include "crypto/crypto_clienthello-inl.h" #include "node_errors.h" #include "stream_base-inl.h" #include "util-inl.h"