test: update TLS tests for OpenSSL 3.2
Update the following TLS tests to account for error code changes in OpenSSL 3.2 and later.
parallel/test-tls-empty-sni-context
parallel/test-tls-psk-circuit
Refs: https://github.com/nodejs/node/issues/53382 Refs: https://github.com/openssl/openssl/pull/19950
cc @nodejs/crypto
Addresses these failures with OpenSSL 3.2:
not ok 3051 parallel/test-tls-empty-sni-context
---
duration_ms: 107.38800
severity: fail
exitcode: 1
stack: |-
node:assert:126
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE'
- 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'
at TLSSocket.<anonymous> (/home/nodejs/node/test/parallel/test-tls-empty-sni-context.js:29:12)
at TLSSocket.<anonymous> (/home/nodejs/node/test/common/index.js:466:15)
at TLSSocket.emit (node:events:520:28)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE',
expected: 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE',
operator: 'strictEqual'
}
Node.js v23.0.0-pre
...
not ok 3135 parallel/test-tls-psk-circuit
---
duration_ms: 130.16900
severity: fail
exitcode: 1
stack: |-
node:assert:126
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE'
- 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'
at TLSSocket.<anonymous> (/home/nodejs/node/test/parallel/test-tls-psk-circuit.js:52:16)
at TLSSocket.<anonymous> (/home/nodejs/node/test/common/index.js:466:15)
at TLSSocket.emit (node:events:520:28)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE',
expected: 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE',
operator: 'strictEqual'
}
Node.js v23.0.0-pre
...