mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
update mkcert command
This commit is contained in:
parent
48565526e7
commit
8c1b59ff9e
@ -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.
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user