Skip to content

Commit b2403f2

Browse files
panvanodejs-github-bot
authored andcommitted
test: accept renamed OpenSSL 4.0 error code and reason
Signed-off-by: Filip Skokan <[email protected]> PR-URL: #62805 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent e729c5f commit b2403f2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/parallel/test-tls-alert-handling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ function sendBADTLSRecord() {
9797
// Different OpenSSL versions send different TLS alerts when the peer
9898
// receives an invalid record on an established connection.
9999
assert.match(err.code,
100-
/ERR_SSL_(TLSV1_ALERT_PROTOCOL_VERSION|TLSV1_ALERT_RECORD_OVERFLOW|SSL\/TLS_ALERT_UNEXPECTED_MESSAGE)/);
100+
/ERR_SSL_(TLSV1_ALERT_PROTOCOL_VERSION|TLSV1_ALERT_RECORD_OVERFLOW|(SSL\/)?TLS_ALERT_UNEXPECTED_MESSAGE)/);
101101
assert.strictEqual(err.library, 'SSL routines');
102102
if (!hasOpenSSL3 && !process.features.openssl_is_boringssl)
103103
assert.strictEqual(err.function, 'ssl3_read_bytes');
104104
assert.match(err.reason,
105-
/tlsv1[\s_]alert[\s_]protocol[\s_]version|tlsv1[\s_]alert[\s_]record[\s_]overflow|ssl\/tls[\s_]alert[\s_]unexpected[\s_]message/i);
105+
/tlsv1[\s_]alert[\s_]protocol[\s_]version|tlsv1[\s_]alert[\s_]record[\s_]overflow|(ssl\/)?tls[\s_]alert[\s_]unexpected[\s_]message/i);
106106
}));
107107
}

0 commit comments

Comments
 (0)