mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
713 B
26 lines
713 B
'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\n' +
|
|
'CN=ca1\nemailAddress=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'
|
|
});
|
|
|