Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v6.x backport] src: add openssl-system-ca-path configure option #18173

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@ ipch/
/config_fips.gypi
*-nodegyp*
/gyp-mac-tool
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
/tools/msvs/genfiles/
/tools/osx-pkg.pmdoc/index.xml
/test/addons/??_*/
email.md
deps/v8-*
Expand Down Expand Up @@ -100,6 +98,7 @@ deps/npm/node_modules/.bin/

# build/release artifacts
/*.tar.*
/*.pkg
/SHASUMS*.txt*

# test artifacts
Expand Down
57 changes: 43 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,7 @@ BINARYTAR=$(BINARYNAME).tar
XZ=$(shell which xz > /dev/null 2>&1; echo $$?)
XZ_COMPRESSION ?= 9e
PKG=$(TARNAME).pkg
PACKAGEMAKER ?= /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
PKGDIR=out/dist-osx
MACOSOUTDIR=out/macos

release-only:
@if [ "$(DISTTYPE)" != "nightly" ] && [ "$(DISTTYPE)" != "next-nightly" ] && \
Expand Down Expand Up @@ -561,24 +560,54 @@ release-only:
fi

$(PKG): release-only
$(RM) -r $(PKGDIR)
$(RM) -r out/deps out/Release
$(RM) -r $(MACOSOUTDIR)
mkdir -p $(MACOSOUTDIR)/installer/productbuild
cat tools/macos-installer/productbuild/distribution.xml.tmpl \
| sed -E "s/\\{nodeversion\\}/$(FULLVERSION)/g" \
| sed -E "s/\\{npmversion\\}/$(NPMVERSION)/g" \
>$(MACOSOUTDIR)/installer/productbuild/distribution.xml ; \

@for dirname in tools/macos-installer/productbuild/Resources/*/; do \
lang=$$(basename $$dirname) ; \
mkdir -p $(MACOSOUTDIR)/installer/productbuild/Resources/$$lang ; \
printf "Found localization directory $$dirname\n" ; \
cat $$dirname/welcome.html.tmpl \
| sed -E "s/\\{nodeversion\\}/$(FULLVERSION)/g" \
| sed -E "s/\\{npmversion\\}/$(NPMVERSION)/g" \
>$(MACOSOUTDIR)/installer/productbuild/Resources/$$lang/welcome.html ; \
cat $$dirname/conclusion.html.tmpl \
| sed -E "s/\\{nodeversion\\}/$(FULLVERSION)/g" \
| sed -E "s/\\{npmversion\\}/$(NPMVERSION)/g" \
>$(MACOSOUTDIR)/installer/productbuild/Resources/$$lang/conclusion.html ; \
done
$(PYTHON) ./configure \
--dest-cpu=x64 \
--tag=$(TAG) \
--release-urlbase=$(RELEASE_URLBASE) \
$(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS)
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)
SIGN="$(CODESIGN_CERT)" PKGDIR="$(PKGDIR)/usr/local" bash \
$(MAKE) install V=$(V) DESTDIR=$(MACOSOUTDIR)/dist/node
SIGN="$(CODESIGN_CERT)" PKGDIR="$(MACOSOUTDIR)/dist/node/usr/local" bash \
tools/osx-codesign.sh
cat tools/osx-pkg.pmdoc/index.xml.tmpl \
| sed -E "s/\\{nodeversion\\}/$(FULLVERSION)/g" \
| sed -E "s/\\{npmversion\\}/$(NPMVERSION)/g" \
> tools/osx-pkg.pmdoc/index.xml
$(PACKAGEMAKER) \
--id "org.nodejs.pkg" \
--doc tools/osx-pkg.pmdoc \
--out $(PKG)
mkdir -p $(MACOSOUTDIR)/dist/npm/usr/local/lib/node_modules
mkdir -p $(MACOSOUTDIR)/pkgs
mv $(MACOSOUTDIR)/dist/node/usr/local/lib/node_modules/npm \
$(MACOSOUTDIR)/dist/npm/usr/local/lib/node_modules
unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npm
unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npx
$(NODE) tools/license2rtf.js < LICENSE > \
$(MACOSOUTDIR)/installer/productbuild/Resources/license.rtf
cp doc/osx_installer_logo.png $(MACOSOUTDIR)/installer/productbuild/Resources
pkgbuild --version $(FULLVERSION) \
--identifier org.nodejs.node.pkg \
--root $(MACOSOUTDIR)/dist/node $(MACOSOUTDIR)/pkgs/node-$(FULLVERSION).pkg
pkgbuild --version $(NPMVERSION) \
--identifier org.nodejs.npm.pkg \
--root $(MACOSOUTDIR)/dist/npm \
--scripts ./tools/macos-installer/pkgbuild/npm/scripts \
$(MACOSOUTDIR)/pkgs/npm-$(NPMVERSION).pkg
productbuild --distribution $(MACOSOUTDIR)/installer/productbuild/distribution.xml \
--resources $(MACOSOUTDIR)/installer/productbuild/Resources \
--package-path $(MACOSOUTDIR)/pkgs ./$(PKG)
SIGN="$(PRODUCTSIGN_CERT)" PKG="$(PKG)" bash tools/osx-productsign.sh

