Sha256: 5bbc6ecd1b78a0192dda9776f3a6bd5afd3c0ae142c3f282762f6d60f3be6132

Contents?: true

Size: 616 Bytes

Versions: 5

Compression:

Stored size: 616 Bytes

Contents

'use strict';

const common = require('../common');
const assert = require('assert');

if (!common.hasCrypto) {
  common.skip('missing crypto');
  return;
}

// Ensure accessing ._external doesn't hit an assert in the accessor method.
const tls = require('tls');
{
  const pctx = tls.createSecureContext().context;
  const cctx = Object.create(pctx);
  assert.throws(() => cctx._external, /incompatible receiver/);
  pctx._external;
}
{
  const pctx = tls.createSecurePair().credentials.context;
  const cctx = Object.create(pctx);
  assert.throws(() => cctx._external, /incompatible receiver/);
  pctx._external;
}

Version data entries

5 entries across 4 versions & 1 rubygems

Version Path
node-compiler-0.9.1 vendor/node/test/parallel/test-tls-external-accessor.js
node-compiler-0.9.0 vendor/node-v7.2.1/test/parallel/test-tls-external-accessor.js
node-compiler-0.8.0 vendor/node-v7.2.0/test/parallel/test-tls-external-accessor.js
node-compiler-0.7.0 vendor/node-v6.9.1/test/parallel/test-tls-external-accessor.js
node-compiler-0.7.0 vendor/node-v7.1.0/test/parallel/test-tls-external-accessor.js