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

deps: update openssl to quictls/openssl 3.0.0+quic #38512

Closed
wants to merge 30 commits into from

Commits on Oct 10, 2021

  1. Configuration menu
    Copy the full SHA
    ccce47b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    79e0f36 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f84f775 View commit details
    Browse the repository at this point in the history
  4. src: suppress compilation warning in inspector_socket.cc

    When building/linking against OpenSSL 3.0.0alpha17 the following
    compilation error occurs:
    
    In file included from ../src/inspector_socket.cc:7:
    ../src/inspector_socket.cc: In function
    ‘void node::inspector::{anonymous}::generate_accept_string(
        const string&, char (*)[28])’:
    ../src/inspector_socket.cc:150:8: error:
    second operand of conditional expression has no effect
    [-Werror=unused-value]
      150 |  reinterpret_cast<unsigned char*>(hash));
          |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../deps/openssl/openssl/include/openssl/sha.h:57:57: note:
    in definition of macro ‘SHA1’
       57 |  (EVP_Q_digest(NULL, "SHA1", NULL, d, n, md, NULL) ? md : NULL)
          |                                                      ^~
    ../src/inspector_socket.cc:150:47: error:
    third operand of conditional expression has no effect
    [-Werror=unused-value]
      150 |        reinterpret_cast<unsigned char*>(hash));
          |                                               ^
    
    This commit suppresses this warning for OpenSSL 3.0.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    6559ac6 View commit details
    Browse the repository at this point in the history
  5. tools: fix execvp: printf: Argument list too long

    When statically linking quictls/openssl 3.0.0alpha17 there are a number
    of architectures that error with the following message:
    
    execvp: printf: Argument list too long
    
    This commit adds a patch provided in
    nodejs#9137 to see if this will address
    this issue.
    
    Refs: nodejs#9137 (comment)
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    4e7b938 View commit details
    Browse the repository at this point in the history
  6. deps: add aix64-gcc-as architecture and p2align callback

    This commit adds an architecture named aix64-gcc-as which can generate
    assembler source code compatible with AIX assembler (as) instead of the
    GNU Assembler (gas). This architecture name is then used in a callback
    for the .p2align directive which is not available in AIX as.
    
    The motivation for this addition came out of an issue we ran into when
    working on upgrading OpenSSL in Node.js. We ran into the following
    compilation error on one of the CI machines that uses AIX:
    
    05:39:05 Assembler:
    05:39:05 crypto/bn/ppc64-mont-fixed.s: line 4: Error In Syntax
    
    This machine is using AIX Version 7.2 and does not have gas installed
    and the .p2align directive is causing this error. After asking around if
    it would be possible to install GAS on this machine I learned that AIX
    GNU utils are not maintained as well as the native AIX ones and we
    (Red Hat/IBM) have run into issues with the GNU utils in the past and if
    possible it would be preferable to be able to use the AIX native
    assembler.
    
    Refs: nodejs#38512
    
    Reviewed-by: Tomas Mraz <tomas@openssl.org>
    Reviewed-by: Paul Dale <pauli@openssl.org>
    (Merged from openssl/openssl#15638)
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    f925654 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2b1d3ab View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2061560 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    31b25f2 View commit details
    Browse the repository at this point in the history
  10. build: add fips target and fipsinstall action

    This commit adds an action to build and install the FIPS module and also
    run the fipsinstall action to generate the FIPS configuration file.
    
    The fipsinstall action also copies the openssl.cnf and updates the FIPS
    include to have the correct path, and also enables the FIPS section.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    88fa91b View commit details
    Browse the repository at this point in the history
  11. tools,build: add PRODUCT_DIR_ABS default gyp var

    This commit adds a default variable named PRODUCT_DIR_ABS which contains
    the absolute path to the configured output and buildtype (Release/Debug)
    directory.
    
    The motivation for adding this instead of using PRODUCT_DIR is that the
    value of PRODUCT_DIR is a ${builddir} variable which is fine in most
    situations. The use case we ran into was where we wanted to add a
    defines for OpenSSL 3.0 MODULESDIR macro. I this case we want the value
    would ${builddir} would be escaped into $${builddir} which would not be
    resolved when passed with -DMODULEDIR, so the actual value would
    contain the variable ${buildtype} instead of an actual path.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    d42fbb5 View commit details
    Browse the repository at this point in the history
  12. build: use PRODUCT_DIR_ABS for MODULESDIR

    This commit updates the MODULESDIR value to be the absolute path to the
    modules directoy in the build output directory.
    
    The motivation for this that it allows us to not have to specify the
    environment variable OPENSSL_MODULES when running node and enabling
    FIPS.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    f513ee6 View commit details
    Browse the repository at this point in the history
  13. deps: set OPENSSLDIR to obj_dir_abs/deps/openssl

    This commit sets OPENSSLDIR to point to the build directory so that
    OPENSSL_CONF does not have to be set as an environment variable.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    a342a3a View commit details
    Browse the repository at this point in the history
  14. build: add an action to revert openssl.cnf

    This commit adds an action that is run when openssl-is-fips is not
    specified and overwrites openssl.cnf as this would otherwise cause and
    error if the fips configuration is left from an earlier configuration.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    70193c7 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    7466e13 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    1f2d021 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    e5180c8 View commit details
    Browse the repository at this point in the history
  18. test: use modulus size of 512 for OpenSSL3

    This commit sets the modulus size to be 512 instead of 1024 for OpenSSL3
    as this causes centos7-64-gcc8 CI job to timeout when running this test.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    c4db85e View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    8c182ad View commit details
    Browse the repository at this point in the history
  20. deps: fix include_no-asm template

    This commit fixes an issue which involves the no-asm include template
    and the generate_headers.pl script. This issue was that the no-asm
    template was not being used so and this would cause build issues.
    
    Also the template itself needed to be updated to include VC-WIN64-ARM.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    b6ebe23 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    47987da View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    cf7a0c2 View commit details
    Browse the repository at this point in the history
  23. build,tools: remove openssl_fips and config_fips.gypi

    This commit removes the configuration option openssl_fips and also the
    gyp file which was used with earlier versions of OpenSSL and FIPS.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    36df15e View commit details
    Browse the repository at this point in the history
  24. doc: update BUILDING.md with static FIPS section

    This commit adds a section with information about enabling FIPS support
    when statically linking.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    d88ee14 View commit details
    Browse the repository at this point in the history
  25. src,tools: include new quic.h header

    This commit updates the node_metadata.{cc,h} to include openssl/quic.h
    which was recently added in quictls/openssl. Previously this was part of
    the generated openssl/crypto.h but has been moved out in
    Commit 5517e642fc2a531666c909aae0180e9d258d539e ("QUIC: Don't muck with
    FIPS checksums")
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    4790e49 View commit details
    Browse the repository at this point in the history
  26. deps: upgrade openssl sources to quictls/openssl-3.0.0+quic

    This updates all sources in deps/openssl/openssl by:
        $ git clone git@github.com:quictls/openssl.git
        $ cd node/deps/openssl
        $ rm -rf openssl
        $ cp -R ../openssl openssl
        $ rm -rf openssl/.git* openssl/.travis*
        $ git add --all openssl
        $ git commit openssl
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    8022a2e View commit details
    Browse the repository at this point in the history
  27. deps: update archs files for quictls/openssl-3.0.0+quic

    After an OpenSSL source update, all the config files need to be
    regenerated and committed by:
        $ make -C deps/openssl/config
        $ git add deps/openssl/config/archs
        $ git add deps/openssl/openssl
        $ git commit
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    e2f2a93 View commit details
    Browse the repository at this point in the history
  28. deps: regenerate linux64-riscv64 arch files

    This commit updates the linux64-riscv64 arch files by running make
    linux64-riscv64 followed by a make generate_headers so that these files
    are generated for OpenSSL 3.0.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    4297b2a View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    c7795e9 View commit details
    Browse the repository at this point in the history
  30. squash! tools,build: add PRODUCT_DIR_ABS default gyp var

    Remove semicolon.
    danbev committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    07ded8b View commit details
    Browse the repository at this point in the history