Skip to content

Commit 62fc039

Browse files
djcRalith
authored andcommitted
book: rename certificate-insecure to certificate
1 parent 2447c2e commit 62fc039

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/book/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ rustls.workspace = true
1717
rustls-pemfile.workspace = true
1818

1919
[[bin]]
20-
name = "certificate-insecure"
21-
path = "src/quinn/certificate-insecure.rs"
20+
name = "certificate"
21+
path = "src/quinn/certificate.rs"
2222

2323
[[bin]]
2424
name = "data-transfer"

docs/book/src/quinn/certificate.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ rustls = { version = "*", features = ["dangerous_configuration", "quic"] }
1919
Then, allow the client to skip the certificate validation by implementing [ServerCertVerifier][ServerCertVerifier] and letting it assert verification for any server.
2020

2121
```rust
22-
{{#include certificate-insecure.rs:8:60}}
22+
{{#include certificate.rs:8:60}}
2323
```
2424

2525
After that, modify the [ClientConfig][ClientConfig] to use this [ServerCertVerifier][ServerCertVerifier] implementation.
2626

2727
```rust
28-
{{#include certificate-insecure.rs:63:72}}
28+
{{#include certificate.rs:63:72}}
2929
```
3030

3131
Finally, if you plug this [ClientConfig][ClientConfig] into the [Endpoint::set_default_client_config()][set_default_client_config] your client endpoint should verify all connections as trustworthy.
@@ -45,7 +45,7 @@ This example uses [rcgen][4] to generate a certificate.
4545
Let's look at an example:
4646

4747
```rust
48-
{{#include certificate-insecure.rs:90:101}}
48+
{{#include certificate.rs:90:101}}
4949
```
5050

5151
*Note that [generate_simple_self_signed][generate_simple_self_signed] returns a [Certificate][2] that can be serialized to both `.der` and `.pem` formats.*
@@ -68,7 +68,7 @@ certbot asks for the required data and writes the certificates to `fullchain.pem
6868
These files can then be referenced in code.
6969

7070
```rust
71-
{{#include certificate-insecure.rs:75:88}}
71+
{{#include certificate.rs:75:88}}
7272
```
7373

7474
### Configuring Certificates
@@ -79,15 +79,15 @@ After configuring plug the configuration into the `Endpoint`.
7979
**Configure Server**
8080

8181
```rust
82-
{{#include certificate-insecure.rs:107}}
82+
{{#include certificate.rs:107}}
8383
```
8484

8585
This is the only thing you need to do for your server to be secured.
8686

8787
**Configure Client**
8888

8989
```rust
90-
{{#include certificate-insecure.rs:108}}
90+
{{#include certificate.rs:108}}
9191
```
9292

9393
This is the only thing you need to do for your client to trust a server certificate signed by a conventional certificate authority.
File renamed without changes.

0 commit comments

Comments
 (0)