diff --git a/https-tls/openssl/README.md b/https-tls/openssl/README.md index 985726a..05132f5 100644 --- a/https-tls/openssl/README.md +++ b/https-tls/openssl/README.md @@ -13,7 +13,7 @@ mkcert -install If you want to generate your own private key/certificate pair, then run: ```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. diff --git a/https-tls/openssl/src/main.rs b/https-tls/openssl/src/main.rs index 9b12d45..d3b604c 100644 --- a/https-tls/openssl/src/main.rs +++ b/https-tls/openssl/src/main.rs @@ -31,7 +31,9 @@ async fn main() -> io::Result<()> { // set the unencrypted private key // (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 builder.set_certificate_chain_file("cert.pem").unwrap();