v1.2.3: bugfix double convert
This commit is contained in:
		
							parent
							
								
									4ab4cbd2ab
								
							
						
					
					
						commit
						f1b4ccf792
					
				@ -306,7 +306,9 @@ if ('gen' === opts.action || (!opts.action && !opts.names.length)) {
 | 
			
		||||
    process.exit(1);
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  kp = Promise.resolve(readKeypair());
 | 
			
		||||
  var pair = readKeypair();
 | 
			
		||||
  pair._convert = true;
 | 
			
		||||
  kp = Promise.resolve();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if ('sign' === opts.action) {
 | 
			
		||||
@ -339,7 +341,9 @@ if ('sign' === opts.action) {
 | 
			
		||||
  });
 | 
			
		||||
} else {
 | 
			
		||||
  return kp.then(function (pair) {
 | 
			
		||||
    if (pair._convert) {
 | 
			
		||||
      return convertKeypair(pair);
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "keypairs",
 | 
			
		||||
  "version": "1.2.0",
 | 
			
		||||
  "version": "1.2.2",
 | 
			
		||||
  "description": "Lightweight RSA/ECDSA keypair generation and JWK <-> PEM",
 | 
			
		||||
  "main": "keypairs.js",
 | 
			
		||||
  "files": [
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user