File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ # Test Certificates
2+
3+ To be able to start the SaltyRTC server, you need to specify a TLS key and
4+ certificate. In production you will want to use a certificate signed by a
5+ trusted CA, but for testing purposes, the easiest way is to create a
6+ self-signed certificate.
7+
8+ ## Generating a Test Certificate
9+
10+ Use the following command to create such a certificate, valid for ` localhost `
11+ during the next 5 years:
12+
13+ $ openssl req \
14+ -newkey rsa:1024 \
15+ -x509 \
16+ -nodes \
17+ -keyout saltyrtc.key \
18+ -new \
19+ -out saltyrtc.crt \
20+ -subj /CN=localhost \
21+ -reqexts SAN \
22+ -extensions SAN \
23+ -config <(cat /etc/ssl/openssl.cnf \
24+ <(printf '[SAN]\nsubjectAltName=DNS:localhost')) \
25+ -sha256 \
26+ -days 1825
27+
28+ ## Importing
29+
30+ ### Chrome / Chromium
31+
32+ The best way to import this certificate into Chrome is via the command line:
33+
34+ $ certutil -d sql:$HOME/.pki/nssdb \
35+ -A -t "P,," -n saltyrtc-test-ca \
36+ -i saltyrtc.crt
37+
38+ Then make sure to restart your browser (or simply visit ` chrome://restart ` ).
39+
40+ ### Firefox
41+
42+ Go to the directory ` ~/.mozilla/firefox ` and look for a directory with a
43+ cryptic name containing the string ` .default- ` . This is your profile name. Copy
44+ it, then run this command (with the ` <profile-name> ` replaced):
45+
46+ $ certutil -d ~/.mozilla/firefox/<profile-name> \
47+ -A -n saltyrtc-test-ca -t Ccw,, \
48+ -i saltyrtc.crt
Original file line number Diff line number Diff line change 1414 - Guide :
1515 - Installing : installing.md
1616 - Usage : usage.md
17+ - Test Certificates : testcerts.md
1718 - About : about.md
1819theme_dir : theme_overrides
1920extra_css :
You can’t perform that action at this time.
0 commit comments