nodejs/test/parallel/test-tls-server-setoptions-clientcertengine.js

19 lines
541 B
JavaScript
Raw Normal View History

2017-09-22 21:59:16 -07:00
'use strict';
const common = require('../common');
if (!common.hasCrypto)
common.skip('missing crypto');
const assert = require('assert');
const tls = require('tls');
{
const server = tls.createServer();
assert.strictEqual(server.clientCertEngine, undefined);
common.expectWarning('DeprecationWarning',
'Server.prototype.setOptions() is deprecated',
'DEP0122');
2017-09-22 21:59:16 -07:00
server.setOptions({ clientCertEngine: 'Cannonmouth' });
assert.strictEqual(server.clientCertEngine, 'Cannonmouth');
}