Openssl 3 with NODE_EXTRA_CA_CERTS slows down node.js v17 startup #40524
Open
Description
Version
v17.0.0
Platform
Microsoft Windows NT 10.0.19042.0 x64
Subsystem
openssl 3
What steps will reproduce the bug?
Create an empty file a.js
Have a certificate.pem file with 1 certificate.
>SET NODE_EXTRA_CA_CERTS=
>timethis node a.js
TimeThis : Command Line : node a.js
TimeThis : Start Time : Tue Oct 19 21:19:06 2021
TimeThis : Command Line : node a.js
TimeThis : Start Time : Tue Oct 19 21:19:06 2021
TimeThis : End Time : Tue Oct 19 21:19:07 2021
TimeThis : Elapsed Time : 00:00:00.110
>SET NODE_EXTRA_CA_CERTS=certificate.pem
>timethis node a.js
TimeThis : Command Line : node a.js
TimeThis : Start Time : Tue Oct 19 21:20:51 2021
TimeThis : Command Line : node a.js
TimeThis : Start Time : Tue Oct 19 21:20:51 2021
TimeThis : End Time : Tue Oct 19 21:20:51 2021
TimeThis : Elapsed Time : 00:00:00.215
How often does it reproduce? Is there a required condition?
You must set a value for NODE_EXTRA_CA_CERTS
What is the expected behavior?
>node -v
v16.11.1
>timethis node a.js
TimeThis : Command Line : node a.js
TimeThis : Start Time : Tue Oct 19 21:22:16 2021
TimeThis : Command Line : node a.js
TimeThis : Start Time : Tue Oct 19 21:22:16 2021
TimeThis : End Time : Tue Oct 19 21:22:17 2021
TimeThis : Elapsed Time : 00:00:00.115
What do you see instead?
It seems that openssl 3 slows down node.js startup.
With this empty script is 86% slower than node.js v16. With a big script, it is around 46% slower.
I don't know if this is expected, so this is a normal beaviour of openssl 3... It's strange that it only happens with EXTRA_CA_CERTS.
Additional information
No response
Activity