serverconnect - cert is alway None
See original GitHub issueProblem Description
I’ve configured an mitmProxy in upstream mode, and trying to intercept the certificate it (Fiddler) presents to mitmProxy using an add-on.
cert
field frommitmproxy.connections.ServerConnection
object is always None
Maybe I’m doing something wrong…
Steps to reproduce the behavior:
import mitmproxy
from mitmproxy import ctx
class MyAddon:
def serverconnect(self, conn: mitmproxy.connections.ServerConnection):
ctx.log.info("serverconnect: %s" % vars(conn))
addons = [
MyAddon()
]
System Information
5.0.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Invalid CA certificate with self signed certificate chain
A CA root certificate has to be marked as belonging to a CA: A CA certificate must include the basicConstraints value with the...
Read more >ServerConnection Class (Microsoft.SqlServer.Management ...
Returns true if the SqlConnection object is connected with the server. This can only return true for non pooled connections as pooled connections...
Read more >Sonar-scanner fails with self-signed certificate
I have imported the crt file into the JVM Cacerts and also created a jks file containing the certificate. No matter how I...
Read more >Configure the SEG V2 - VMware Docs
Configure the SEG V2 ; Ignore SSL Errors between SEG and AirWatch server, Select Enable to ignore Secure Socket Layer (SSL) certificate errors ......
Read more >records.config — Apache Traffic Server 9.1.4 documentation
Check that the certificate file name used for the server session matches the ... Always read while writing, but allow non-cached Range requests...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In this case you can work around by using the
request
event andflow.kill()
if your check fails.Pseudocode:
I think @Prinzhorn’s previous comment achieves just that. We will eventually expose the relevant OpenSSL bits in an addon, but for now @Prinzhorn’s approach is probably the best way to go next to monkeypatching the core.