Merge branch 'master' of github.com:Daplie/letiny-core

This commit is contained in:
AJ ONeal 2015-12-19 22:25:21 +00:00
commit a875f551e2
4 changed files with 8 additions and 4 deletions

View File

@ -16,7 +16,7 @@ You probably want one of these pre-built clients instead:
* [`letsencrypt`](https://github.com/Daplie/node-letsencrypt) (compatible with the official client) * [`letsencrypt`](https://github.com/Daplie/node-letsencrypt) (compatible with the official client)
* `letiny` (lightweight client cli) * `letiny` (lightweight client cli)
* `letsencrypt-express` (automatic https for express) * [`letsencrypt-express`](https://github.com/Daplie/letsencrypt-express) (automatic https for express)
## Install & Usage: ## Install & Usage:

View File

@ -55,7 +55,9 @@ function generateRsaKeypair(bitlen, exp, cb) {
, privateKeyPem: pki.privateKeyToPem(keypair.privateKey) // ascii PEM: ----BEGIN... , privateKeyPem: pki.privateKeyToPem(keypair.privateKey) // ascii PEM: ----BEGIN...
}; };
// I would have chosen sha1 or sha2... but whatever // for account id
pems.publicKeySha256 = crypto.createHash('sha256').update(pems.publicKeyPem).digest('hex');
// for compat with python client account id
pems.publicKeyMd5 = crypto.createHash('md5').update(pems.publicKeyPem).digest('hex'); pems.publicKeyMd5 = crypto.createHash('md5').update(pems.publicKeyPem).digest('hex');
// json { n: ..., e: ..., iq: ..., etc } // json { n: ..., e: ..., iq: ..., etc }
pems.privateKeyJwk = toAcmePrivateKey(keypair.privateKey); pems.privateKeyJwk = toAcmePrivateKey(keypair.privateKey);

View File

@ -36,7 +36,9 @@ function generateRsaKeypair(bitlen, exp, cb) {
, privateKeyPem: keypair.toPrivatePem().toString('ascii') // ascii PEM: ----BEGIN... , privateKeyPem: keypair.toPrivatePem().toString('ascii') // ascii PEM: ----BEGIN...
}; };
// I would have chosen sha1 or sha2... but whatever // for account id
pems.publicKeySha256 = crypto.createHash('sha256').update(pems.publicKeyPem).digest('hex');
// for compat with python client account id
pems.publicKeyMd5 = crypto.createHash('md5').update(pems.publicKeyPem).digest('hex'); pems.publicKeyMd5 = crypto.createHash('md5').update(pems.publicKeyPem).digest('hex');
// json { n: ..., e: ..., iq: ..., etc } // json { n: ..., e: ..., iq: ..., etc }
pems.privateKeyJwk = toAcmePrivateKey(pems.privateKeyPem); pems.privateKeyJwk = toAcmePrivateKey(pems.privateKeyPem);

View File

@ -1,6 +1,6 @@
{ {
"name": "letiny-core", "name": "letiny-core",
"version": "1.0.1", "version": "1.0.2",
"description": "A framework for building letsencrypt clients, forked from letiny", "description": "A framework for building letsencrypt clients, forked from letiny",
"main": "node.js", "main": "node.js",
"browser": "browser.js", "browser": "browser.js",