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 — test: use an always invalid cipher and cover OpenSSL 4.0 behaviours · nodejs/node@698d828

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-tls-set-ciphers-error.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-tls-set-ciphers-error.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-set-ciphers-error.js
+18-1Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ if (!common.hasCrypto)
77
const assert = require('assert');
88
const tls = require('tls');
99
const fixtures = require('../common/fixtures');
10+
const { hasOpenSSL } = require('../common/crypto');
1011

1112
{
1213
const options = {
1314
key: fixtures.readKey('agent2-key.pem'),
1415
cert: fixtures.readKey('agent2-cert.pem'),
15-
ciphers: 'aes256-sha'
16+
ciphers: 'DES-CBC-SHA'
1617
};
1718
assert.throws(() => tls.createServer(options, common.mustNotCall()),
1819
/no[_ ]cipher[_ ]match/i);
@@ -23,3 +24,19 @@ const fixtures = require('../common/fixtures');
2324
assert.throws(() => tls.createServer(options, common.mustNotCall()),
2425
/no[_ ]cipher[_ ]match/i);
2526
}
27+
28+
// Cipher name matching is case-sensitive prior to OpenSSL 4.0, and
29+
// case-insensitive starting with OpenSSL 4.0.
30+
{
31+
const options = {
32+
key: fixtures.readKey('agent2-key.pem'),
33+
cert: fixtures.readKey('agent2-cert.pem'),
34+
ciphers: 'aes256-sha',
35+
};
36+
if (hasOpenSSL(4, 0)) {
37+
tls.createServer(options).close();
38+
} else {
39+
assert.throws(() => tls.createServer(options, common.mustNotCall()),
40+
/no[_ ]cipher[_ ]match/i);
41+
}
42+
}

0 commit comments

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