le-acme-core.js/README.md

58 lines
1.2 KiB
Markdown
Raw Normal View History

2015-12-15 22:07:02 +00:00
# letiny-core
2015-12-13 16:50:04 +00:00
2015-12-15 22:07:02 +00:00
A framework for building letsencrypt clients, forked from `letiny`.
* browser
* node with `forge` (works on windows)
* node with `ursa` (works fast)
* any javascript implementation
2015-12-13 16:50:04 +00:00
## Usage:
2015-12-15 22:07:02 +00:00
```bash
npm install --save letiny-core
2015-12-13 16:50:04 +00:00
```
2015-12-15 22:07:02 +00:00
```javascript
'use strict';
var leCore = require('leCore');
leCore.
2015-12-13 16:50:04 +00:00
```
2015-12-15 22:07:02 +00:00
## API
2015-12-13 16:50:04 +00:00
```
2015-12-15 22:07:02 +00:00
LeCore.registerNewAccount();
LeCore.getCertificate();
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
generateSignature(lePrivateKey, nodeBufferBody, nonceString)
2015-12-13 16:50:04 +00:00
```
2015-12-15 22:07:02 +00:00
For testing and development, you can also inject the dependencies you want to use:
```javascript
leCore.create({
request: require('request')
, leCrypto: rquire('./lib/letsencrypt-forge')
});
```
2015-12-13 16:50:04 +00:00
## Licence
2015-12-15 22:07:02 +00:00
2015-12-13 16:50:04 +00:00
MPL 2.0
2015-12-15 22:07:02 +00:00
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).