pkg: $(PKG)
Expand Down
8 changes: 8 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ parser.add_option('--openssl-use-def-ca-store',
dest='use_openssl_ca_store',
help='Use OpenSSL supplied CA store instead of compiled-in Mozilla CA copy.')

parser.add_option('--openssl-system-ca-path',
action='store',
dest='openssl_system_ca_path',
help='Use the specified path to system CA (PEM format) in addition to '
'the OpenSSL supplied CA store or compiled-in Mozilla CA copy.')

shared_optgroup.add_option('--shared-http-parser',
action='store_true',
dest='shared_http_parser',
Expand Down Expand Up @@ -988,6 +994,8 @@ def configure_openssl(o):
o['variables']['openssl_no_asm'] = 1 if options.openssl_no_asm else 0
if options.use_openssl_ca_store:
o['defines'] += ['NODE_OPENSSL_CERT_STORE']
if options.openssl_system_ca_path:
o['variables']['openssl_system_ca_path'] = options.openssl_system_ca_path
o['variables']['node_without_node_options'] = b(options.without_node_options)
if options.without_node_options:
o['defines'] += ['NODE_WITHOUT_NODE_OPTIONS']
Expand Down
1 change: 1 addition & 0 deletions deps/uv/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Marc Schlaich <marc.schlaich@googlemail.com> <marc.schlaich@gmail.com>
Michael <michael_dawson@ca.ibm.com>
Michael Neumann <mneumann@think.localnet> <mneumann@ntecs.de>
Nicholas Vavilov <vvnicholas@gmail.com>
Nick Logan <ugexe@cpan.org> <nlogan@gmail.com>
Rasmus Christian Pedersen <zerhacken@yahoo.com>
Rasmus Christian Pedersen <zerhacken@yahoo.com> <ruysch@outlook.com>
Robert Mustacchi <rm@joyent.com> <rm@fingolfin.org>
Expand Down
3 changes: 3 additions & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,6 @@ darobs <darobs@microsoft.com>
Zheng, Lei <realthunder.dev@gmail.com>
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Scott Parker <scott.parker087@gmail.com>
Wade Brainerd <Wade.Brainerd@activision.com>
rayrase <rmartinez2175@eagle.fgcu.edu>
Pekka Nikander <pekka.nikander@iki.fi>
52 changes: 52 additions & 0 deletions deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
2017.11.11, Version 1.16.1 (Stable), 4056fbe46493ef87237e307e0025e551db875e13

Changes since version 1.16.0:

* unix: move net/if.h include (cjihrig)

* win: fix undeclared NDIS_IF_MAX_STRING_SIZE (Nick Logan)


2017.11.07, Version 1.16.0 (Stable), d68779f0ea742918f653b9c20237460271c39aeb

Changes since version 1.15.0:

* win: change st_blksize from `2048` to `4096` (Joran Dirk Greef)

* unix,win: add fs open flags, map O_DIRECT|O_DSYNC (Joran Dirk Greef)

* win, fs: fix non-symlink reparse points (Wade Brainerd)

* test: fix -Wstrict-prototypes warnings (Ben Noordhuis)

* unix, windows: map ENOTTY errno (Ben Noordhuis)

* unix: fall back to fsync() if F_FULLFSYNC fails (Joran Dirk Greef)

* unix: do not close invalid kqueue fd after fork (jBarz)

* zos: reset epoll data after fork (jBarz)

* zos: skip fork_threadpool_queue_work_simple (jBarz)

* test: keep platform_output as first test (Bartosz Sosnowski)

* win: fix non-English dlopen error message (Bartosz Sosnowski)

* unix,win: add uv_os_getppid() (cjihrig)

* test: fix const qualification compiler warning (Ben Noordhuis)

* doc: mark uv_default_loop() as not thread safe (rayrase)

* win, pipe: null-initialize stream->shutdown_req (Jameson Nash)

* tty, win: get SetWinEventHook pointer at startup (Bartosz Sosnowski)

* test: no extra new line in skipped test output (Bartosz Sosnowski)

* pipe: allow access from other users (Bartosz Sosnowski)

* unix,win: add uv_if_{indextoname,indextoiid} (Pekka Nikander)


2017.10.03, Version 1.15.0 (Stable), 8b69ce1419d2958011d415a636810705c36c2cc2

Changes since version 1.14.1:
Expand Down
1 change: 1 addition & 0 deletions deps/uv/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-pipe-server-close.c \
test/test-pipe-close-stdout-read-stdin.c \
test/test-pipe-set-non-blocking.c \
test/test-pipe-set-fchmod.c \
test/test-platform-output.c \
test/test-poll.c \
test/test-poll-close.c \
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v1.15.0.build{build}
version: v1.16.1.build{build}

init:
- git config --global core.autocrlf true
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

AC_PREREQ(2.57)
AC_INIT([libuv], [1.15.0], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.16.1], [https://github.com/libuv/libuv/issues])
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/libuv-extra-automake-flags.m4])
m4_include([m4/as_case.m4])
Expand Down
151 changes: 151 additions & 0 deletions deps/uv/docs/src/fs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -353,3 +353,154 @@ Helper functions
any attempts to close it or to use it after closing the fd may lead to malfunction.

