@@ -69,7 +69,7 @@ function createPrivateKey (keyBitsize, options, callback) {
6969 var delTempPWFiles = [ ]
7070
7171 if ( options && options . cipher && ( Number ( helper . ciphers . indexOf ( options . cipher ) ) !== - 1 ) && options . password ) {
72- helper . createPasswordFile ( { 'cipher' : options . cipher , 'password' : options . password , 'passType' : 'out' } , params , delTempPWFiles [ delTempPWFiles . length ] )
72+ helper . createPasswordFile ( { 'cipher' : options . cipher , 'password' : options . password , 'passType' : 'out' } , params , delTempPWFiles )
7373 }
7474
7575 params . push ( keyBitsize )
@@ -263,7 +263,7 @@ function createCSR (options, callback) {
263263
264264 var delTempPWFiles = [ ]
265265 if ( options . clientKeyPassword ) {
266- helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . clientKeyPassword , 'passType' : 'in' } , params , delTempPWFiles [ delTempPWFiles . length ] )
266+ helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . clientKeyPassword , 'passType' : 'in' } , params , delTempPWFiles )
267267 }
268268
269269 openssl . exec ( params , 'CERTIFICATE REQUEST' , tmpfiles , function ( sslErr , data ) {
@@ -384,15 +384,15 @@ function createCertificate (options, callback) {
384384 }
385385 }
386386 if ( options . serviceKeyPassword ) {
387- helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . serviceKeyPassword , 'passType' : 'in' } , params , delTempPWFiles [ delTempPWFiles . length ] )
387+ helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . serviceKeyPassword , 'passType' : 'in' } , params , delTempPWFiles )
388388 }
389389 tmpfiles . push ( options . serviceCertificate )
390390 tmpfiles . push ( options . serviceKey )
391391 } else {
392392 params . push ( '-signkey' )
393393 params . push ( '--TMPFILE--' )
394394 if ( options . serviceKeyPassword ) {
395- helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . serviceKeyPassword , 'passType' : 'in' } , params , delTempPWFiles [ delTempPWFiles . length ] )
395+ helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . serviceKeyPassword , 'passType' : 'in' } , params , delTempPWFiles )
396396 }
397397 tmpfiles . push ( options . serviceKey )
398398 }
@@ -409,7 +409,7 @@ function createCertificate (options, callback) {
409409 }
410410
411411 if ( options . clientKeyPassword ) {
412- helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . clientKeyPassword , 'passType' : 'in' } , params , delTempPWFiles [ delTempPWFiles . length ] )
412+ helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . clientKeyPassword , 'passType' : 'in' } , params , delTempPWFiles )
413413 }
414414
415415 openssl . exec ( params , 'CERTIFICATE' , tmpfiles , function ( sslErr , data ) {
@@ -558,7 +558,7 @@ function getModulus (certificate, password, hash, callback) {
558558 ]
559559 var delTempPWFiles = [ ]
560560 if ( password ) {
561- helper . createPasswordFile ( { 'cipher' : '' , 'password' : password , 'passType' : 'in' } , params , delTempPWFiles [ delTempPWFiles . length ] )
561+ helper . createPasswordFile ( { 'cipher' : '' , 'password' : password , 'passType' : 'in' } , params , delTempPWFiles )
562562 }
563563
564564 openssl . spawnWrapper ( params , certificate , function ( sslErr , code , stdout , stderr ) {
@@ -702,11 +702,11 @@ function createPkcs12 (key, certificate, password, options, callback) {
702702 if ( options . cipher && options . clientKeyPassword ) {
703703 // NOTICE: The password field is needed! self if it is empty.
704704 // create password file for the import "-passin"
705- helper . createPasswordFile ( { 'cipher' : options . cipher , 'password' : options . clientKeyPassword , 'passType' : 'in' } , params , delTempPWFiles [ delTempPWFiles . length ] )
705+ helper . createPasswordFile ( { 'cipher' : options . cipher , 'password' : options . clientKeyPassword , 'passType' : 'in' } , params , delTempPWFiles )
706706 }
707707 // NOTICE: The password field is needed! self if it is empty.
708708 // create password file for the password "-password"
709- helper . createPasswordFile ( { 'cipher' : '' , 'password' : password , 'passType' : 'word' } , params , delTempPWFiles [ delTempPWFiles . length ] )
709+ helper . createPasswordFile ( { 'cipher' : '' , 'password' : password , 'passType' : 'word' } , params , delTempPWFiles )
710710
711711 params . push ( '-in' )
712712 params . push ( '--TMPFILE--' )
@@ -756,15 +756,15 @@ function readPkcs12 (bufferOrPath, options, callback) {
756756 var delTempPWFiles = [ ]
757757 var args = [ 'pkcs12' , '-in' , bufferOrPath ]
758758
759- helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . p12Password , 'passType' : 'in' } , args , delTempPWFiles [ delTempPWFiles . length ] )
759+ helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . p12Password , 'passType' : 'in' } , args , delTempPWFiles )
760760
761761 if ( Buffer . isBuffer ( bufferOrPath ) ) {
762762 tmpfiles = [ bufferOrPath ]
763763 args [ 2 ] = '--TMPFILE--'
764764 }
765765
766766 if ( options . clientKeyPassword ) {
767- helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . clientKeyPassword , 'passType' : 'out' } , args , delTempPWFiles [ delTempPWFiles . length ] )
767+ helper . createPasswordFile ( { 'cipher' : '' , 'password' : options . clientKeyPassword , 'passType' : 'out' } , args , delTempPWFiles )
768768 } else {
769769 args . push ( '-nodes' )
770770 }
@@ -832,7 +832,7 @@ function checkCertificate (certificate, passphrase, callback) {
832832 params = [ 'x509' , '-text' , '-noout' , '-in' , '--TMPFILE--' ]
833833 }
834834 if ( passphrase ) {
835- helper . createPasswordFile ( { 'cipher' : '' , 'password' : passphrase , 'passType' : 'in' } , params , delTempPWFiles [ delTempPWFiles . length ] )
835+ helper . createPasswordFile ( { 'cipher' : '' , 'password' : passphrase , 'passType' : 'in' } , params , delTempPWFiles )
836836 }
837837
838838 openssl . spawnWrapper ( params , certificate , function ( sslErr , code , stdout , stderr ) {
@@ -875,7 +875,7 @@ function checkPkcs12 (bufferOrPath, passphrase, callback) {
875875 var delTempPWFiles = [ ]
876876 var args = [ 'pkcs12' , '-info' , '-in' , bufferOrPath , '-noout' , '-maciter' , '-nodes' ]
877877
878- helper . createPasswordFile ( { 'cipher' : '' , 'password' : passphrase , 'passType' : 'in' } , args , delTempPWFiles [ delTempPWFiles . length ] )
878+ helper . createPasswordFile ( { 'cipher' : '' , 'password' : passphrase , 'passType' : 'in' } , args , delTempPWFiles )
879879
880880 if ( Buffer . isBuffer ( bufferOrPath ) ) {
881881 tmpfiles = [ bufferOrPath ]
0 commit comments