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: clarify missing cipher error · nodejs/node@fde8523

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/crypto
    • keys.js
  • test/parallel
    • test-crypto-key-objects.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/crypto/keys.js‎

Copy file name to clipboardExpand all lines: lib/internal/crypto/keys.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,9 @@ function parseKeyEncoding(enc, keyType, isPublic, objName) {
479479
encodingNames[type], 'does not support encryption');
480480
}
481481
} else if (passphrase !== undefined) {
482-
throw new ERR_INVALID_ARG_VALUE(option('cipher', objName), cipher);
482+
throw new ERR_INVALID_ARG_VALUE(
483+
option('cipher', objName), cipher,
484+
'is required when a passphrase is specified');
483485
}
484486
}
485487

Collapse file

‎test/parallel/test-crypto-key-objects.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-crypto-key-objects.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,8 @@ if (!process.features.openssl_is_boringssl) {
10141014
}, {
10151015
name: 'TypeError',
10161016
code: 'ERR_INVALID_ARG_VALUE',
1017-
message: "The property 'options.cipher' is invalid. Received undefined"
1017+
message: "The property 'options.cipher' is required when a " +
1018+
'passphrase is specified. Received undefined',
10181019
});
10191020
}
10201021

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.