Sitelet https://github.com/nodejs/node/issues/43078
Skip to content

FreeBSD openssl version string doesn't match regex test #43078

Description

@derekschrock

Test

test-process-versions

Platform

FreeBSD

Console output

assert.js:394
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(/^\d+\.\d+\.\d+[a-z]?(-fips)?$/.test(process.versions.openssl))

    at Object.<anonymous> (/usr/home/dereks/repos/node/test/parallel/test-process-versions.js:48:3)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}

Build links

No response

Additional information

node output of process.versions.openssl

> process.versions.openssl
'1.1.1k-freebsd'

It seems the regex could change to:

/^\d+\.\d+\.\d+[a-z]?(-freebsd|-fips)?$

Adding the -freebsd

Activity

  1. added
    flaky-testIssues and PRs involving tests that fail intermittently in CI.
    on May 12, 2022
  2. Trott commented on May 13, 2022

    @Trott
    Member

    Did you compile Node.js yourself? If so, what flags did you pass to ./configure?

  3. derekschrock commented on May 13, 2022

    @derekschrock
    Author

    This would have been from FreeBSD poudriere using the ports tree updated for 14.9.2 WIP. This would have used the base system openssl due to ... --shared-openssl ...

    args:

    --prefix=/usr/local  --shared-brotli  --shared-cares  --shared-libuv  --shared-nghttp2  --shared-zlib  --without-npm --openssl-use-def-ca-store  --shared-openssl --with-dtrace --with-intl=system-icu              
    

    ENV:

    MAKE=gmake PKG_CONFIG=pkgconf PYTHON="/usr/local/bin/python3.8" XDG_DATA_HOME=/wrkdirs/usr/ports/www/node14/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/www/node14/work  XDG_CACHE_HOME=/wrkdirs/usr/ports/www/node14/work/.cache  HOME=/wrkdirs/usr/ports/www/node14/work
    TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/www/node14/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin SHELL=/bin/sh CONFIG_SHELL=/bin/sh CMAKE_PREFIX_PATH="/usr/local"                                                
    
  4. Trott commented on May 13, 2022

    @Trott
    Member

    @nodejs/testing @nodejs/crypto I don't think adding the string "freebsd" is the way to go, but maybe changing the allowance for "fips" to be a general allowance of alpha or alphanumeric strings? We might also add some logic to detect built-in vs. system OpenSSL? Maybe skip the check entirely if OpenSSL is the system one, or at least make it much more lax?

  5. mhdawson commented on May 13, 2022

    @mhdawson
    Member

    I think when built with a shared openssl allowing pretty much anything for process.versions.openssl is reasonable. Maybe just require that it is defined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    flaky-testIssues and PRs involving tests that fail intermittently in CI.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions