mirror of
https://github.com/nodejs/node.git
synced 2025-05-01 08:42:45 +00:00

Remove compile-time and run-time conditionals for features that OpenSSL 1.0.0 and 1.0.1 didn't support: ALPN, OCSP and/or SNI. They are no longer necessary since our baseline is OpenSSL 1.0.2. PR-URL: https://github.com/nodejs/node/pull/21094 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
15 lines
383 B
JavaScript
15 lines
383 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
const assert = require('assert');
|
|
const tls = require('tls');
|
|
|
|
['fhqwhgads', 42, {}, []].forEach((testValue) => {
|
|
assert.throws(
|
|
() => { tls.createServer({ SNICallback: testValue }); },
|
|
{ code: 'ERR_INVALID_ARG_TYPE', message: /\boptions\.SNICallback\b/ }
|
|
);
|
|
});
|