.. versionadded:: 1.12.0

File open constants
-------------------

.. c:macro:: UV_FS_O_APPEND

The file is opened in append mode. Before each write, the file offset is
positioned at the end of the file.

.. c:macro:: UV_FS_O_CREAT

The file is created if it does not already exist.

.. c:macro:: UV_FS_O_DIRECT

File I/O is done directly to and from user-space buffers, which must be
aligned. Buffer size and address should be a multiple of the physical sector
size of the block device.

.. note::
`UV_FS_O_DIRECT` is supported on Linux, and on Windows via
`FILE_FLAG_NO_BUFFERING <https://msdn.microsoft.com/en-us/library/windows/desktop/cc644950.aspx>`_.
`UV_FS_O_DIRECT` is not supported on macOS.

.. c:macro:: UV_FS_O_DIRECTORY

If the path is not a directory, fail the open.

.. note::
`UV_FS_O_DIRECTORY` is not supported on Windows.

.. c:macro:: UV_FS_O_DSYNC

The file is opened for synchronous I/O. Write operations will complete once
all data and a minimum of metadata are flushed to disk.

.. note::
`UV_FS_O_DSYNC` is supported on Windows via
`FILE_FLAG_WRITE_THROUGH <https://msdn.microsoft.com/en-us/library/windows/desktop/cc644950.aspx>`_.

.. c:macro:: UV_FS_O_EXCL

If the `O_CREAT` flag is set and the file already exists, fail the open.

.. note::
In general, the behavior of `O_EXCL` is undefined if it is used without
`O_CREAT`. There is one exception: on Linux 2.6 and later, `O_EXCL` can
be used without `O_CREAT` if pathname refers to a block device. If the
block device is in use by the system (e.g., mounted), the open will fail
with the error `EBUSY`.

.. c:macro:: UV_FS_O_EXLOCK

Atomically obtain an exclusive lock.

.. note::
`UV_FS_O_EXLOCK` is only supported on macOS.

.. c:macro:: UV_FS_O_NOATIME

Do not update the file access time when the file is read.

.. note::
`UV_FS_O_NOATIME` is not supported on Windows.

.. c:macro:: UV_FS_O_NOCTTY

If the path identifies a terminal device, opening the path will not cause
that terminal to become the controlling terminal for the process (if the
process does not already have one).

.. note::
`UV_FS_O_NOCTTY` is not supported on Windows.

.. c:macro:: UV_FS_O_NOFOLLOW

If the path is a symbolic link, fail the open.

.. note::
`UV_FS_O_NOFOLLOW` is not supported on Windows.

.. c:macro:: UV_FS_O_NONBLOCK

Open the file in nonblocking mode if possible.

.. note::
`UV_FS_O_NONBLOCK` is not supported on Windows.

.. c:macro:: UV_FS_O_RANDOM

Access is intended to be random. The system can use this as a hint to
optimize file caching.

.. note::
`UV_FS_O_RANDOM` is only supported on Windows via
`FILE_FLAG_RANDOM_ACCESS <https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858.aspx>`_.

.. c:macro:: UV_FS_O_RDONLY

Open the file for read-only access.

.. c:macro:: UV_FS_O_RDWR

Open the file for read-write access.

.. c:macro:: UV_FS_O_SEQUENTIAL

Access is intended to be sequential from beginning to end. The system can
use this as a hint to optimize file caching.

.. note::
`UV_FS_O_SEQUENTIAL` is only supported on Windows via
`FILE_FLAG_SEQUENTIAL_SCAN <https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858.aspx>`_.

.. c:macro:: UV_FS_O_SHORT_LIVED

The file is temporary and should not be flushed to disk if possible.

.. note::
`UV_FS_O_SHORT_LIVED` is only supported on Windows via
`FILE_ATTRIBUTE_TEMPORARY <https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858.aspx>`_.

.. c:macro:: UV_FS_O_SYMLINK

Open the symbolic link itself rather than the resource it points to.

.. c:macro:: UV_FS_O_SYNC

The file is opened for synchronous I/O. Write operations will complete once
all data and all metadata are flushed to disk.

.. note::
`UV_FS_O_SYNC` is supported on Windows via
`FILE_FLAG_WRITE_THROUGH <https://msdn.microsoft.com/en-us/library/windows/desktop/cc644950.aspx>`_.

.. c:macro:: UV_FS_O_TEMPORARY

The file is temporary and should not be flushed to disk if possible.

.. note::
`UV_FS_O_TEMPORARY` is only supported on Windows via
`FILE_ATTRIBUTE_TEMPORARY <https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858.aspx>`_.

.. c:macro:: UV_FS_O_TRUNC

If the file exists and is a regular file, and the file is opened
successfully for write access, its length shall be truncated to zero.

.. c:macro:: UV_FS_O_WRONLY

Open the file for write-only access.
3 changes: 3 additions & 0 deletions deps/uv/docs/src/loop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ API
should) be closed with :c:func:`uv_loop_close` so the resources associated
with it are freed.

.. warning::
This function is not thread safe.

.. c:function:: int uv_run(uv_loop_t* loop, uv_run_mode mode)

This function runs the event loop. It will act differently depending on the
Expand Down
Loading