GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — crypto: use `OPENSSL_SIZE_T` instead of hard coding `int` by aduh95 · Pull Request #66752 · nodejs/node

Conversation

@aduh95

@aduh95 aduh95 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

This fixes the following warnings when building against boringssl:

[246](https://github.com/nodejs/node/actions/runs/38704739303/job/116321775602?pr=66751#step:8:1247) ../../src/crypto/crypto_common.cc: In function 'ncrypto::StackOfX509 node::crypto::{anonymous}::CloneSSLCerts(ncrypto::X509Pointer&&, const stack_st_X509*)':
../../src/crypto/crypto_common.cc:93:21: error: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Werror=sign-compare]
93 | for (int i = 0; i < sk_X509_num(ssl_certs); i++) {
| ~~^~~~~~~~~~~~~~~~~~~~~~~~
../../src/crypto/crypto_common.cc: In function 'v8::MaybeLocal<v8::Object> node::crypto::{anonymous}::AddIssuerChainToObject(ncrypto::X509Pointer*, v8::Local<v8::Object>, ncrypto::StackOfX509&&, node::Environment*)':
../../src/crypto/crypto_common.cc:110:19: error: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Werror=sign-compare]
110 | for (i = 0; i < sk_X509_num(peer_certs.get()); i++) {
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/crypto/crypto_common.cc:133:11: error: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Werror=sign-compare]
133 | if (i == sk_X509_num(peer_certs.get()))
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aduh95
crypto: use OPENSSL_SIZE_T instead of hard coding int
e437aa9
Signed-off-by: Antoine du Hamel <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Oct 15, 2026
@aduh95 aduh95 mentioned this pull request Oct 15, 2026
tools: add --error-on-warn configure flag in test-shared.yml #66751
Merged
panva
panva approved these changes Oct 15, 2026
View reviewed changes
pimterry
pimterry approved these changes Oct 15, 2026
View reviewed changes
@panva panva added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Oct 15, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 15, 2026
@nodejs-github-bot

