Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
50e9fc1
Working on v1.7.2
rvagg Apr 14, 2015
e4872d7
deps: upgrade openssl to 1.0.2a
Mar 30, 2015
d293a4f
deps: fix openssl assembly error on ia32 win32
indutny Jan 8, 2014
71316c4
deps: fix asm build error of openssl in x86_win32
Feb 13, 2015
ae8831f
deps: backport openssl patch of alt cert chains 1
Jan 27, 2015
116c546
openssl: fix keypress requirement in apps on win32
Feb 17, 2015
033a663
deps: replace all headers in openssl
Apr 10, 2015
eb7a235
deps: add x32 and arm64 support for opensslconf.h
Apr 10, 2015
02f12ab
deps: update opensslconf.h for 1.0.2a
Apr 10, 2015
418e839
deps: update openssl.gyp/gypi for openssl-1.0.2a
Mar 31, 2015
53924d8
deps: update asm Makefile for openssl-1.0.2a
Mar 31, 2015
a1c9ef3
deps, build: add support older assembler
Mar 31, 2015
11bec72
deps: update asm files for openssl-1.0.2a
Apr 10, 2015
92dfb79
build: enable ssl support on arm64
Apr 10, 2015
deb9d23
test: fix error message check for openssl-1.0.2a
Feb 5, 2015
4830b4b
deps: add docs to upgrade openssl
Mar 31, 2015
a530b2b
build: fix error message in configure
Apr 13, 2015
c7769d4
build: Expose xz compression level
jbergstroem Apr 15, 2015
12e51d5
doc: add Addon API WG
rvagg Mar 21, 2015
10e31ba
node: allow multiple arguments passed to nextTick
trevnorris Mar 5, 2015
76f219c
doc: Document forced pushing with git
jbergstroem Apr 14, 2015
62f5f4c
src: remove duplicate byteLength from Buffer
JacksonTian Apr 16, 2015
431673e
buffer: fast-case for empty string in byteLength
JacksonTian Apr 16, 2015
3ad82c3
module: handle NODE_PATH in require('.')
silverwind Apr 7, 2015
51d0808
stream: remove duplicated expression
yorkie Oct 2, 2014
91943a9
build: use %PYTHON% instead of python
rvagg Oct 16, 2014
cd60ff0
net: add fd into listen2 debug info
JacksonTian Apr 16, 2015
7956a13
http: logically respect maxSockets
fengmk2 Mar 23, 2015
5b844e1
module: fix style
silverwind Apr 17, 2015
49bb7de
deps: fix git case sensitivity issue in npm
chrisdickinson Apr 17, 2015
4870213
deps: upgrade npm to 2.8.3
othiym23 Apr 17, 2015
7de0dcd
deps: make node-gyp work with io.js
cjihrig Feb 27, 2015
ca8c9ec
win,node-gyp: optionally allow node.exe/iojs.exe to be renamed
piscisaureus Mar 25, 2015
1b22bad
build: fix logic for shared library flags
Fishrock123 Apr 17, 2015
c0f8413
2015-04-17 io.js v1.8.0 Release
chrisdickinson Apr 17, 2015
e61ee49
Working on v2.0.0
chrisdickinson Apr 17, 2015
77db7e1
Working on v1.8.1
chrisdickinson Apr 17, 2015
6870764
doc: update CONTRIBUTING.md
brendanashworth Apr 18, 2015
7180597
Revert "http: don't bother making a copy of the options"
brendanashworth Apr 18, 2015
6bf85bc
test: add test for 06cfff9 regression
brendanashworth Apr 18, 2015
53ed89d
Revert "build: use %PYTHON% instead of python"
rvagg Apr 20, 2015
f23b963
src: revert NODE_MODULE_VERSION to 43
chrisdickinson Apr 18, 2015
7b7da2e
2015-04-20 io.js v1.8.1 Release
chrisdickinson Apr 18, 2015
2f6986e
Working on v1.8.2
chrisdickinson Apr 20, 2015
59a5c98
Merge v1.8.1.
chrisdickinson Apr 21, 2015
2632775
doc: update AUTHORS list
rvagg Apr 20, 2015
b16a328
doc: add spaces to child.kill example
enaqx Apr 22, 2015
22aafa5
doc: add Fishrock123 to the TC
Fishrock123 Apr 23, 2015
a7d7463
tls_wrap: use localhost if options.host is empty
sitegui Apr 21, 2015
7384ca8
module: remove '' from Module.globalPaths
chrisyip Apr 21, 2015
bb254b5
doc: update branch to master
silverwind Apr 23, 2015
3d3083b
buffer: little improve for Buffer.concat method
JacksonTian Apr 16, 2015
1bef717
net: cleanup connect logic
evanlucas Apr 22, 2015
4abe2fa
net: add lookup option to Socket.prototype.connect
evanlucas Apr 22, 2015
5404cbc
buffer: fix copy() segfault with zero arguments
trevnorris Apr 24, 2015
b3a7da1
deps: update http_parser to 2.5.0
indutny Apr 24, 2015
f3cc50f
doc: add TC meeting 2015-04-08 minutes
rvagg Apr 22, 2015
5178f93
doc: Add Addon API (NAN) to working group list
julianduque Apr 25, 2015
bf7ac08
util: add Map and Set inspection support
monsanto Apr 20, 2015
3bda6cb
win,node-gyp: enable delay-load hook by default
piscisaureus Apr 15, 2015
5472139
test: adjust Makefile/test-ci, add to vcbuild.bat
rvagg Apr 26, 2015
bfae823
test: fix test-net-dns-custom-lookup test assertion
evanlucas Apr 26, 2015
2a3c8c1
build: remove -J from test-ci
rvagg Apr 28, 2015
e55fdc4
doc: fix util.deprecate example
enaqx Apr 27, 2015
0fa6c4a
string_decoder: don't cache Buffer.isEncoding
mscdex Apr 28, 2015
391cae3
doc: Add Known issues to v1.7.0/1.7.1 CHANGELOG
yosuke-furukawa Apr 20, 2015
1bcdf46
doc: add TC meeting 2015-04-15 minutes
rvagg Apr 22, 2015
b57cc51
os: remove trailing slash from os.tmpdir()
tellnes Feb 6, 2015
36cd5fb
deps: upgrade v8 to 4.2.77.13
bnoordhuis Mar 27, 2015
db4ded5
deps: enable v8 postmortem debugging again
bnoordhuis Mar 27, 2015
01e6632
deps: upgrade v8 to 4.2.77.15
bnoordhuis Apr 11, 2015
01652c7
deps: upgrade v8 to 4.2.77.18
chrisdickinson Apr 25, 2015
509b59e
deps: enable v8 postmortem debugging again
bnoordhuis Mar 27, 2015
f9c681c
fs: validate fd on fs.write
julianduque Apr 28, 2015
f9b226c
test: extend timeouts for ARMv6
rvagg Apr 29, 2015
3c92ca2
src: add ability to get/set effective uid/gid
evanlucas Apr 27, 2015
d5ce47e
lib: deprecate the smalloc module
bnoordhuis Apr 29, 2015
609fa0d
src: fix NODE_DEPRECATED macro
bnoordhuis Apr 29, 2015
ccb199a
src: fix deprecation warnings
bnoordhuis Apr 29, 2015
7306252
src: deprecate smalloc public functions
bnoordhuis Apr 29, 2015
2d241b3
tls: destroy SSL once it is out of use
indutny Apr 26, 2015
e6874dd
crypto: track external memory for SSL structures
indutny Apr 26, 2015
2684c90
tls: zero SSL_CTX freelist for a singleUse socket
indutny Apr 26, 2015
1787416
tls: destroy singleUse context immediately
indutny Apr 27, 2015
7dc8eec
doc: deprecate smalloc module
bnoordhuis Apr 30, 2015
801b47a
gitignore: ignore xcode workspaces and projects
r-52 Apr 29, 2015
a5dcff8
build: Use option groups in configure output
jbergstroem Apr 27, 2015
0450ce7
repl: add mode detection, cli persistent history
chrisdickinson Apr 23, 2015
78f4b03
build: turn on debug-safe optimizations with -Og
bnoordhuis Apr 30, 2015
30b7349
stream_base: dispatch reqs in the stream impl
indutny Apr 29, 2015
550c263
tls: use `SSL_set_cert_cb` for async SNI/OCSP
indutny Apr 18, 2015
b4ad5d7
doc: improve http.request and https.request opts
silverwind Apr 28, 2015
56e4255
deps: upgrade npm to 2.9.0
othiym23 May 1, 2015
935c9d3
deps: make node-gyp work with io.js
cjihrig May 1, 2015
30e83d2
win,node-gyp: optionally allow node.exe/iojs.exe to be renamed
piscisaureus May 1, 2015
79a7a86
Merge branch 'v1.x'
Fishrock123 May 2, 2015
ea5195c
repl: do not save history for non-terminal repl
indutny May 1, 2015
c7782c0
node: improve nextTick performance
mscdex May 1, 2015
57c4cc2
doc: add TC meeting 2015-04-22 minutes
rvagg Apr 29, 2015
3fd7fc4
url: significantly improve the performance of the url module
petkaantonov Mar 23, 2015
02388db
doc: fix some cross-references
gromnitsky May 2, 2015
2e2fce0
repl: fix persistent history and env variable name
silverwind May 2, 2015
2a3a190
doc: add require() lines to child.stdio example
enaqx Apr 22, 2015
b4f5898
net: ensure Write/ShutdownWrap references handle
indutny May 2, 2015
dbdd81a
url: delete href cache on all setter code paths
petkaantonov May 2, 2015
6687721
url: fix treatment of some values as non-empty
petkaantonov May 3, 2015
0f39ef4
Revert "url: fix treatment of some values as non-empty"
rvagg May 3, 2015
0daed24
Revert "url: delete href cache on all setter code paths"
rvagg May 3, 2015
702997c
Revert "url: significantly improve the performance of the url module"
rvagg May 3, 2015
dacc1fa
doc: update AUTHORS list
rvagg May 2, 2015
f7620fb
tls_wrap: Unlink TLSWrap and SecureContext objects
ChALkeR May 1, 2015
279f611
src: fix -Wmissing-field-initializers warning
bnoordhuis May 4, 2015
e67542a
build: disable -Og when building with clang
bnoordhuis May 4, 2015
051d482
repl: fix _debugger by properly proxying repl
chrisdickinson May 4, 2015
ca219b0
repl: fix for a+ fd clearing the file on read
chrisdickinson May 4, 2015
69581b2
build: don't compile debug build with -Og
bnoordhuis May 4, 2015
ac1fb39
doc: add rvagg to the TC
rvagg May 4, 2015
c1b9913
src: bump NODE_MODULE_VERSION due to V8 API
rvagg May 4, 2015
7c89c4c
2015-05-04 io.js v2.0.0 Release
rvagg Apr 29, 2015
3dafdc5
Working on v2.0.1
rvagg May 4, 2015
f696c9e
src: fix deprecated use of Buffer::New()
bnoordhuis May 1, 2015
2ed10f1
src: fix minor inefficiency in Buffer::New() call
bnoordhuis May 1, 2015
4f7e2de
Merge branch 'master' into next
chrisdickinson May 5, 2015
e6c48b7
test: remove obsolete harmony flags
chrisdickinson May 5, 2015
c554f95
deps: upgrade to v8 4.3.61.17
chrisdickinson May 5, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: add docs to upgrade openssl
This document is intended to describe the procedure to upgrade openssl
from 1.0.1m to 1.0.2a in io.js.

