1.0.0 • Published 5 years ago

win-cert-gen v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

win-cert-gen

Generates self-signed certs through powershell and adds them to the current users windows certificate store. For local development testing only.

Security Warnings

  • Use at your own risk
  • Keep expiration as short as possible
  • Clear out unused root certs as they are a user/machine vulnerability

Requirements

  • powershell (tested on windows 10)
  • node

What?

  • Clears out previously generated certs from the store. (--noclear option)
  • Generates a rsa root cert and rsa cert signed by the root.
  • Deletes the generated rsa rootCA private key
  • Adds the rsa root cert (no private key) to the current users root certificate store.
  • Adds the rsa cert to the current users personal store.
  • Writes the rsa cert and key files to the current directory

Why?

This is only made for local development testing when running a local web server.

This is tested using the generated keys on a node web server.

I would rather have developers do this than pass around an actual key signed by a real root CA.

How?

install globally and run globally

npm i -g win-cert-gen
--OR--
npm link

win-cert-gen -d local.example.com -e 720

Arguments

ArgumentDescriptionDefault
-d, --dns domaindns host for certlocalhost
-c, --cert fileoutput file for the cert./server.cert
-k, --key fileoutput file for the key./server.key
-e, --exp hoursexpiration in hours24
-x, --nocleardo not clear out previous generated certs