v1.1.0: Demo CSR
This commit is contained in:
parent
0b21269c95
commit
8002ab7791
21
README.md
21
README.md
@ -2,11 +2,12 @@
|
||||
=========
|
||||
|
||||
Sponsored by [Root](https://therootcompany.com).
|
||||
Built for [ACME.js](https://git.coolaj86.com/coolaj86/acme.js)
|
||||
and [Greenlock.js](https://git.coolaj86.com/coolaj86/greenlock.js)
|
||||
Built with [Eckles.js](https://git.coolaj86.com/coolaj86/eckles.js).
|
||||
|
||||
ECDSA (elliptic curve) tools.
|
||||
|
||||
Designed for testing and debugging.
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
@ -20,6 +21,7 @@ Table of Contents
|
||||
* [x] PEM to JWK
|
||||
* [x] JWK to PEM
|
||||
* [x] SSH "pub" format
|
||||
* [x] Generate CSR (via [ECDSA-CSR.js](https://git.coolaj86.com/coolaj86/ecdsa-csr.js))
|
||||
* [ ] RSA
|
||||
* **Need RSA tools?** Check out [Rasha.js](https://git.coolaj86.com/coolaj86/rasha.js)
|
||||
|
||||
@ -153,6 +155,21 @@ eckles id_rsa.pub > pub.jwk.json
|
||||
eckles privkey.jwk.json spki > pub.pem
|
||||
```
|
||||
|
||||
## Generate CSR
|
||||
|
||||
```
|
||||
eckles csr [keyfile] [domains]
|
||||
```
|
||||
|
||||
```bash
|
||||
eckels csr privkey.pem example.com,www.example.com > csr.pem
|
||||
```
|
||||
|
||||
```bash
|
||||
eckels csr privkey.jwk.json example.com,www.example.com > csr.pem
|
||||
```
|
||||
|
||||
|
||||
Legal
|
||||
-----
|
||||
|
||||
|
@ -54,11 +54,13 @@ try {
|
||||
|
||||
|
||||
if ('csr' === infile) {
|
||||
// TODO this _should_ use JWK,
|
||||
// but it doesn't yet
|
||||
if ('string' !== typeof key) {
|
||||
key = Eckles.exportSync({ jwk: key });
|
||||
}
|
||||
return ecdsacsr({
|
||||
// don't remember which it was... whatever
|
||||
pem: key
|
||||
, key: key
|
||||
, jwk: key
|
||||
key: key
|
||||
, domains: domains.split(/,/)
|
||||
}).then(function (csr) {
|
||||
console.info(csr);
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "eckles-cli",
|
||||
"version": "1.0.1",
|
||||
"description": "Command line ECDSA tools to generating key pairs and converting between JWK, various PEM formats, and SSH",
|
||||
"version": "1.1.0",
|
||||
"description": "💯 Command line ECDSA tools to generating key pairs and converting between JWK, various PEM formats, and SSH",
|
||||
"homepage": "https://git.coolaj86.com/coolaj86/eckles-cli.js",
|
||||
"main": "bin/eckles.js",
|
||||
"bin": {
|
||||
|
7
test.sh
7
test.sh
@ -41,6 +41,13 @@ node bin/eckles.js id_rsa public > /dev/null
|
||||
node bin/eckles.js id_rsa.pub > /dev/null
|
||||
echo "PASS"
|
||||
|
||||
echo ""
|
||||
echo "Create CSR"
|
||||
node bin/eckles.js csr ./privkey.2.sec1.pem example.com,example.net >/dev/null
|
||||
node bin/eckles.js csr ./privkey.3.pkcs8.pem whatever.com,api.whatever.com,whatever.net >/dev/null
|
||||
node bin/eckles.js csr ./privkey.1.jwk.json example.com,example.net >/dev/null
|
||||
echo "PASS"
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Passed all tests"
|
||||
|
Loading…
x
Reference in New Issue
Block a user