Fixes: #589
PR-URL: #1389
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
Shigeki Ohtsu committed Apr 14, 2015
commit 4830b4bce81eb92f128e6b6a5bc62ce178fbec01
191 changes: 191 additions & 0 deletions deps/openssl/doc/UPGRADING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
## How to upgrade openssl library in io.js

This document describes the procedure to upgrade openssl from 1.0.1m
to 1.0.2a in io.js.


### Build System and Upgrading Overview
The openssl build system is based on the `Configure` perl script in
`deps/openssl/openssl`. For example, running `Configure linux_x86-64`
in the openssl repository generates `Makefile` and `opensslconf.h` for
the linux_x86_64 target architecture.

The `Makefile` contains the list of asm files which are generated by
perl scripts during build so that we can get the most of use of the
hardware performance according to the type of cpus.

`Configure TABLE` shows various build parameters that depend on each
os and arch.

In io.js, build target is defined as `--dest-os` and `--dest-cpu` in
configure options which are different from the one that is defined in
openssl and it's build system is gyp that is based on python,
therefore we cannot use the openssl build system directly.

In order to build openssl with gyp in iojs, files of opensslconf.h and
asm are generated in advance for several supported platforms.

Here is a map table to show conf(opensslconf.h) and asm between
the openssl target and configuration parameters of os and cpu in iojs.
The tested platform in CI are also listed.

| --dest-os | --dest-cpu | conf | asm | openssl target | CI |
|---------- |----------- |----- |----- |------------------- |--- |
| linux | ia32 | o | o |linux-elf | o |
| linux | x32 | o | x(*2)|linux-x32 | x |
| linux | x64 | o | o |linux-x86_64 | o |
| linux | arm | o | o |linux-arm | o |
| linux | arm64 | o | o |linux-aarch64 | o |
| mac | ia32 | o | o |darwin-i386-cc | - |
| mac | x64 | o | o |darwin64-x86_64-cc | o |
| win | ia32 | o | o(*3)|VC-WIN32 | x |
| win | x64 | o | o |VC-WIN64A | o |
| solaris | ia32 | o | o |solaris-x86-gcc | o |
| solaris | x64 | o | o |solaris64-x86_64-gcc| o |
| freebsd | ia32 | o | o |BSD-x86 | o |
| freebsd | x64 | o | o |BSD-x86_64 | o |
| openbsd | ia32 | o | o |BSD-x86 | x |
| openbsd | x64 | o | o |BSD-x86_64 | x |
| others | ia32 | x(*1)| o | - | x |
| others | x64 | x(*1)| o | - | x |
| others | arm | x(*1)| o | - | x |
| others | arm64 | x(*1)| o | - | x |
| others | others | x(*1)| x(*2)| - | x |

