| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6615fe5 commit fc43c68
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,6 +61,9 @@ const hasOpenSSL3 = hasCrypto && | |||
| 61 | 61 | const hasOpenSSL31 = hasCrypto && | |
| 62 | 62 | require('crypto').constants.OPENSSL_VERSION_NUMBER >= 0x30100000; | |
| 63 | 63 | ||
| 64 | + const hasOpenSSL32 = hasCrypto && | ||
| 65 | + require('crypto').constants.OPENSSL_VERSION_NUMBER >= 0x30200000; | ||
| 66 | + | ||
| 64 | 67 | const hasQuic = hasCrypto && !!process.config.variables.openssl_quic; | |
| 65 | 68 | ||
| 66 | 69 | function parseTestFlags(filename = process.argv[1]) { | |
@@ -902,6 +905,7 @@ const common = { | |||
| 902 | 905 | hasCrypto, | |
| 903 | 906 | hasOpenSSL3, | |
| 904 | 907 | hasOpenSSL31, | |
| 908 | + hasOpenSSL32, | ||
| 905 | 909 | hasQuic, | |
| 906 | 910 | hasMultiLocalhost, | |
| 907 | 911 | invalidArgTypeHelper, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,6 +26,8 @@ const server = tls.createServer(options, (c) => { | |||
| 26 | 26 | }, common.mustNotCall()); | |
| 27 | 27 | ||
| 28 | 28 | c.on('error', common.mustCall((err) => { | |
| 29 | - assert.strictEqual(err.code, 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'); | ||
| 29 | + const expectedErr = common.hasOpenSSL32 ? | ||
| 30 | + 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE' : 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'; | ||
| 31 | + assert.strictEqual(err.code, expectedErr); | ||
| 30 | 32 | })); | |
| 31 | 33 | })); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,9 +62,11 @@ test({ psk: USERS.UserA, identity: 'UserA' }, { minVersion: 'TLSv1.3' }); | |||
| 62 | 62 | test({ psk: USERS.UserB, identity: 'UserB' }); | |
| 63 | 63 | test({ psk: USERS.UserB, identity: 'UserB' }, { minVersion: 'TLSv1.3' }); | |
| 64 | 64 | // Unrecognized user should fail handshake | |
| 65 | - test({ psk: USERS.UserB, identity: 'UserC' }, {}, | ||
| 66 | - 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'); | ||
| 65 | + const expectedHandshakeErr = common.hasOpenSSL32 ? | ||
| 66 | + 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE' : 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'; | ||
| 67 | + test({ psk: USERS.UserB, identity: 'UserC' }, {}, expectedHandshakeErr); | ||
| 67 | 68 | // Recognized user but incorrect secret should fail handshake | |
| 68 | - test({ psk: USERS.UserA, identity: 'UserB' }, {}, | ||
| 69 | - 'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER'); | ||
| 69 | + const expectedIllegalParameterErr = common.hasOpenSSL32 ? | ||
| 70 | + 'ERR_SSL_SSL/TLS_ALERT_ILLEGAL_PARAMETER' : 'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER'; | ||
| 71 | + test({ psk: USERS.UserA, identity: 'UserB' }, {}, expectedIllegalParameterErr); | ||
| 70 | 72 | test({ psk: USERS.UserB, identity: 'UserB' }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments