I'm using MITM Proxy to capture requests/responses using Python Inline Scripts. In case of certificate verification error MITM Proxy writes log line to standard output like
127.0.0.1:34390: SSL verification failed for upstream server at depth 0 with error: 18
Is it possible to capture this certificate validation errors in Inline Script function and how? I'm only possible to capture http requests and responses in this scripts. If it's impossible with Inline Script, maybe I can do it with libmproxy?