1
0
mirror of https://github.com/actix/examples synced 2024-11-27 16:02:57 +01:00

update mkcert command

This commit is contained in:
Rob Ede 2023-05-22 14:18:07 +01:00
parent 48565526e7
commit 8c1b59ff9e
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,7 @@ mkcert -install
If you want to generate your own private key/certificate pair, then run: If you want to generate your own private key/certificate pair, then run:
```sh ```sh
mkcert 127.0.0.1 localhost mkcert -key-file key.pem -cert-file cert.pem 127.0.0.1 localhost
``` ```
A new `key.pem` and `cert.pem` will be saved to the current directory. You will then need to modify `main.rs` where indicated. A new `key.pem` and `cert.pem` will be saved to the current directory. You will then need to modify `main.rs` where indicated.

View File

@ -31,7 +31,9 @@ async fn main() -> io::Result<()> {
// set the unencrypted private key // set the unencrypted private key
// (uncomment if you generate your own key+cert with `mkcert`, and also remove the statement above) // (uncomment if you generate your own key+cert with `mkcert`, and also remove the statement above)
// builder.set_private_key_file("key.pem").unwrap(); // builder
// .set_private_key_file("key.pem", openssl::ssl::SslFiletype::PEM)
// .unwrap();
// set the certificate chain file location // set the certificate chain file location
builder.set_certificate_chain_file("cert.pem").unwrap(); builder.set_certificate_chain_file("cert.pem").unwrap();