- (*1) use linux-elf as a fallback configuration
- (*2) no-asm used
- (*3) currently masm (Microsoft Macro Assembler) is used but it's no
longer supported in openssl. We need to move to use nasm or yasm.

All parameters such as sources, defines, cflags and others generated
in openssl Makefile are written down into `deps/openssl/openssl.gypi`.

The header file of `deps/openssl/openssl/crypto/opensslconf.h` are
generated by `Configure` and varies on each os and arch so that we
made a new `deps/openssl/config/opensslconf.h`, where it includes each
conf file from `deps/openssl/config/archs/*/opensslconf.h` by using
pre-defined compiler macros. This procedure can be processed
automatically with `deps/openssl/config/Makefile`

Assembler support is one of the key features in openssl, but asm files
are dynamically generated with
`deps/openssl/openssl/crypto/*/asm/*.pl` by perl during
build. Furthermore, these perl scripts check the version of assembler
and generate asm files according to the supported instructions in each
compiler.

Since perl is not a build requirement in iojs, they all should be
generated in advance and statically stored in the repository. We
provide two sets of asm files, one is asm_latest(avx2 and addx
supported) in `deps/openssl/asm` and the other asm_obsolete(without
avx1/2 and addx) in `deps/openssl/asm_obsolute`, which depends on
supported features in assemblers. Each directory has a `Makefile`
to generate asm files with perl scripts in openssl sources.

`configure` and gyp check the version of assemblers such as gnu
as(gas), llvm and Visual Studio. `deps/openssl/openssl.gypi`
determines what asm files should be used, in which the asm_latest
needs the version of gas >= 2.23, llvm >= 3.3 or MSVS_VERSION>='2012'
(ml64 >= 12) as defined in
https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/crypto/sha/asm/sha512-x86_64.pl#L112-L129,
otherwise asm_obsolete are used.

The following is the detail instruction steps how to upgrade openssl
version from 1.0.1m to 1.0.2a in iojs.

### 1. Replace openssl source in `deps/openssl/openssl`
Remove old openssl sources in `deps/openssl/openssl` .
Get original openssl sources from
https://www.openssl.org/source/openssl-1.0.2a.tar.gz and extract all
files into `deps/openssl/openssl` .

