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 — v8: support X509Certificate serialization by panva · Pull Request #67083 · nodejs/node

Conversation

@panva

@panva panva commented Oct 28, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

v8.serialize() currently rejects X509Certificate objects. Add a host object encoding containing the certificate's DER snapshot, including its issuerCertificate chain, and reconstruct fresh X509Certificate objects in v8.deserialize().

Read the stored snapshot rather than the cached raw Buffer, which can be modified by callers. Decode each certificate independently without imposing issuer relationships on the serialized sequence.

This is PR 3 out of 4 in an X.509 series addressing #48730 and #51169. (it can land independently of PR 2 https://redirect.github.com/nodejs/node/pull/67082)

Sorry, something went wrong.

Uh oh!

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

All reactions
@panva
v8: support X509Certificate serialization
586410f
v8.serialize() currently rejects X509Certificate objects. Add a host
object encoding containing the certificate's DER snapshot, including
its issuerCertificate chain, and reconstruct fresh X509Certificate
objects in v8.deserialize().

Read the stored snapshot rather than the cached raw Buffer, which can
be modified by callers. Decode each certificate independently without
imposing issuer relationships on the serialized sequence.

Assisted-by: Codex
Signed-off-by: Filip Skokan <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented Oct 28, 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. typings Issues and PRs related to internal TypeScript declarations. v8 module Issues and PRs related to the node:v8 module. labels Oct 28, 2026
@panva
panva requested review from jasnell and pimterry October 28, 2026 13:54
@codecov

codecov Bot commented Oct 28, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.59184% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.65%. Comparing base (663f666) to head (586410f).
⚠️ Report is 94 commits behind head on main.

Files with missing lines Patch % Lines
src/crypto/crypto_x509.cc 68.91% 10 Missing and 13 partials ⚠️
lib/internal/crypto/x509.js 75.00% 4 Missing ⚠️
lib/v8.js 94.73% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67083      +/-   ##
==========================================
- Coverage   90.65%   90.65%   -0.01%     
==========================================
  Files         797      797              
  Lines      278593   278740     +147     
  Branches    53570    53610      +40     
==========================================
+ Hits       252561   252686     +125     
- Misses      16377    16383       +6     
- Partials     9655     9671      +16     
Files with missing lines Coverage Δ
src/crypto/crypto_x509.h 57.89% <ø> (+2.33%) ⬆️
lib/v8.js 98.42% <94.73%> (-0.37%) ⬇️
lib/internal/crypto/x509.js 95.77% <75.00%> (-0.77%) ⬇️
src/crypto/crypto_x509.cc 71.54% <68.91%> (+<0.01%) ⬆️

... and 29 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 request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. and removed request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Oct 28, 2026
@panva
panva requested review from addaleax and joyeecheung November 3, 2026 15:06
anonrig
anonrig approved these changes Nov 3, 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 Nov 3, 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 Nov 3, 2026
@nodejs-github-bot

nodejs-github-bot commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

pimterry
pimterry approved these changes Nov 3, 2026
View reviewed changes
Comment thread lib/v8.js
if (typeIndex === kX509CertificateHostObject) {
const count = this.readUint32();
if (!hasOpenSSL || count === 0) {
throw new ERR_INVALID_STATE('Invalid serialized X509Certificate');

@pimterry pimterry Nov 3, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: in the !hasOpenSSL case this error message is wrong. The cert is valid (probably) we just can't read it.

Sorry, something went wrong.

Uh oh!

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

All reactions
@panva panva added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 4, 2026
@nodejs-github-bot
nodejs-github-bot merged commit d36e9ba into nodejs:main Nov 4, 2026
96 checks passed

Uh oh!

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

@nodejs-github-bot

nodejs-github-bot commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Landed in d36e9ba

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 Nov 4, 2026
@panva
panva deleted the x509-v8-serialization branch November 4, 2026 05:58
@Hakaou Hakaou mentioned this pull request Nov 9, 2026
v8: keep immutable ArrayBuffer views immutable #66936
Open
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@panva @aduh95
v8: support X509Certificate serialization
ec1e1e3
v8.serialize() currently rejects X509Certificate objects. Add a host
object encoding containing the certificate's DER snapshot, including
its issuerCertificate chain, and reconstruct fresh X509Certificate
objects in v8.deserialize().

Read the stored snapshot rather than the cached raw Buffer, which can
be modified by callers. Decode each certificate independently without
imposing issuer relationships on the serialized sequence.

Assisted-by: Codex
Signed-off-by: Filip Skokan <[email protected]>
PR-URL: #67083
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 11, 2026
2026-11-12, Version 27.0.0-alpha.0.1.0 (Alpha) #67415
Merged
aduh95 pushed a commit that referenced this pull request Nov 12, 2026
@panva @aduh95
v8: support X509Certificate serialization
d756ec0
v8.serialize() currently rejects X509Certificate objects. Add a host
object encoding containing the certificate's DER snapshot, including
its issuerCertificate chain, and reconstruct fresh X509Certificate
objects in v8.deserialize().

Read the stored snapshot rather than the cached raw Buffer, which can
be modified by callers. Decode each certificate independently without
imposing issuer relationships on the serialized sequence.

Assisted-by: Codex
Signed-off-by: Filip Skokan <[email protected]>
PR-URL: #67083
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 12, 2026
@panva @aduh95
v8: support X509Certificate serialization
43b8f56
v8.serialize() currently rejects X509Certificate objects. Add a host
object encoding containing the certificate's DER snapshot, including
its issuerCertificate chain, and reconstruct fresh X509Certificate
objects in v8.deserialize().

Read the stored snapshot rather than the cached raw Buffer, which can
be modified by callers. Decode each certificate independently without
imposing issuer relationships on the serialized sequence.

Assisted-by: Codex
Signed-off-by: Filip Skokan <[email protected]>
PR-URL: #67083
Reviewed-By: Yagiz Nizipli <[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
@panva @gabylb
v8: support X509Certificate serialization
24e7eda
v8.serialize() currently rejects X509Certificate objects. Add a host
object encoding containing the certificate's DER snapshot, including
its issuerCertificate chain, and reconstruct fresh X509Certificate
objects in v8.deserialize().

Read the stored snapshot rather than the cached raw Buffer, which can
be modified by callers. Decode each certificate independently without
imposing issuer relationships on the serialized sequence.

Assisted-by: Codex
Signed-off-by: Filip Skokan <[email protected]>
PR-URL: nodejs#67083
Reviewed-By: Yagiz Nizipli <[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

@pimterry pimterry pimterry approved these changes
@anonrig anonrig anonrig approved these changes
@jasnell jasnell Awaiting requested review from jasnell
@addaleax addaleax Awaiting requested review from addaleax
@joyeecheung joyeecheung Awaiting requested review from joyeecheung

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. typings Issues and PRs related to internal TypeScript declarations. v8 module Issues and PRs related to the node:v8 module.

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

@panva @nodejs-github-bot @pimterry @anonrig
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.