diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-02-27 18:33:48 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-02-27 18:33:48 +1300 |
commit | a1d0da2b533b986967a8714c02d567c943d11929 (patch) | |
tree | 85bef20967e278071c6ac3de9546d9b7f4d8a17d /pathod | |
parent | 0c04abb6e4c549646c06ef9e270d1b42c1ffaf1d (diff) | |
download | mitmproxy-a1d0da2b533b986967a8714c02d567c943d11929.tar.gz mitmproxy-a1d0da2b533b986967a8714c02d567c943d11929.tar.bz2 mitmproxy-a1d0da2b533b986967a8714c02d567c943d11929.zip |
Expand SSL support
- Cipher suite selection for both pathoc and pathod
- SSL version specification for pathod
- Expose SSLv23 as an option, and use it by default
Diffstat (limited to 'pathod')
-rwxr-xr-x | pathod | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -38,7 +38,9 @@ def main(parser, args): ssloptions = pathod.SSLOptions( keyfile = args.ssl_keyfile, certfile = args.ssl_certfile, - not_after_connect = args.ssl_not_after_connect + not_after_connect = args.ssl_not_after_connect, + ciphers = args.ciphers, + sslversion = utils.SSLVERSIONS[args.sslversion] ) alst = [] @@ -100,7 +102,7 @@ def main(parser, args): parser.error("%s You probably want to a -d argument."%str(v)) try: - print "%s listening on %s:%s"%(version.NAMEVERSION, args.address, pd.address.port) + print "%s listening on %s:%s"%(version.NAMEVERSION, pd.address.host, pd.address.port) pd.serve_forever() except KeyboardInterrupt: pass @@ -172,7 +174,15 @@ if __name__ == "__main__": "--certfile", dest='ssl_certfile', default=None, type=str, help='SSL cert file. If not specified, a default cert is used.' ) - + group.add_argument( + "--ciphers", dest="ciphers", type=str, default=False, + help="SSL cipher specification" + ) + group.add_argument( + "--sslversion", dest="sslversion", type=int, default=4, + choices=[1, 2, 3, 4], + help="Use a specified protocol - TLSv1, SSLv2, SSLv3, SSLv23. Default to SSLv23." + ) group = parser.add_argument_group( 'Controlling Logging', |