File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,21 @@ if (argv.config) {
45
45
}
46
46
47
47
//
48
- // If `config.https` is set, then load those files into the config options.
48
+ // If `config.https` is set, then load the required file contents into the config options.
49
49
//
50
50
if ( config . https ) {
51
51
Object . keys ( config . https ) . forEach ( function ( key ) {
52
- config . https [ key ] = fs . readFileSync ( config . https [ key ] , 'utf8' ) ;
52
+ // If CA certs are specified, load those too.
53
+ if ( key === "ca" ) {
54
+ for ( var i = 0 ; i < config . https . ca . length ; i ++ ) {
55
+ if ( config . https . ca === undefined ) {
56
+ config . https . ca = [ ] ;
57
+ }
58
+ config . https . ca [ i ] = fs . readFileSync ( config . https [ key ] [ i ] , 'utf8' ) ;
59
+ }
60
+ } else {
61
+ config . https [ key ] = fs . readFileSync ( config . https [ key ] , 'utf8' ) ;
62
+ }
53
63
} ) ;
54
64
}
55
65
You can’t perform that action at this time.
0 commit comments