Compare commits
	
		
			2 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 893bccd8d5 | |||
| 2a8b5d7981 | 
@ -236,6 +236,9 @@ function guess(txt, filename) {
 | 
				
			|||||||
      return true;
 | 
					      return true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  } catch(e) {
 | 
					  } catch(e) {
 | 
				
			||||||
 | 
					    if (setJwt(txt.trim())) {
 | 
				
			||||||
 | 
					      return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
      var jwk = Eckles.importSync({ pem: txt });
 | 
					      var jwk = Eckles.importSync({ pem: txt });
 | 
				
			||||||
      // pem._string = txt;
 | 
					      // pem._string = txt;
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										14
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										14
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "keypairs-cli",
 | 
					  "name": "keypairs-cli",
 | 
				
			||||||
  "version": "1.2.3",
 | 
					  "version": "1.2.4",
 | 
				
			||||||
  "lockfileVersion": 1,
 | 
					  "lockfileVersion": 1,
 | 
				
			||||||
  "requires": true,
 | 
					  "requires": true,
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
@ -15,9 +15,9 @@
 | 
				
			|||||||
      "integrity": "sha512-auWyk/k8oSkVHaD4RxkPadKsLUcIwKgr/h8F7UZEueFDBO7BsE4y+H6IMUDbfqKIFPg/9MxV6KcBdJCmVVcxSA=="
 | 
					      "integrity": "sha512-auWyk/k8oSkVHaD4RxkPadKsLUcIwKgr/h8F7UZEueFDBO7BsE4y+H6IMUDbfqKIFPg/9MxV6KcBdJCmVVcxSA=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "keyfetch": {
 | 
					    "keyfetch": {
 | 
				
			||||||
      "version": "1.1.5",
 | 
					      "version": "1.1.8",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/keyfetch/-/keyfetch-1.1.5.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/keyfetch/-/keyfetch-1.1.8.tgz",
 | 
				
			||||||
      "integrity": "sha512-6ZXz6r0ejJq6nc125t+TZEgvCHxO0nbz5IqiJn6AOaNadzIp9icj+5ny2IoYhUmis2tTmTDHhPPMIXgQUptTpQ==",
 | 
					      "integrity": "sha512-a8E1E25mHiv2zZnrBM6WNfQi4hG43TgVg1JG/D61WiTBAM07OJzSuy3j00H2pWPF6MCofBmA+KTzSu145nZWuA==",
 | 
				
			||||||
      "requires": {
 | 
					      "requires": {
 | 
				
			||||||
        "@coolaj86/urequest": "^1.3.6",
 | 
					        "@coolaj86/urequest": "^1.3.6",
 | 
				
			||||||
        "eckles": "^1.4.0",
 | 
					        "eckles": "^1.4.0",
 | 
				
			||||||
@ -25,9 +25,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "keypairs": {
 | 
					    "keypairs": {
 | 
				
			||||||
      "version": "1.2.8",
 | 
					      "version": "1.2.12",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/keypairs/-/keypairs-1.2.8.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/keypairs/-/keypairs-1.2.12.tgz",
 | 
				
			||||||
      "integrity": "sha512-Xb/ozyZTUM687nClQ0Jp0rCrTZKVJ3IVIKsmrH0FnFRqBrbSvUSTA+/WCRq2prb+kJJec+ry9h9yKVzZ5XW51w==",
 | 
					      "integrity": "sha512-zYjYdDvo7G4AIkkZVM3WEJBTRUIrFzYswYNqCxcCPHUsgbBBdewSHAH1CiaQ+VA6Yb7BLEPIv8gFrRz5wJrgsw==",
 | 
				
			||||||
      "requires": {
 | 
					      "requires": {
 | 
				
			||||||
        "eckles": "^1.4.1",
 | 
					        "eckles": "^1.4.1",
 | 
				
			||||||
        "rasha": "^1.2.4"
 | 
					        "rasha": "^1.2.4"
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "keypairs-cli",
 | 
					  "name": "keypairs-cli",
 | 
				
			||||||
  "version": "1.2.3",
 | 
					  "version": "1.2.5",
 | 
				
			||||||
  "description": "CLI for Keypairs.js",
 | 
					  "description": "CLI for Keypairs.js",
 | 
				
			||||||
  "homepage": "https://git.coolaj86.com/coolaj86/keypairs-cli.js",
 | 
					  "homepage": "https://git.coolaj86.com/coolaj86/keypairs-cli.js",
 | 
				
			||||||
  "main": "bin/keypairs-cli.js",
 | 
					  "main": "bin/keypairs-cli.js",
 | 
				
			||||||
@ -30,7 +30,7 @@
 | 
				
			|||||||
  "author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
 | 
					  "author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
 | 
				
			||||||
  "license": "MPL-2.0",
 | 
					  "license": "MPL-2.0",
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "keyfetch": "1.x",
 | 
					    "keyfetch": "^1.1.8",
 | 
				
			||||||
    "keypairs": "^1.2.8"
 | 
					    "keypairs": "^1.2.12"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										15
									
								
								test.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								test.sh
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					set -e
 | 
				
			||||||
 | 
					echo ""
 | 
				
			||||||
 | 
					echo ""
 | 
				
			||||||
 | 
					node bin/keypairs-cli.js gen > ./fixture.ec.jwk.json 2> ./fixture.ec.jwk.pub.json
 | 
				
			||||||
 | 
					node bin/keypairs-cli.js ./fixture.ec.jwk.json pkcs8 > fixture.ec.pem
 | 
				
			||||||
 | 
					node bin/keypairs-cli.js ./fixture.ec.pem > ./fixture.ec.jwk.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					node bin/keypairs-cli.js gen rsa > ./fixture.rsa.jwk.json 2> ./fixture.rsa.jwk.pub.json
 | 
				
			||||||
 | 
					node bin/keypairs-cli.js ./fixture.rsa.jwk.json pkcs1 > fixture.rsa.pem
 | 
				
			||||||
 | 
					node bin/keypairs-cli.js ./fixture.rsa.pem > ./fixture.rsa.jwk.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					node bin/keypairs-cli.js ./fixture.ec.jwk.json sign https://localhost:4080 '{}' 3d > works.txt;
 | 
				
			||||||
 | 
					node bin/keypairs-cli.js ./fixture.ec.jwk.pub.json decode works.txt
 | 
				
			||||||
 | 
					#node bin/keypairs-cli.js ./fixture.ec.jwk.pub.json decode works.txt
 | 
				
			||||||
 | 
					node bin/keypairs-cli.js ./fixture.ec.jwk.json sign https://localhost:4080 '{}' 3d > works.txt;
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user