2018-07-08 20:12:58 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const common = require('../common');
|
|
|
|
if (!common.hasCrypto)
|
|
|
|
common.skip('missing crypto');
|
|
|
|
|
|
|
|
const assert = require('assert');
|
|
|
|
const tls = require('tls');
|
|
|
|
|
|
|
|
// Ensure accessing ._external doesn't hit an assert in the accessor method.
|
|
|
|
{
|
|
|
|
const pctx = tls.createSecureContext().context;
|
2023-01-09 21:38:36 -08:00
|
|
|
const cctx = { __proto__: pctx };
|
2018-07-08 20:12:58 +00:00
|
|
|
assert.throws(() => cctx._external, TypeError);
|
2020-11-24 14:11:20 +01:00
|
|
|
pctx._external; // eslint-disable-line no-unused-expressions
|
2018-07-08 20:12:58 +00:00
|
|
|
}
|