mirror of https://github.com/lukechilds/node.git
Browse Source
It does not currently have any explicit tests to verify the behavior. PR-URL: https://github.com/nodejs/node/pull/4283 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>process-exit-stdio-flushing
Evan Lucas
9 years ago
1 changed files with 26 additions and 0 deletions
@ -0,0 +1,26 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
const common = 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' |
||||
|
}); |
Loading…
Reference in new issue