Skip to content

gagle/node-ssl-self-signed-certificate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssl-self-signed-certificate

Self-signed SSL certificate for development

npm version Travis Coveralls

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. It 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 is localhost.crt.
  • days - Number
    Expiration time. Default is 365.
  • keyFile - String
    Filename for the key. Default is localhost.key.
  • passphraseFile - String
    Filename for the passphrase. Default is passphrase.

About

Self-signed SSL certificate for development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published