1- ## Upgrading OpenSSL-1.1.0
1+ ## Upgrading OpenSSL
22
33### Requirements
44- Linux environment (Only CentOS7.1 and Ubuntu16 are tested)
@@ -22,12 +22,12 @@ Copyright (C) 2015 Free Software Foundation, Inc.
2222$ nasm -v
2323NASM version 2.11.08
2424```
25+
2526### 1. Obtain and extract new OpenSSL sources
2627
2728Get a new source from https://www.openssl.org/source/ and extract
2829all files into ` deps/openssl/openssl ` . Then add all files and commit
2930them.
30-
3131``` sh
3232$ cd deps/openssl/
3333$ rm -rf openssl
@@ -36,36 +36,58 @@ $ mv openssl-1.1.0h openssl
3636$ git add --all openssl
3737$ git commit openssl
3838````
39- The commit message can be
4039
40+ The commit message can be (with the openssl version set to the relevant value):
4141```
4242deps: upgrade openssl sources to 1.1.0h
4343
44- This updates all sources in deps/openssl/openssl with openssl-1.1.0h.
44+ This updates all sources in deps/openssl/openssl by:
45+ $ cd deps/openssl/
46+ $ rm -rf openssl
47+ $ tar zxf ~ /tmp/openssl-1.1.0h.tar.gz
48+ $ mv openssl-1.1.0h openssl
49+ $ git add --all openssl
50+ $ git commit openssl
4551```
52+
4653### 2. Apply a floating patch
4754
48- Currently, one floating patch is needed to build S390 asm files.
55+ Currently, one floating patch is needed to build S390 asm files:
4956```
50- commit 094465362758ebf967b33c84d5c96230b46a34b3
51- Author: Shigeki Ohtsu < ohtsu@ohtsu.org >
52- Date: Wed Mar 7 23:52:52 2018 +0900
57+ Author: Shigeki Ohtsu < ohtsu@ohtsu.org >
58+ Date: Wed Mar 7 23:52:52 2018 +0900
59+
60+ deps: add s390 asm rules for OpenSSL-1.1.0
5361
54- deps: add s390 asm rules for OpenSSL-1.1.0
62+ This is a floating patch against OpenSSL-1.1.0 to generate asm files
63+ with Makefile rules and it is to be submitted to the upstream.
5564
56- This is a floating patch against OpenSSL-1.1.0 to generate asm files
57- with Makefile rules and it is to be submitted to the upstream.
65+ Fixes: https://github.com/nodejs/node/issues/4270
66+ PR-URL: https://github.com/nodejs/node/pull/19794
67+ Reviewed-By: James M Snell <jasnell@gmail.com>
68+ Reviewed-By: Rod Vagg <rod@vagg.org>
69+ Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
70+
71+ deps/openssl/openssl/crypto/poly1305/build.info | 2 ++
5872```
5973
60- Cherry pick it from the previous commit.
74+ Find the SHA of the previous commit of this patch:
75+ ```sh
76+ $ git log -n1 --oneline -- deps/openssl/openssl/crypto/poly1305/build.info
77+ ```
78+
79+ Using the SHA found in the previous step, cherry pick it from the previous
80+ commit (with the openssl version in the commit message set to the relevant
81+ value):
6182``` sh
6283$ git cherry-pick 45b9f5df6ff1548f01ed646ebee75e3f0873cefd
6384```
64- ### 3. Execute ` make ` in ` deps/openssl/config ` directory
6585
66- Just type ` make ` then it generates all platform dependent files into
67- ` deps/openssl/config/archs ` directory.
6886
87+ ### 3. Execute ` make ` in ` deps/openssl/config ` directory
88+
89+ Use ` make ` to regenerate all platform dependent files in
90+ ` deps/openssl/config/archs/ ` :
6991``` sh
7092$ cd deps/openssl/config; make
7193```
@@ -100,15 +122,19 @@ $ git add deps/openssl/openssl/.gitignore
100122$ git commit
101123```
102124
103- The commit message can be
125+ The commit message can be (with the openssl version set to the relevant value):
104126```
105- commit 8cb1de45c60f2d520551166610115531db673518
106- Author: Shigeki Ohtsu <ohtsu@ohtsu.org>
107- Date: Thu Mar 29 16:46:11 2018 +0900
108-
109- deps: update archs files for OpenSSL-1.1.0
110-
111- `cd deps/openssl/config; make` updates all archs dependant files.
127+ deps: update archs files for OpenSSL-1.1.0
128+
129+ After an OpenSSL source update, all the config files need to be regenerated and
130+ comitted by:
131+ $ cd deps/openssl/config
132+ $ make
133+ $ git add deps/openssl/config/archs
134+ $ git add deps/openssl/openssl/crypto/include/internal/bn_conf.h
135+ $ git add deps/openssl/openssl/crypto/include/internal/dso_conf.h
136+ $ git add deps/openssl/openssl/include/openssl/opensslconf.h
137+ $ git commit
112138```
113139
114140Finally, build Node and run tests.
0 commit comments