Skip to content

Commit cc18241

Browse files
committed
test: openssl 3.4 returns decrypt_error upon PSK binder validation failure
According to RFC 8446 (TLS 1.3), a PSK binder validation failure should result in decrypt_error rather than illegal_parameter which openssl had been using. Update the tests to match openssl's fix. Refs: openssl/openssl@02b8b7b Refs: https://www.rfc-editor.org/rfc/rfc8446
1 parent 6372fca commit cc18241

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/parallel/test-tls-psk-circuit.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ const expectedHandshakeErr = common.hasOpenSSL(3, 2) ?
6666
'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE' : 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE';
6767
test({ psk: USERS.UserB, identity: 'UserC' }, {}, expectedHandshakeErr);
6868
// Recognized user but incorrect secret should fail handshake
69-
const expectedIllegalParameterErr = common.hasOpenSSL(3, 2) ?
70-
'ERR_SSL_SSL/TLS_ALERT_ILLEGAL_PARAMETER' : 'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER';
69+
const expectedIllegalParameterErr =
70+
common.hasOpenSSL(3, 4)
71+
? 'ERR_SSL_TLSV1_ALERT_DECRYPT_ERROR'
72+
: (common.hasOpenSSL(3, 2)
73+
? 'ERR_SSL_SSL/TLS_ALERT_ILLEGAL_PARAMETER'
74+
: 'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER');
7175
test({ psk: USERS.UserA, identity: 'UserB' }, {}, expectedIllegalParameterErr);
7276
test({ psk: USERS.UserB, identity: 'UserB' });

0 commit comments

Comments
 (0)