Update concepts-certificates.md

{{< highlight bash  >}} doesn't render properly on the wiki, so converted to codeblock
This commit is contained in:
Tedd Johnson 2020-07-04 01:14:21 -07:00 committed by GitHub
parent cf158022d9
commit c3d3b75517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.