Sha256: 2acf2c6fd294a63b0e281b87c198f374460f5cc0c70dcbcf74b5ff5f301194b3

Contents?: true

Size: 837 Bytes

Versions: 5

Compression:

Stored size: 837 Bytes

Contents

'use strict';

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

if (!common.hasCrypto) {
  common.skip('node compiled without crypto.');
  return;
}

const assert = require('assert');
const tls = require('tls');
const fs = require('fs');
const path = require('path');

const pfx = fs.readFileSync(
    path.join(common.fixturesDir, 'keys', 'agent1-pfx.pem'));

const server = tls.createServer({
  pfx: pfx,
  passphrase: 'sample',
  requestCert: true,
  rejectUnauthorized: false
}, common.mustCall(function(c) {
  assert.strictEqual(
    c.authorizationError,
    null,
    'authorizationError must be null'
  );
  c.end();
})).listen(0, function() {
  var client = tls.connect({
    port: this.address().port,
    pfx: pfx,
    passphrase: 'sample',
    rejectUnauthorized: false
  }, function() {
    client.end();
    server.close();
  });
});

Version data entries

5 entries across 4 versions & 1 rubygems

Version Path
node-compiler-0.9.1 vendor/node/test/parallel/test-tls-pfx-gh-5100-regr.js
node-compiler-0.9.0 vendor/node-v7.2.1/test/parallel/test-tls-pfx-gh-5100-regr.js
node-compiler-0.8.0 vendor/node-v7.2.0/test/parallel/test-tls-pfx-gh-5100-regr.js
node-compiler-0.7.0 vendor/node-v6.9.1/test/parallel/test-tls-pfx-gh-5100-regr.js
node-compiler-0.7.0 vendor/node-v7.1.0/test/parallel/test-tls-pfx-gh-5100-regr.js