File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const common = require ( '../common' ) ;
4
+ const assert = require ( 'assert' ) ;
5
+ const tls = require ( 'tls' ) ;
6
+
7
+ const singles = 'C=US\nST=CA\nL=SF\nO=Node.js Foundation\nOU=Node.js\nCN=ca1\n'
8
+ + 'emailAddress=ry@clouds.org' ;
9
+ const singlesOut = tls . parseCertString ( singles ) ;
10
+ assert . deepEqual ( singlesOut , {
11
+ C : 'US' ,
12
+ ST : 'CA' ,
13
+ L : 'SF' ,
14
+ O : 'Node.js Foundation' ,
15
+ OU : 'Node.js' ,
16
+ CN : 'ca1' ,
17
+ emailAddress : 'ry@clouds.org'
18
+ } ) ;
19
+
20
+ const doubles = 'OU=Domain Control Validated\nOU=PositiveSSL Wildcard\n' +
21
+ 'CN=*.nodejs.org' ;
22
+ const doublesOut = tls . parseCertString ( doubles ) ;
23
+ assert . deepEqual ( doublesOut , {
24
+ OU : [ 'Domain Control Validated' , 'PositiveSSL Wildcard' ] ,
25
+ CN : '*.nodejs.org'
26
+ } ) ;
You can’t perform that action at this time.
0 commit comments