Skip to content

Commit

Permalink
crypto: move node_crypto files to src/crypto
Browse files Browse the repository at this point in the history
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #35093
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
jasnell committed Oct 8, 2020
1 parent d0438a6 commit ba77dc8
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 39 deletions.
16 changes: 8 additions & 8 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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'
],
Expand Down
2 changes: 1 addition & 1 deletion src/node_crypto_bio.cc → src/crypto/crypto_bio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <climits>
Expand Down
6 changes: 3 additions & 3 deletions src/node_crypto_bio.h → src/crypto/crypto_bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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_
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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_
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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_
2 changes: 1 addition & 1 deletion src/node_crypto_common.cc → src/crypto/crypto_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/node_crypto_common.h → src/crypto/crypto_common.h
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -135,4 +135,4 @@ v8::MaybeLocal<v8::Object> X509ToObject(

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_NODE_CRYPTO_COMMON_H_
#endif // SRC_CRYPTO_CRYPTO_COMMON_H_
6 changes: 3 additions & 3 deletions src/node_crypto_groups.h → src/crypto/crypto_groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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_
8 changes: 4 additions & 4 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/node_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_crypto.cc
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_session-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/tls_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ba77dc8

Please sign in to comment.