mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 09:08:46 +00:00

common.js needs to be loaded in all tests so that there is checking for variable leaks and possibly other things. However, it does not need to be assigned to a variable if nothing in common.js is referred to elsewhere in the test. PR-URL: https://github.com/nodejs/node/pull/4408 Reviewed-By: James M Snell <jasnell@gmail.com>
27 lines
685 B
JavaScript
27 lines
685 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const tls = require('tls');
|
|
|
|
const singles = 'C=US\nST=CA\nL=SF\nO=Node.js Foundation\nOU=Node.js\nCN=ca1\n'
|
|
+ 'emailAddress=ry@clouds.org';
|
|
const singlesOut = tls.parseCertString(singles);
|
|
assert.deepEqual(singlesOut, {
|
|
C: 'US',
|
|
ST: 'CA',
|
|
L: 'SF',
|
|
O: 'Node.js Foundation',
|
|
OU: 'Node.js',
|
|
CN: 'ca1',
|
|
emailAddress: 'ry@clouds.org'
|
|
});
|
|
|
|
const doubles = 'OU=Domain Control Validated\nOU=PositiveSSL Wildcard\n' +
|
|
'CN=*.nodejs.org';
|
|
const doublesOut = tls.parseCertString(doubles);
|
|
assert.deepEqual(doublesOut, {
|
|
OU: [ 'Domain Control Validated', 'PositiveSSL Wildcard' ],
|
|
CN: '*.nodejs.org'
|
|
});
|