Hi Rouli,
On 26/07/2012, at 11:00 PM, Rouli <
roul...@gmail.com> wrote:
> For testing I want to make sure that the ssl channel between the client and mitmproxy will be one of a few specific cipher suites. Since I can't control the client, can I somehow disable some of the suites mitmproxy supports?
> I guess that I'm look for something like ssl.conf for mitmproxy
Not in the current master, no. Earlier versions did have a cypher suite specification, but it fell by the wayside when we moved over to PyOpenSSL. It would be pretty trivial to re-add, but unfortunately I'm amazingly busy right now and don't have time to tackle it. I'll describe what needs to be done just in case some enterprising person wants to contribute to mitmproxy.
- First, we'd need to extend the convert_to_ssl functions in netlib (
http://github.com/cortesi/netlib) to let us set the cypher suite on PyOpenSSL contexts. The documentation for doing that is here:
http://packages.python.org/pyOpenSSL/openssl-context.html.
- Then, we'd extend the standard command line options to allow cypher suite specification (cmdline.py and the process_proxy_options function in proxy.py).
- And finally we'd make sure that the right arguments are added to the convert_to_ssl function calls in pproxy.py.
There's a little bit of thinking to be done - for instance, do we want the user to be able to specify cypher suites independently for upstream and downstream connections? We'd also need to have a set of supported cypher suites and a command line flag to let the user dump them (or, at a minimum, a list in the documentation).
Cheers,
Aldo
--
Aldo Cortesi
blog:
http://corte.si
twitter: @cortesi
work:
www.nullcube.com
+64 210 718 900