diff --git a/docs/src/content/concepts-certificates.md b/docs/src/content/concepts-certificates.md index cf3447c7b..d2fd5f351 100644 --- a/docs/src/content/concepts-certificates.md +++ b/docs/src/content/concepts-certificates.md @@ -117,26 +117,26 @@ file roughly looks like this: For example, you can generate a certificate in this format using these instructions: -{{< highlight bash >}} +``` openssl genrsa -out cert.key 2048 # (Specify the mitm domain as Common Name, e.g. \*.google.com) openssl req -new -x509 -key cert.key -out cert.crt cat cert.key cert.crt > cert.pem -{{< / highlight >}} +``` Now, you can run mitmproxy with the generated certificate: **For all domain names** -{{< highlight bash >}} +``` mitmproxy --cert *=cert.pem -{{< / highlight >}} +``` **For specific domain names** -{{< highlight bash >}} +``` mitmproxy --cert *.example.com=cert.pem -{{< / highlight >}} +``` **Note:** `*.example.com` is for all the subdomains. You can also use `www.example.com` for a particular subdomain.