ssl-self-signed 2.0.1
Generate 100-year self-signed ssl certificates for your domain/IP.
Requested
Install
npm install ssl-self-signed
Examples
var sss = ;// auto generate CA;
Generate files:
CA.key
CA's private key.CA.crt
Import into browser.server.crt
和server.key
use for server.
opts
-
CA
If not set(undefined
): If under the ouput not haveCA.key
andCA.crt
, It will generate CA. otherwise It will useCA.key
andCA.crt
under the ouput. defaultundefined
.If is Object: It will use you provide'CA,
key
CA's private key path.cert
CA's cert file path.
-
bit
: default2048
-
days
: default365 * 100
-
C
: Country default"CN"
-
O
: Organization default"AAA ssl-self-signed"
Use other CA:
var sss = ; ;
Demo:
- Download CA-of-demo.crt
- Import into browsers(put it into 'Trusted Root Certification Authorities' place). Some guide like: window-chrome-import-guide
- Restart your browser.
- Visit https://149.129.62.26:3002