@@ -30,39 +30,49 @@ NASM version 2.11.08
3030
3131## 1. Obtain and extract new OpenSSL sources
3232
33- Get a new source from < https://github.com/openssl/openssl/tree/openssl-3.0.16 >
34- and copy all files into ` deps/openssl/openssl ` . Then add all files and commit
35- them. (The link above, and the branch, will change with each new OpenSSL
36- release).
33+ Get the sources for the desired ` openssl-<version> ` tag from
34+ < https://github.com/openssl/openssl > and copy all files into
35+ ` deps/openssl/openssl ` . Then add all files and commit them.
3736
3837``` bash
3938git clone https://github.com/openssl/openssl
4039cd openssl
40+ git checkout openssl-< version>
4141cd ../node/deps/openssl
4242rm -rf openssl
4343cp -R ../../../openssl openssl
44- rm -rf openssl/.git*
44+ rm -rf openssl/.git
4545git add --all openssl
4646git commit openssl
4747```
4848
4949``` text
50- deps: upgrade openssl sources to openssl-3.0.16
50+ deps: upgrade openssl sources to openssl-<version>
5151
5252This updates all sources in deps/openssl/openssl by:
5353 $ git clone git@github.com:openssl/openssl.git
5454 $ cd openssl
55- $ git checkout openssl-3.0.16
55+ $ git checkout openssl-<version>
5656 $ cd ../node/deps/openssl
5757 $ rm -rf openssl
5858 $ cp -R ../../../openssl openssl
59- $ rm -rf openssl/.git*
59+ $ rm -rf openssl/.git
6060 $ git add --all openssl
6161 $ git commit openssl
6262```
6363
6464## 2. Execute ` make ` in ` deps/openssl/config ` directory
6565
66+ Fix up 32-bit Windows assembler directives. This will allow the commits to be
67+ cherry-picked to older release lines that still provide binaries on 32-bit Windows.
68+
69+ ``` bash
70+ # Edit deps/openssl/openssl/crypto/perlasm/x86asm.pl changing
71+ # #ifdef/#endif to %ifdef/%endif for nasm on 32-bit Windows.
72+ # See: https://github.com/nodejs/node/pull/43603#issuecomment-1170670844
73+ # Reference: https://github.com/openssl/openssl/issues/18459
74+ ```
75+
6676Use ` make ` to regenerate all platform dependent files in
6777` deps/openssl/config/archs/ ` :
6878
@@ -75,17 +85,6 @@ make -C deps/openssl/config clean
7585make -C deps/openssl/config
7686```
7787
78- Fix up 32-bit Windows assembler directives. This will allow the commits to be
79- cherry-picked to older release lines that still provide binaries on 32-bit Windows.
80-
81- ``` bash
82- make -C deps/openssl/config clean
83- # Edit deps/openssl/openssl/crypto/perlasm/x86asm.pl changing
84- # #ifdef to %ifdef to make it compatible to nasm on 32-bit Windows.
85- # See: https://github.com/nodejs/node/pull/43603#issuecomment-1170670844
86- # Reference: https://github.com/openssl/openssl/issues/18459
87- ```
88-
8988## 3. Check diffs
9089
9190Check diffs to ensure updates are right. Even if there are no updates in openssl
@@ -98,36 +97,36 @@ git diff -- deps/openssl
9897
9998_ Note_ : On Windows, OpenSSL Configure generates a ` makefile ` that can be
10099used for the ` nmake ` command. The ` make ` command in step 2 (above) uses
101- ` Makefile_VC-WIN64A ` and ` Makefile_VC-WIN32 ` that are manually
102- created. When source files or build options are updated in Windows,
103- it needs to change these two Makefiles by hand. If you are not sure,
100+ ` Makefile_VC-WIN64A ` , ` Makefile_VC-WIN32 ` , and ` Makefile_VC-WIN64-ARM ` ,
101+ which are manually created. When source files or build options are updated in
102+ Windows, these Makefiles need to be changed by hand. If you are not sure,
104103please ask @shigeki for details.
105104
106- ## 4. Commit and make test
105+ ## 4. Commit and test
107106
108107Update all architecture dependent files. Do not forget to git add or remove
109108files if they are changed before committing:
110109
111110``` bash
112- git add deps/openssl/config/archs
113- git add deps/openssl/openssl
111+ git add -A deps/openssl/config/archs
112+ git add -A deps/openssl/openssl
114113git commit
115114```
116115
117116The commit message can be written as (with the openssl version set
118117to the relevant value):
119118
120119``` text
121- deps: update archs files for openssl-3.0.16
120+ deps: update archs files for openssl-<version>
122121
123122After an OpenSSL source update, all the config files need to be
124123regenerated and committed by:
125124 $ make -C deps/openssl/config
126- $ git add deps/openssl/config/archs
127- $ git add deps/openssl/openssl
125+ $ git add -A deps/openssl/config/archs
126+ $ git add -A deps/openssl/openssl
128127 $ git commit
129128```
130129
131- Finally, build Node.js and run the tests.
130+ Finally, build Node.js with the bundled OpenSSL and run the tests.
132131
133132[ update-openssl-action ] : ../../../.github/workflows/update-openssl.yml
0 commit comments