Skip to content

Commit 8092a89

Browse files
sundreshdjc
authored andcommitted
Clarify how to run the example server
1 parent ef4b4d3 commit 8092a89

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
**/*.rs.bk
33
.DS_Store
44
/.idea
5+
/certs

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ cargo run --example client -- hsts.badssl.com
4747
See [examples/server.rs](examples/server.rs). You can run it with:
4848

4949
```sh
50-
cargo run --example server -- 127.0.0.1:8000 --cert mycert.der --key mykey.der
50+
cargo run --example server -- 127.0.0.1:8000 --cert certs/cert.pem --key certs/cert.key.pem
51+
```
52+
53+
If you don't have a certificate and key, you can generate a random key and
54+
self-signed certificate for testing with:
55+
56+
```sh
57+
cargo install --locked rustls-cert-gen
58+
rustls-cert-gen --output certs/ --san localhost
5159
```
5260

5361
### License & Origin

0 commit comments

Comments
 (0)