()
| 148 | } |
| 149 | |
| 150 | function testWrongALPN() { |
| 151 | // Incompatible ALPN TLS client |
| 152 | tls(Object.assign({ port, ALPNProtocols: ['fake'] }, clientOptions)) |
| 153 | .on('error', common.mustCall((err) => { |
| 154 | const allowedErrors = ['ECONNRESET', 'ERR_SSL_TLSV1_ALERT_NO_APPLICATION_PROTOCOL']; |
| 155 | assert.ok(allowedErrors.includes(err.code), `'${err.code}' was not one of ${allowedErrors}.`); |
| 156 | cleanup(); |
| 157 | testNoALPN(); |
| 158 | })); |
| 159 | } |
| 160 | |
| 161 | function testNoALPN() { |
| 162 | // TLS client does not send an ALPN extension |