Package Exports
- ssl-self-signed-certificate
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ssl-self-signed-certificate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ssl-self-signed-certificate
Self-signed SSL certificate for development
var signCertificate = require('ssl-self-signed-certificate');
signCertificate('my-passphrase', function (err) {
// Generated files
// ./localhost.key
// ./localhost.crt
// ./passphrase
});
I requires the openssl
binary. For testing it requires curl
.
module(passphrase, [options], callback) : undefined
Generates a self-signed SSL certificate. Creates 3 files: key, certificate and passphrase. The passphrase file just contains the passphrase
parameter. The callback receives an error as the first argument.
Options:
- certificateFile - String
Filename for the certificate. Default islocalhost.crt
. - days - Number
Expiration time. Default is365
. - keyFile - String
Filename for the key. Default islocalhost.key
. - passphraseFile - String
Filename for the passphrase. Default ispassphrase
.