A framework for building letsencrypt clients, forked from letiny.
Go to file
AJ ONeal 4015e792dd updates 2015-12-16 00:13:07 +00:00
lib updates 2015-12-16 00:13:07 +00:00
test added tests 2015-12-13 17:50:58 +01:00
History.md added fork, privateKey and accountKey options 2015-12-14 20:54:01 +01:00
LICENSE.txt initial commit 2015-12-13 17:50:04 +01:00
README.md updates 2015-12-16 00:13:07 +00:00
node.js updates 2015-12-16 00:13:07 +00:00
package.json refactor and docs 2015-12-15 22:07:02 +00:00

README.md

letiny-core

A framework for building letsencrypt clients, forked from letiny.

  • browser
  • node with forge (works on windows)
  • node with ursa (works fast)
  • any javascript implementation

Usage:

npm install --save letiny-core
'use strict';

var leCore = require('leCore');

leCore.

API

LeCore.registerNewAccount(options, cb);

LeCore.getCertificate(options, cb);

LeCore.Acme                               // Signs requests with JWK
  acme = new Acme(lePrivateKey)           // privateKey format is abstract
  acme.post(url, body, cb)                // POST with signature
  acme.parseLinks(link)                   // (internal) parses 'link' header
  acme.getNonce(url, cb)                  // (internal) HEAD request to get 'replay-nonce' strings

LeCore.leCrypto
  thumbprint(lePubKey)                          // generates thumbprint
  generateSignature(lePrivKey, bodyBuf, nonce)  // generates a signature
  importPemPrivateKey(privateKeyPem);           // returns abstract private key

For testing and development, you can also inject the dependencies you want to use:

leCore.create({
  request: require('request')
, leCrypto: rquire('./lib/letsencrypt-forge')
});

Licence

MPL 2.0

All of the code is available under the MPL-2.0.

Some of the files are original work not modified from letiny and are made available under MIT as well (check file headers).