Skip to content

Commit ba77dc8

Browse files
committed
crypto: move node_crypto files to src/crypto
Signed-off-by: James M Snell <[email protected]> PR-URL: #35093 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent d0438a6 commit ba77dc8

16 files changed

+39
-39
lines changed

node.gyp

+8-8
Original file line numberDiff line numberDiff line change
@@ -902,16 +902,16 @@
902902
} ],
903903
[ 'node_use_openssl=="true"', {
904904
'sources': [
905+
'src/crypto/crypto_common.cc',
906+
'src/crypto/crypto_bio.cc',
907+
'src/crypto/crypto_clienthello.cc',
908+
'src/crypto/crypto_common.h',
909+
'src/crypto/crypto_bio.h',
910+
'src/crypto/crypto_clienthello.h',
911+
'src/crypto/crypto_clienthello-inl.h',
912+
'src/crypto/crypto_groups.h',
905913
'src/node_crypto.cc',
906-
'src/node_crypto_common.cc',
907-
'src/node_crypto_bio.cc',
908-
'src/node_crypto_clienthello.cc',
909914
'src/node_crypto.h',
910-
'src/node_crypto_common.h',
911-
'src/node_crypto_bio.h',
912-
'src/node_crypto_clienthello.h',
913-
'src/node_crypto_clienthello-inl.h',
914-
'src/node_crypto_groups.h',
915915
'src/tls_wrap.cc',
916916
'src/tls_wrap.h'
917917
],

src/node_crypto_bio.cc src/crypto/crypto_bio.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "base_object-inl.h"
2323
#include "memory_tracker-inl.h"
2424
#include "allocated_buffer-inl.h" // Inlined functions needed by node_crypto.h.
25-
#include "node_crypto_bio.h"
25+
#include "crypto/crypto_bio.h"
2626
#include "openssl/bio.h"
2727
#include "util-inl.h"
2828
#include <climits>

src/node_crypto_bio.h src/crypto/crypto_bio.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
#ifndef SRC_NODE_CRYPTO_BIO_H_
23-
#define SRC_NODE_CRYPTO_BIO_H_
22+
#ifndef SRC_CRYPTO_CRYPTO_BIO_H_
23+
#define SRC_CRYPTO_CRYPTO_BIO_H_
2424

2525
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
2626

@@ -192,4 +192,4 @@ class NodeBIO : public MemoryRetainer {
192192

193193
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
194194

195-
#endif // SRC_NODE_CRYPTO_BIO_H_
195+
#endif // SRC_CRYPTO_CRYPTO_BIO_H_

src/node_crypto_clienthello-inl.h src/crypto/crypto_clienthello-inl.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
#ifndef SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_
23-
#define SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_
22+
#ifndef SRC_CRYPTO_CRYPTO_CLIENTHELLO_INL_H_
23+
#define SRC_CRYPTO_CRYPTO_CLIENTHELLO_INL_H_
2424

2525
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
2626

27-
#include "node_crypto_clienthello.h"
27+
#include "crypto/crypto_clienthello.h"
2828
#include "util.h"
2929

3030
namespace node {
@@ -88,4 +88,4 @@ inline bool ClientHelloParser::IsPaused() const {
8888

8989
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
9090

91-
#endif // SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_
91+
#endif // SRC_CRYPTO_CRYPTO_CLIENTHELLO_INL_H_

src/node_crypto_clienthello.cc src/crypto/crypto_clienthello.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
#include "node_crypto_clienthello.h" // NOLINT(build/include_inline)
23-
#include "node_crypto_clienthello-inl.h"
22+
#include "crypto/crypto_clienthello.h" // NOLINT(build/include_inline)
23+
#include "crypto/crypto_clienthello-inl.h"
2424

2525
namespace node {
2626
namespace crypto {

src/node_crypto_clienthello.h src/crypto/crypto_clienthello.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
#ifndef SRC_NODE_CRYPTO_CLIENTHELLO_H_
23-
#define SRC_NODE_CRYPTO_CLIENTHELLO_H_
22+
#ifndef SRC_CRYPTO_CRYPTO_CLIENTHELLO_H_
23+
#define SRC_CRYPTO_CRYPTO_CLIENTHELLO_H_
2424

2525
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
2626

@@ -129,4 +129,4 @@ class ClientHelloParser {
129129

130130
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
131131

132-
#endif // SRC_NODE_CRYPTO_CLIENTHELLO_H_
132+
#endif // SRC_CRYPTO_CRYPTO_CLIENTHELLO_H_

src/node_crypto_common.cc src/crypto/crypto_common.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "env-inl.h"
44
#include "node_buffer.h"
55
#include "node_crypto.h"
6-
#include "node_crypto_common.h"
6+
#include "crypto/crypto_common.h"
77
#include "node.h"
88
#include "node_internals.h"
99
#include "node_url.h"

src/node_crypto_common.h src/crypto/crypto_common.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef SRC_NODE_CRYPTO_COMMON_H_
2-
#define SRC_NODE_CRYPTO_COMMON_H_
1+
#ifndef SRC_CRYPTO_CRYPTO_COMMON_H_
2+
#define SRC_CRYPTO_CRYPTO_COMMON_H_
33

44
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
55

@@ -135,4 +135,4 @@ v8::MaybeLocal<v8::Object> X509ToObject(
135135

136136
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
137137

138-
#endif // SRC_NODE_CRYPTO_COMMON_H_
138+
#endif // SRC_CRYPTO_CRYPTO_COMMON_H_

src/node_crypto_groups.h src/crypto/crypto_groups.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22-
#ifndef SRC_NODE_CRYPTO_GROUPS_H_
23-
#define SRC_NODE_CRYPTO_GROUPS_H_
22+
#ifndef SRC_CRYPTO_CRYPTO_GROUPS_H_
23+
#define SRC_CRYPTO_CRYPTO_GROUPS_H_
2424

2525
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
2626

@@ -412,4 +412,4 @@ static const modp_group modp_groups[] = {
412412

413413
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
414414

415-
#endif // SRC_NODE_CRYPTO_GROUPS_H_
415+
#endif // SRC_CRYPTO_CRYPTO_GROUPS_H_

src/node_crypto.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121

2222
#include "node_crypto.h"
2323
#include "node_buffer.h"
24-
#include "node_crypto_bio.h"
25-
#include "node_crypto_common.h"
26-
#include "node_crypto_clienthello-inl.h"
27-
#include "node_crypto_groups.h"
24+
#include "crypto/crypto_bio.h"
25+
#include "crypto/crypto_common.h"
26+
#include "crypto/crypto_clienthello-inl.h"
27+
#include "crypto/crypto_groups.h"
2828
#include "node_errors.h"
2929
#include "node_mutex.h"
3030
#include "node_process.h"

src/node_crypto.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
2626

2727
// ClientHelloParser
28-
#include "node_crypto_clienthello.h"
28+
#include "crypto/crypto_clienthello.h"
2929

3030
#include "allocated_buffer.h"
3131
#include "env.h"

src/quic/node_quic.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "node.h"
33
#include "env-inl.h"
44
#include "node_crypto.h" // SecureContext
5-
#include "node_crypto_common.h"
5+
#include "crypto/crypto_common.h"
66
#include "node_errors.h"
77
#include "node_process.h"
88
#include "node_quic_crypto.h"

src/quic/node_quic_crypto.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "node_quic_crypto.h"
22
#include "env-inl.h"
33
#include "node_crypto.h"
4-
#include "node_crypto_common.h"
4+
#include "crypto/crypto_common.h"
55
#include "node_process.h"
66
#include "node_quic_session-inl.h"
77
#include "node_quic_util-inl.h"

src/quic/node_quic_session-inl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "debug_utils-inl.h"
77
#include "node_crypto.h"
8-
#include "node_crypto_common.h"
8+
#include "crypto/crypto_common.h"
99
#include "node_quic_crypto.h"
1010
#include "node_quic_session.h"
1111
#include "node_quic_socket-inl.h"

src/quic/node_quic_session.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "async_wrap-inl.h"
66
#include "debug_utils-inl.h"
77
#include "env-inl.h"
8-
#include "node_crypto_common.h"
8+
#include "crypto/crypto_common.h"
99
#include "ngtcp2/ngtcp2.h"
1010
#include "nghttp3/nghttp3.h" // NGHTTP3_ALPN_H3
1111
#include "ngtcp2/ngtcp2_crypto.h"

src/tls_wrap.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
#include "memory_tracker-inl.h"
2727
#include "node_buffer.h" // Buffer
2828
#include "node_crypto.h" // SecureContext
29-
#include "node_crypto_bio.h" // NodeBIO
29+
#include "crypto/crypto_bio.h" // NodeBIO
3030
// ClientHelloParser
31-
#include "node_crypto_clienthello-inl.h"
31+
#include "crypto/crypto_clienthello-inl.h"
3232
#include "node_errors.h"
3333
#include "stream_base-inl.h"
3434
#include "util-inl.h"

0 commit comments

Comments
 (0)