Tried these commands and none of them worked?
$ certutil.exe -addstore root .\mitmproxy-ca-cert.p12
root "Trusted Root Certification Authorities"
CertUtil: -addstore command FAILED: 0x80092009 (-2146885623 CRYPT_E_NO_MATCH)
CertUtil: Cannot find the requested object.
$ certutil.exe -ImportPfx "TrustedRootCA" .\mitmproxy-ca-cert.p12
Enter PFX password:
CertUtil: -importPFX command FAILED: 0x80092007 (-2146885625 CRYPT_E_SELF_SIGNED)
CertUtil: The specified certificate is self signed.
NOTE: This one has not outout
$ Import-PfxCertificate -FilePath .\mitmproxy-ca-cert.p12 Cert:\LocalMachine\Root
And now if you check certificates from cert manager using:
$ certlm
You won't find any certificates with name/description mitmproxy
.
Download the certificate mitmproxy-ca-cert.cer
available for Android from http://mitm.it after setting up the proxy. And run the following command (Requires Admin Privileges for LocalMachine):
$ powershell.exe "Import-Certificate -FilePath .\mitmproxy-ca-cert.cer -CertStoreLocation cert:\LocalMachine\Root"
Directory: Microsoft.PowerShell.Security\Certificate::LocalMachine\Root
Thumbprint Subject
---------- -------
3167632FC7FAFB43EB6A04662CEE5069D7D319F7 O=mitmproxy, CN=mitmproxy
Verify that the certificate is installed by going to certlm
or listing the root certificates:
$ dir cert:\\LocalMachine\Root