### 2. Apply private patches
There are three kinds of private patches to be applied in openssl-1.0.2a.

- The two fixes of assembly error on ia32 win32. masm is no longer
supported in openssl. We should move to use nasm or yasm in future
version of iojs.

- The fix of openssl-cli built on win. Key press requirement of
openssl-cli in win causes timeout failures of several tests.

- Backport patches for alt cert feature from openssl-1.1.x. Root certs
of 1024bit RSA key length were deprecated in io.js. When a tls
server has a cross root cert, io.js client leads CERT_UNTRUSTED
error because openssl does not find alternate cert chains. This fix
supports its feature but was made the current master which is
openssl-1.1.x. We backported them privately into openssl-1.0.2 on
iojs.

### 3. Replace openssl header files in `deps/openssl/openssl/include/openssl`
all header files in `deps/openssl/openssl/include/openssl/*.h` are
symbolic links in the distributed release tar.gz. They cause issues in
Windows. They are replaced into the files to include a real header
file such as
````
#include "../../crypto/aes/aes.h"
````
### 4. Change `opensslconf.h` so as to fit each platform.
The opensslconf.h in each target was created in advance by typing
`deps/openssl/openssl/Configure {target}` and copied
into `deps/openssl/conf/archs/{target}/opensslconf.h`.
`deps/openssl/conf/openssconf.h` includes each file according to its
target by checking pre-defined compiler macros. These can be generated
by using `deps/openssl/conf/Makefile`

We should remove OPENSSL_CPUID_OBJ define in opensslconf.h because it
causes build error when --openss-no-asm option is specified. Instead,
the OPENSSL_CPUID_OBJ is defined in `deps/openssl/openssl.gypi`
according to the configure options.

One fix of opensslconf.h is needed in 64-bit MacOS.
The current openssl release does not use RC4 asm since it explicitly
specified as `$asm=~s/rc4\-[^:]+//;` in
https://github.com/openssl/openssl/blob/OpenSSL_1_0_1-stable/Configure#L584
But iojs has used RC4 asm on MacOS for long time. Fix type of RC4_INT
into `unsigned int` in opensslconf.h of darwin64-x86_64-cc to work on
the RC4 asm.

### 5. Update openssl.gyp and openssl.gypi
Sources, cflags and define parameters that depends on each target can
be obtained via `Configure TABLE`. Its list is put in the table of
[define and cflags changes in openssl-1.0.2a](openssl_define_list.pdf)

There is no way to verify all necessary sources automatically. We can
only carefully look at the source list and compiled objects in
Makefile of openssl and compare the compiled objects that stored
stored under `out/Release/obj.target/openssl/deps/openssl/' in iojs.

### 6. ASM files for openssl
We provide two sets of asm files. One is for the latest assembler
and the other is the older one.

### 6.1. asm files for the latest compiler
This was made in `deps/openssl/asm/Makefile`
- Updated asm files for each platforms which are required in
openssl-1.0.2a.
- Some perl files need CC and ASM envs. Added a check if these envs
exist. Followed asm files are to be generated with CC=gcc and
ASM=nasm on Linux. See
`deps/openssl/openssl/crypto/sha/asm/sha512-x86_64.pl`
- Added new 32bit targets/rules with a sse2 flag (OPENSSL_IA32_SSE2)
to generate asm for use SSE2.
- Generating sha512 asm files in x86_64 need output filename which
has 512. Added new rules so as not to use stdout for outputs.
- PERLASM_SCHEME of linux-armv4 is `void` as defined in openssl
Configure. Changed its target/rule and all directories are moved
from arm-elf-gas to arm-void-gas.
- add a new rule for armv8 asm generation

With export environments of CC=gcc and ASM=nasm, then type make
command and check if new asm files are generated.

### 6.2.asm files for the older compiler
For older assembler, the version check of CC and ASM should be
skipped in generating asm file with perl scripts.
Copy files from `deps/openssl/asm` into
`deps/openssl/asm/asm_obsolete` and change rules to generate asm files
into this directories and remove the check of CC and ASM envs.

Without environments of CC and ASM, then type make command and check
if new asm files for older compilers are generated.
Binary file added deps/openssl/doc/openssl_define_list.pdf
Binary file not shown.