File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ var utils = {
2121 } ,
2222 /**
2323 * @param filePath
24+ * @param passphrase
2425 * @returns {{pfx} }
2526 */
26- getPFX : function ( filePath ) {
27+ getPFX : function ( filePath , passphrase ) {
2728 return {
28- pfx : fs . readFileSync ( filePath )
29+ pfx : fs . readFileSync ( filePath ) ,
30+ passphrase : passphrase ,
2931 } ;
3032 } ,
3133 /**
@@ -36,8 +38,9 @@ var utils = {
3638 server : ( function ( ) {
3739 if ( options . get ( "scheme" ) === "https" ) {
3840 var pfxPath = options . getIn ( [ "https" , "pfx" ] ) ;
41+ var pfxPassphrase = options . getIn ( [ "https" , "pfxPassphrase" ] ) ;
3942 return pfxPath ?
40- https . createServer ( utils . getPFX ( pfxPath ) , app ) :
43+ https . createServer ( utils . getPFX ( pfxPath , pfxPassphrase ) , app ) :
4144 https . createServer ( utils . getKeyAndCert ( options ) , app ) ;
4245 }
4346 return http . createServer ( app ) ;
You can’t perform that action at this time.
0 commit comments