1.0.7 • Published 8 years ago

cert v1.0.7

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
8 years ago

Cert

Easily obain SSL certificates from LetsEncrypt. Supports DNS-01 challenge. TypeScript ready.

Status

build status

Usage

import {Cert} from "cert";

let myCert = new Cert({
    cfEmail: "some@cloudflare.email",
    cfKey: "someCloudflareApiKey",
    sslDir: "someOutputPath", // NOTE: if you already have certificates, make sure you put them in here, so cert only requires the missing ones
    gitOriginRepo: "git@githhub.com/someuser/somereopo" // good for persistence in highly volatile environments like docker
});

myCert.getDomainCert("example.com"); // returns promise

Note: cert supports async parallel cert fetching. However any subsequent calls will wait for the queue of the same dns zone to clear. In other words: test1.domain1.tld and test2.domain2.tld will run in parallel, but test2.domain1.tld will wait for test1.domain1.tld !

sslDir

to use the certificates it is important to understand what the structure of the ssl directory looks like.

using a git origin repo.

Often times you want to keep track of certificates in order to keep them even if the point of initial certificate request is gone. Imagine you have a dockerenvironement and you keep starting new container versions for the same domain. YOu ideally want to use a proxy that handles SSL managemet for you. But even the proxy needs to be updated from time to time.

So you need some kind of persistence between versions. This is why you can sync up all certificates to a git repo over ssh Just make sure your id_rsa is in place for the node user and is allowed for the origin repo.

Environment

Since cert relies on letsencrypt.sh in the background bash is needed on the system. If you plan on using this on Windows check out npmdocker which runs node programs in docker. As of summer 2016 Windows will also ship with bash nativly included.

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.3

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.11

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.0

8 years ago