| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 72f5216 commit d173604
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,12 +7,13 @@ if (!common.hasCrypto) | |||
| 7 | 7 | const assert = require('assert'); | |
| 8 | 8 | const tls = require('tls'); | |
| 9 | 9 | const fixtures = require('../common/fixtures'); | |
| 10 | + const { hasOpenSSL } = require('../common/crypto'); | ||
| 10 | 11 | ||
| 11 | 12 | { | |
| 12 | 13 | const options = { | |
| 13 | 14 | key: fixtures.readKey('agent2-key.pem'), | |
| 14 | 15 | cert: fixtures.readKey('agent2-cert.pem'), | |
| 15 | - ciphers: 'aes256-sha' | ||
| 16 | + ciphers: 'DES-CBC-SHA' | ||
| 16 | 17 | }; | |
| 17 | 18 | assert.throws(() => tls.createServer(options, common.mustNotCall()), | |
| 18 | 19 | /no[_ ]cipher[_ ]match/i); | |
@@ -23,3 +24,19 @@ const fixtures = require('../common/fixtures'); | |||
| 23 | 24 | assert.throws(() => tls.createServer(options, common.mustNotCall()), | |
| 24 | 25 | /no[_ ]cipher[_ ]match/i); | |
| 25 | 26 | } | |
| 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 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments