2.6.8 • Published 10 months ago

@sealsystems/tlscert v2.6.8

Weekly downloads
21
License
MIT
Repository
github
Last release
10 months ago

@sealsystems/tlscert

@sealsystems/tlscert provides TLS key and certificate.

Installation

npm install @sealsystems/tlscert

Quick start

First you need to add a reference to @sealsystems/tlscert within your application.

const tlscert = require('@sealsystems/tlscert');

To get the content of the certificate and private key from a specific directory, first you need to set the TLS_DIR environment variable:

export TLS_DIR=$(pwd)

Then, call the get function:

const keystore = await tlscert.get();

console.log(keystore);
// => {
//       key: '...',
//       cert: '...',
//       ca: '...'
//       isFallback: true/false
//    }

If you do not set the environment variable, a default key and a default certificate will be returned. In this case the property isFallback is set to true.

if (keystore.isFallback) {
  console.log('This is the fallback key and certificate provided by the module.');
}

Please note that the files must be called key.pem, cert.pem and ca.pem, and that they have to be stored in PEM format. Having a ca.pem file is optional.

Self-signed certificate

This module uses a self-signed certificate if no other is provided. This certificate is valid for 10 years (3650 days to be exact ;-)). To see the details of the certificate, call:

npm run show-cert

To create a new one (with a new expiration date), run:

npm run generate-cert

Do not forget to release a new version in order to publish the created certificate.

BTW: It should be no problem if a system contains multiple versions of the self-signed certificate as long as they are not expired.

Running the build

To build this module use roboter.

$ bot
2.6.8

10 months ago

2.6.5

1 year ago

2.6.7

1 year ago

2.6.6

1 year ago

2.6.4

1 year ago

2.6.3

2 years ago

2.6.1

2 years ago

2.6.0

2 years ago

2.6.2

2 years ago

2.5.0

2 years ago

2.5.2

2 years ago

2.5.1

2 years ago

2.4.3

2 years ago

2.4.2

3 years ago

2.4.1

3 years ago

2.4.0

3 years ago

2.3.22

3 years ago

2.3.21

3 years ago

2.3.20

4 years ago

2.3.17

4 years ago

2.3.19

4 years ago

2.3.18

4 years ago

2.3.16

4 years ago

2.3.15

4 years ago

2.3.14

4 years ago

2.3.13

5 years ago

2.3.12

5 years ago

2.3.11

5 years ago

2.3.10

5 years ago

2.3.9

5 years ago

2.3.8

5 years ago

2.3.7

5 years ago

2.3.1

5 years ago

2.3.0

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago