question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to make the mitmproxy root CA certificate work with Chrome / Chromium on Linux / Ubuntu

See original GitHub issue

I’m on Ubuntu 14.04

Took me a while to figure this out (I was not able to find any information on this when searching with the “mitmproxy” keyword). It’s working out-of-the box with Firefox but not at all with Chrome.

The certificate downloaded from mitm.it needs to be added using certutil (https://code.google.com/p/chromium/wiki/LinuxCertManagement)

certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n <certificate nickname> -i <certificate filename>

I don’t know where the best place to document this is. Starting now people searching for it will at least find this entry.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

16reactions
slhckcommented, Apr 21, 2015

For completeness’ sake, this is what I had to do:

sudo apt-get install libnss3-tools
certutil -d sql:$HOME/.pki/nssdb -A -t C -n mitmproxy -i ~/.mitmproxy/mitmproxy-ca-cert.pem

Then, restart Chrom[e|ium] with the command line argument --proxy-server=http://127.0.0.1:8080

Is there a difference between that and this approach you mentioned?

2reactions
ihamburglarcommented, Jun 1, 2015

So since #549 has been merged, I consider this closed. For future google people who may arrive, chrome://settings/search#ssl is how you import certs in a gui in Chome(even on Linux). For our use case it is less convenient than having an “install certificate” button on the certificate information window, but I understand chrome’s desire to dissuade people from installing random certs. I’m going to see if I can get that Chrome documentation updated to mentoin the GUI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Certificates - mitmproxy docs
Go to Settings > General > About > Certificate Trust Settings. · Under “Enable full trust for root certificates”, turn on trust for...
Read more >
About Certificates — mitmproxy 0.18 documentation
You can use your own certificate authority by passing the --cadir DIRECTORY option to mitmproxy. Mitmproxy will then look for mitmproxy-ca.pem in the...
Read more >
How to Man in the Middle HTTPS Using mitmproxy - Earthly Blog
Solution #2: Extend the Image ... Volume mounting the certificate and manually running update-ca-certificates is an excellent proof of concept, ...
Read more >
Google Chrome Doesn't Trust Mitmproxy'S Certfificates
Quick Setup. By far the easiest way to install the mitmproxy CA certificate is to use the builtin certificate installation app. To do...
Read more >
Adding self-signed certificate into Trusted CA on Chromium for ...
Is there any issues with self-signed certs and Chromium for Linux that I am unaware of? Details: I am on Ubuntu using Chromium...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found