nodejs-github-bot commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78403/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.48%. Comparing base (49ad950) to head (e437aa9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66752      +/-   ##
==========================================
- Coverage   90.49%   90.48%   -0.01%     
==========================================
  Files         797      797              
  Lines      277494   277495       +1     
  Branches    53321    53331      +10     
==========================================
- Hits       251115   251097      -18     
+ Misses      16802    16797       -5     
- Partials     9577     9601      +24     
Files with missing lines Coverage Δ
src/crypto/crypto_common.cc 78.46% <100.00%> (ø)
src/crypto/crypto_context.cc 71.49% <100.00%> (ø)
src/crypto/crypto_hash.cc 69.01% <100.00%> (-0.39%) ⬇️
src/crypto/crypto_x509.cc 73.07% <100.00%> (+0.03%) ⬆️

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva added the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 15, 2026
@dsanders11 dsanders11 mentioned this pull request Oct 15, 2026
chore: rework BoringSSL with Node.js incompatibilities patch electron/electron#55037
Merged
4 tasks done
dsanders11 added a commit to electron/electron that referenced this pull request Oct 16, 2026
@dsanders11 @claude
chore: rework BoringSSL with Node.js incompatibilities patch (#55037)
deec352
* chore: adopt nodejs/node#66752 in BoringSSL node patch

Rework fix_handle_boringssl_and_openssl_incompatibilities.patch to carry
the OPENSSL_SIZE_T changes from nodejs/node#66752
verbatim instead of Electron's own size_t edits, so the patch drops out
cleanly once Electron updates to a Node.js version that includes it.

Also drop the `#if 0` guards in src/node_metadata.h and
src/node_options.h, restoring upstream's `#if HAVE_OPENSSL`. BoringSSL
provides the OpenSSL headers they include and the quic guard keeps
openssl/quic.h out, so the guards are no longer needed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

* fix: add BoringSSL include path to node snapshot targets

With the `#if 0` guards gone, src/node_options.h and src/node_metadata.h
include <openssl/opensslv.h> and <openssl/crypto.h> again whenever
HAVE_OPENSSL is set. The :node_snapshot and :node_snapshot_stub source
sets get HAVE_OPENSSL=1 from :node_internal_config but did not depend on
//third_party/boringssl, so they had no BoringSSL include path and the
Windows build failed with "'openssl/opensslv.h' file not found" when
compiling node_snapshot.cc.

Depend on //third_party/boringssl from both targets when
node_use_openssl is set, so they see the same headers as libnode.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

* chore: use $node_openssl_path for node snapshot OpenSSL dep

Depend on "$node_openssl_path" rather than hard-coding
//third_party/boringssl in the :node_snapshot and :node_snapshot_stub
targets, matching how upstream's unofficial.gni references OpenSSL.
Electron sets node_openssl_path = "//third_party/boringssl" in
build/args/all.gn, so the resolved dependency is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

---------

Co-authored-by: Claude <[email protected]>
MarshallOfSound pushed a commit to electron/electron that referenced this pull request Oct 16, 2026
@claude @claude
chore: rework BoringSSL with Node.js incompatibilities patch (#55041)
fd766ab
chore: rework BoringSSL with Node.js incompatibilities patch (#55037)

* chore: adopt nodejs/node#66752 in BoringSSL node patch

Rework fix_handle_boringssl_and_openssl_incompatibilities.patch to carry
the OPENSSL_SIZE_T changes from nodejs/node#66752
verbatim instead of Electron's own size_t edits, so the patch drops out
cleanly once Electron updates to a Node.js version that includes it.

Also drop the `#if 0` guards in src/node_metadata.h and
src/node_options.h, restoring upstream's `#if HAVE_OPENSSL`. BoringSSL
provides the OpenSSL headers they include and the quic guard keeps
openssl/quic.h out, so the guards are no longer needed.


Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

* fix: add BoringSSL include path to node snapshot targets

With the `#if 0` guards gone, src/node_options.h and src/node_metadata.h
include <openssl/opensslv.h> and <openssl/crypto.h> again whenever
HAVE_OPENSSL is set. The :node_snapshot and :node_snapshot_stub source
sets get HAVE_OPENSSL=1 from :node_internal_config but did not depend on
//third_party/boringssl, so they had no BoringSSL include path and the
Windows build failed with "'openssl/opensslv.h' file not found" when
compiling node_snapshot.cc.

Depend on //third_party/boringssl from both targets when
node_use_openssl is set, so they see the same headers as libnode.


Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

* chore: use $node_openssl_path for node snapshot OpenSSL dep

Depend on "$node_openssl_path" rather than hard-coding
//third_party/boringssl in the :node_snapshot and :node_snapshot_stub
targets, matching how upstream's unofficial.gni references OpenSSL.
Electron sets node_openssl_path = "//third_party/boringssl" in
build/args/all.gn, so the resolved dependency is unchanged.


Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

---------



(cherry picked from commit deec352)


Claude-Session: https://claude.ai/code/session_01FEtfbdwkKabsmYWAF8Sqsw

Co-authored-by: Claude <[email protected]>
MarshallOfSound pushed a commit to electron/electron that referenced this pull request Oct 16, 2026
@claude @claude
chore: rework BoringSSL with Node.js incompatibilities patch (#55040)
723d9f1
chore: rework BoringSSL with Node.js incompatibilities patch (#55037)

* chore: adopt nodejs/node#66752 in BoringSSL node patch

Rework fix_handle_boringssl_and_openssl_incompatibilities.patch to carry
the OPENSSL_SIZE_T changes from nodejs/node#66752
verbatim instead of Electron's own size_t edits, so the patch drops out
cleanly once Electron updates to a Node.js version that includes it.

Also drop the `#if 0` guards in src/node_metadata.h and
src/node_options.h, restoring upstream's `#if HAVE_OPENSSL`. BoringSSL
provides the OpenSSL headers they include and the quic guard keeps
openssl/quic.h out, so the guards are no longer needed.


Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

* fix: add BoringSSL include path to node snapshot targets

With the `#if 0` guards gone, src/node_options.h and src/node_metadata.h
include <openssl/opensslv.h> and <openssl/crypto.h> again whenever
HAVE_OPENSSL is set. The :node_snapshot and :node_snapshot_stub source
sets get HAVE_OPENSSL=1 from :node_internal_config but did not depend on
//third_party/boringssl, so they had no BoringSSL include path and the
Windows build failed with "'openssl/opensslv.h' file not found" when
compiling node_snapshot.cc.

Depend on //third_party/boringssl from both targets when
node_use_openssl is set, so they see the same headers as libnode.


Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

* chore: use $node_openssl_path for node snapshot OpenSSL dep

Depend on "$node_openssl_path" rather than hard-coding
//third_party/boringssl in the :node_snapshot and :node_snapshot_stub
targets, matching how upstream's unofficial.gni references OpenSSL.
Electron sets node_openssl_path = "//third_party/boringssl" in
build/args/all.gn, so the resolved dependency is unchanged.


Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

---------



(cherry picked from commit deec352)


Claude-Session: https://claude.ai/code/session_01FEtfbdwkKabsmYWAF8Sqsw

Co-authored-by: Claude <[email protected]>
MarshallOfSound pushed a commit to electron/electron that referenced this pull request Oct 16, 2026
@claude @claude
chore: rework BoringSSL with Node.js incompatibilities patch (#55039)
a949e33
chore: rework BoringSSL with Node.js incompatibilities patch (#55037)

* chore: adopt nodejs/node#66752 in BoringSSL node patch

Rework fix_handle_boringssl_and_openssl_incompatibilities.patch to carry
the OPENSSL_SIZE_T changes from nodejs/node#66752
verbatim instead of Electron's own size_t edits, so the patch drops out
cleanly once Electron updates to a Node.js version that includes it.

Also drop the `#if 0` guards in src/node_metadata.h and
src/node_options.h, restoring upstream's `#if HAVE_OPENSSL`. BoringSSL
provides the OpenSSL headers they include and the quic guard keeps
openssl/quic.h out, so the guards are no longer needed.


Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

* fix: add BoringSSL include path to node snapshot targets

With the `#if 0` guards gone, src/node_options.h and src/node_metadata.h
include <openssl/opensslv.h> and <openssl/crypto.h> again whenever
HAVE_OPENSSL is set. The :node_snapshot and :node_snapshot_stub source
sets get HAVE_OPENSSL=1 from :node_internal_config but did not depend on
//third_party/boringssl, so they had no BoringSSL include path and the
Windows build failed with "'openssl/opensslv.h' file not found" when
compiling node_snapshot.cc.

Depend on //third_party/boringssl from both targets when
node_use_openssl is set, so they see the same headers as libnode.


Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

* chore: use $node_openssl_path for node snapshot OpenSSL dep

Depend on "$node_openssl_path" rather than hard-coding
//third_party/boringssl in the :node_snapshot and :node_snapshot_stub
targets, matching how upstream's unofficial.gni references OpenSSL.
Electron sets node_openssl_path = "//third_party/boringssl" in
build/args/all.gn, so the resolved dependency is unchanged.


Claude-Session: https://claude.ai/code/session_01XoTevKUU5Yqx5KULydnHjv

---------



(cherry picked from commit deec352)


Claude-Session: https://claude.ai/code/session_01FEtfbdwkKabsmYWAF8Sqsw

Co-authored-by: Claude <[email protected]>
@nodejs-github-bot
nodejs-github-bot merged commit b5b07a0 into nodejs:main Oct 17, 2026
86 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Landed in b5b07a0

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 17, 2026
@aduh95
aduh95 deleted the OPENSSL_SIZE_T branch October 17, 2026 09:33
@aduh95 aduh95 mentioned this pull request Oct 21, 2026
crypto: use OPENSSL_SIZE_T instead of hard coding int #66889
Merged
@panva panva mentioned this pull request Oct 21, 2026
crypto: fix BoringSSL RSA-PSS macro redefinitions #66900
Merged
@aduh95 aduh95 mentioned this pull request Oct 27, 2026
2026-10-28, Version 27.0.0-alpha.0.0.0 (Alpha) #67062
Merged
aduh95 added a commit that referenced this pull request Nov 12, 2026
@aduh95
crypto: use OPENSSL_SIZE_T instead of hard coding int
3f012c2
Signed-off-by: Antoine du Hamel <[email protected]>
PR-URL: #66752
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 20, 2026
2026-11-30, Version 26.14.0 'Lithium' (LTS) #67664
Open
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@aduh95 @gabylb
crypto: use OPENSSL_SIZE_T instead of hard coding int
390ee8e
Signed-off-by: Antoine du Hamel <[email protected]>
PR-URL: nodejs#66752
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@panva panva panva approved these changes
@pimterry pimterry pimterry approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@aduh95 @nodejs-github-bot @panva @pimterry
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.