GeezerVison is showing github.com — test: account for OpenSSL 4.x changes · nodejs/node@47437d9
File tree
Expand file treeCollapse file tree
Open diff view settings
openssl-client-cert-engine
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: test/addons/openssl-client-cert-engine/test.js +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,6 +5,11 @@ const fixture = require('../../common/fixtures'); |
5 | 5 | if (!common.hasCrypto) |
6 | 6 | common.skip('missing crypto'); |
7 | 7 |
|
| 8 | +const { hasOpenSSL } = require('../../common/crypto'); |
| 9 | + |
| 10 | +if (hasOpenSSL(4)) |
| 11 | + common.skip('OpenSSL 4 does not support engines'); |
| 12 | + |
8 | 13 | const fs = require('fs'); |
9 | 14 | const path = require('path'); |
10 | 15 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: test/addons/openssl-key-engine/test.js +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,6 +5,11 @@ const fixture = require('../../common/fixtures'); |
5 | 5 | if (!common.hasCrypto) |
6 | 6 | common.skip('missing crypto'); |
7 | 7 |
|
| 8 | +const { hasOpenSSL } = require('../../common/crypto'); |
| 9 | + |
| 10 | +if (hasOpenSSL(4)) |
| 11 | + common.skip('OpenSSL 4 does not support engines'); |
| 12 | + |
8 | 13 | const fs = require('fs'); |
9 | 14 | const path = require('path'); |
10 | 15 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-x509-escaping.js +3-4Lines changed: 3 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -472,7 +472,7 @@ const { hasOpenSSL, isBoringSSL } = require('../common/crypto'); |
472 | 472 | })).unref(); |
473 | 473 | } |
474 | 474 |
|
475 | | -// The subject MUST NOT be ignored if no dNSName subject alternative name |
| 475 | +// TLS MUST NOT ignore the subject if no dNSName subject alternative name |
476 | 476 | // exists, even if other subject alternative names exist. |
477 | 477 | { |
478 | 478 | const key = fixtures.readKey('irrelevant_san_correct_subject-key.pem'); |
@@ -485,13 +485,12 @@ const { hasOpenSSL, isBoringSSL } = require('../common/crypto'); |
485 | 485 | assert.strictEqual(certX509.subjectAltName, 'IP Address:1.2.3.4'); |
486 | 486 |
|
487 | 487 | // The newer X509Certificate API allows customizing this behavior: |
488 | | - const cnFallback = isBoringSSL ? undefined : |
489 | | - servername; |
| 488 | + const cnFallback = isBoringSSL || hasOpenSSL(4, 1) ? undefined : servername; |
490 | 489 | assert.strictEqual(certX509.checkHost(servername), cnFallback); |
491 | 490 | assert.strictEqual(certX509.checkHost(servername, { subject: 'default' }), |
492 | 491 | cnFallback); |
493 | 492 | assert.strictEqual(certX509.checkHost(servername, { subject: 'always' }), |
494 | | - cnFallback); |
| 493 | + isBoringSSL ? undefined : servername); |
495 | 494 | assert.strictEqual(certX509.checkHost(servername, { subject: 'never' }), |
496 | 495 | undefined); |
497 | 496 |
|
|