close
Skip to content

Node.js OpenSSL headers much larger after OpenSSL 3 switch over #42081

@richardlau

Description

@richardlau

Version

v17 and master

Platform

No response

Subsystem

build

What steps will reproduce the bug?

Download and unpack a headers package, e.g. https://nodejs.org/dist/v17.5.0/node-v17.5.0-headers.tar.gz.

How often does it reproduce? Is there a required condition?

N/A

What is the expected behavior?

No response

What do you see instead?

The size of the unpacked headers is 64 Mb whereas earlier versions, e.g. v16.14.0, are around 7 Mb.

Additional information

Noticed while tidying up disk space on one of the CI machines, nodejs/build#2695 (comment)

7.0M    .cache/node-gyp/17.0.0-nightly20211008dbc91de011
7.0M    .cache/node-gyp/17.0.0-nightly20211009879ff775d0
7.0M    .cache/node-gyp/17.0.0-nightly202110108068f40313
67M     .cache/node-gyp/17.0.0-nightly202110110cc37209fa
67M     .cache/node-gyp/17.0.0-nightly20211012a784258444
67M     .cache/node-gyp/17.0.0-nightly20211013f570109094

A cursory glance at the changes 8068f40...0cc3720 would suggest that the large increase in size was the OpenSSL 3 switchover.

An initial look suggests the differences are in include/node/openssl/archs/:

$ du -hs /tmp/node-headers/node-v16.14.0/include/node/openssl/archs/
2.7M    /tmp/node-headers/node-v16.14.0/include/node/openssl/archs/
$ du -hs /tmp/node-headers/node-v17.5.0/include/node/openssl/archs/
61M     /tmp/node-headers/node-v17.5.0/include/node/openssl/archs/
$

and looking at one arch:

$ ls /tmp/node-headers/node-v16.14.0/include/node/openssl/archs/BSD-x86/no-asm/include/openssl/ -al
total 8
drwxr-xr-x. 2 rlau rlau   27 Feb  8 07:46 .
drwxr-xr-x. 3 rlau rlau   36 Feb  8 07:46 ..
-rw-r--r--. 1 rlau rlau 4703 Oct 14 01:50 opensslconf.h
$ ls /tmp/node-headers/node-v17.5.0/include/node/openssl/archs/BSD-x86/no-asm/include/openssl/ -al
total 840
drwxr-xr-x. 2 rlau rlau   4096 Feb 10 00:10 .
drwxr-xr-x. 4 rlau rlau     50 Feb 10 00:10 ..
-rw-r--r--. 1 rlau rlau  60914 Feb  8 23:02 asn1.h
-rw-r--r--. 1 rlau rlau  35937 Feb  8 23:02 asn1t.h
-rw-r--r--. 1 rlau rlau  39689 Feb  8 23:02 bio.h
-rw-r--r--. 1 rlau rlau  40773 Feb  8 23:02 cmp.h
-rw-r--r--. 1 rlau rlau  34081 Feb  8 23:02 cms.h
-rw-r--r--. 1 rlau rlau  10485 Feb  8 23:02 conf.h
-rw-r--r--. 1 rlau rlau   3013 Feb  8 23:02 configuration.h
-rw-r--r--. 1 rlau rlau  14644 Feb  8 23:02 crmf.h
-rw-r--r--. 1 rlau rlau  23819 Feb  8 23:02 crypto.h
-rw-r--r--. 1 rlau rlau  22765 Feb  8 23:02 ct.h
-rw-r--r--. 1 rlau rlau  21089 Feb  8 23:02 err.h
-rw-r--r--. 1 rlau rlau   8968 Feb  8 23:02 ess.h
-rw-r--r--. 1 rlau rlau   1010 Feb  8 23:02 fipskey.h
-rw-r--r--. 1 rlau rlau  14061 Feb  8 23:02 lhash.h
-rw-r--r--. 1 rlau rlau  29352 Feb  8 23:02 ocsp.h
-rw-r--r--. 1 rlau rlau   4703 Oct 14 01:50 opensslconf.h
-rw-r--r--. 1 rlau rlau   3204 Feb  8 23:02 opensslv.h
-rw-r--r--. 1 rlau rlau  19316 Feb  8 23:02 pkcs12.h
-rw-r--r--. 1 rlau rlau  22333 Feb  8 23:02 pkcs7.h
-rw-r--r--. 1 rlau rlau  18439 Feb  8 23:02 safestack.h
-rw-r--r--. 1 rlau rlau  15487 Feb  8 23:02 srp.h
-rw-r--r--. 1 rlau rlau 127071 Feb  8 23:02 ssl.h
-rw-r--r--. 1 rlau rlau  19251 Feb  8 23:02 ui.h
-rw-r--r--. 1 rlau rlau  71533 Feb  8 23:02 x509.h
-rw-r--r--. 1 rlau rlau  52027 Feb  8 23:02 x509_vfy.h
-rw-r--r--. 1 rlau rlau  93966 Feb  8 23:02 x509v3.h
$

Metadata

Metadata

Assignees

Labels

buildIssues and PRs related to build files or the CI.opensslIssues and PRs related to the OpenSSL dependency.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions