Files
xen-orchestra/@xen-orchestra/self-signed
2022-05-30 17:45:59 +02:00
..
2022-02-18 17:11:52 +01:00
2022-05-30 17:45:59 +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