-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b29bc3
commit c76f3e3
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Test Certificates | ||
|
||
To be able to start the SaltyRTC server, you need to specify a TLS key and | ||
certificate. In production you will want to use a certificate signed by a | ||
trusted CA, but for testing purposes, the easiest way is to create a | ||
self-signed certificate. | ||
|
||
## Generating a Test Certificate | ||
|
||
Use the following command to create such a certificate, valid for `localhost` | ||
during the next 5 years: | ||
|
||
$ openssl req \ | ||
-newkey rsa:1024 \ | ||
-x509 \ | ||
-nodes \ | ||
-keyout saltyrtc.key \ | ||
-new \ | ||
-out saltyrtc.crt \ | ||
-subj /CN=localhost \ | ||
-reqexts SAN \ | ||
-extensions SAN \ | ||
-config <(cat /etc/ssl/openssl.cnf \ | ||
<(printf '[SAN]\nsubjectAltName=DNS:localhost')) \ | ||
-sha256 \ | ||
-days 1825 | ||
|
||
## Importing | ||
|
||
### Chrome / Chromium | ||
|
||
The best way to import this certificate into Chrome is via the command line: | ||
|
||
$ certutil -d sql:$HOME/.pki/nssdb \ | ||
-A -t "P,," -n saltyrtc-test-ca \ | ||
-i saltyrtc.crt | ||
|
||
Then make sure to restart your browser (or simply visit `chrome://restart`). | ||
|
||
### Firefox | ||
|
||
Go to the directory `~/.mozilla/firefox` and look for a directory with a | ||
cryptic name containing the string `.default-`. This is your profile name. Copy | ||
it, then run this command (with the `<profile-name>` replaced): | ||
|
||
$ certutil -d ~/.mozilla/firefox/<profile-name> \ | ||
-A -n saltyrtc-test-ca -t Ccw,, \ | ||
-i saltyrtc.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters