Files
xen-orchestra/@xen-orchestra/self-signed
Julien Fontanet 5a17c75fe4 feat: unified .npmignore for all packages
Ensure sources, tests and USAGE.Md files will not be published.
2021-04-07 13:58:14 +02:00
..
2020-07-30 11:20:57 +02:00

@xen-orchestra/self-signed

Package Version License PackagePhobia Node compatibility

Minimalist wrapper around openssl to generate a self signed certificate

Install

Installation of the npm package:

> npm install --save @xen-orchestra/self-signed

Usage

import { genSelfSigned } from '@xen-orchestra/self-signed'

console.log(
  await genSelfSigned({
    // Number of days this certificate will be valid.
    //
    // Default: 360
    days: 600,
  })
)
// {
//   cert: '-----BEGIN CERTIFICATE-----\n' +
//     // content…
//     '-----END CERTIFICATE-----\n',
//   key: '-----BEGIN RSA PRIVATE KEY-----\n' +
//     // content…
//     '-----END RSA PRIVATE KEY-----\n'
// }

Contributions

Contributions are very welcomed, either on the documentation or on the code.

You may:

  • report any issue you've encountered;
  • fork and create a pull request.

License

ISC © Vates SAS