File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -608,13 +608,12 @@ const internalCertificate = {
608
608
checkPrivateKey : ( private_key ) => {
609
609
return tempWrite ( private_key , '/tmp' )
610
610
. then ( ( filepath ) => {
611
- let key_type = private_key . includes ( '-----BEGIN RSA' ) ? 'rsa' : 'ec' ;
612
- return utils . exec ( 'openssl ' + key_type + ' -in ' + filepath + ' -check -noout 2>&1 ' )
613
- . then ( ( result ) => {
614
- if ( ! result . toLowerCase ( ) . includes ( 'key ok' ) && ! result . toLowerCase ( ) . includes ( 'key valid' ) ) {
615
- throw new error . ValidationError ( 'Result Validation Error: ' + result ) ;
616
- }
617
-
611
+ let key_type = private_key . includes ( '-----BEGIN RSA' ) ? 'rsa' : 'ec' ;
612
+ return utils . exec ( 'openssl ' + key_type + ' -in ' + filepath + ' -check -noout 2>&1 ' )
613
+ . then ( ( result ) => {
614
+ if ( ! result . toLowerCase ( ) . includes ( 'key ok' ) && ! result . toLowerCase ( ) . includes ( 'key valid' ) ) {
615
+ throw new error . ValidationError ( 'Result Validation Error: ' + result ) ;
616
+ }
618
617
fs . unlinkSync ( filepath ) ;
619
618
return true ;
620
619
} ) . catch ( ( err ) => {
You can’t perform that action at this time.
0 commit comments