◐ Shell
clean mode source ↗

test: accept renamed OpenSSL 4.0 error code and reason · nodejs/node@947f1ae

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

}