Skip to content

Commit fe6a4cd

Browse files
panvanodejs-github-bot
authored andcommitted
crypto: harden X509Certificate state
Construct X509Certificate instances directly on the existing native X.509 wrapper and keep lazy cached values in private state. Use a non-throwing native brand check while preserving the existing structured-clone behavior. Preserve derived-constructor prototype semantics without rereading new.target.prototype. Add coverage for receiver validation, hidden state, prototype edge cases, subclassing, and structured cloning through workers and message ports. Replace the key-only instanceof lint rule with a module-aware crypto class guard and extend it to X509Certificate. Resolve references by lexical binding so shadowed constructor names remain valid. Signed-off-by: Filip Skokan <panva.ip@gmail.com> PR-URL: #65518 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 3541d5d commit fe6a4cd

14 files changed

Lines changed: 1056 additions & 480 deletions

lib/eslint.config_partial.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ export default [
445445
'node-core/lowercase-name-for-primitive': 'error',
446446
'node-core/non-ascii-character': 'error',
447447
'node-core/no-array-destructuring': 'error',
448+
'node-core/no-crypto-class-instanceof': 'error',
448449
'node-core/no-cryptokey-public-accessors': 'error',
449-
'node-core/no-keyobject-cryptokey-instanceof': 'error',
450450
'node-core/no-keyobject-public-accessors': 'error',
451451
'node-core/prefer-primordials': [
452452
'error',

0 commit comments

Comments
 (0)