Allow specifying the accepted ciphersuites
This commit is contained in:
parent
061cea89da
commit
4ffaadd435
|
@ -22,8 +22,9 @@ class ProxyError(Exception):
|
|||
|
||||
|
||||
class Config:
|
||||
def __init__(self, pemfile):
|
||||
def __init__(self, pemfile, ciphers = None):
|
||||
self.pemfile = pemfile
|
||||
self.ciphers = ciphers
|
||||
|
||||
|
||||
def read_chunked(fp):
|
||||
|
@ -520,6 +521,7 @@ class ProxyHandler(SocketServer.StreamRequestHandler):
|
|||
keyfile = config.pemfile,
|
||||
server_side = True,
|
||||
ssl_version = ssl.PROTOCOL_SSLv23,
|
||||
ciphers = config.ciphers,
|
||||
do_handshake_on_connect = False
|
||||
)
|
||||
self.rfile = FileLike(self.connection)
|
||||
|
|
8
mitmdump
8
mitmdump
|
@ -31,6 +31,11 @@ if __name__ == '__main__':
|
|||
type = "str", dest="cert", default="~/.mitmproxy/cert.pem",
|
||||
help = "SSL certificate file."
|
||||
)
|
||||
parser.add_option(
|
||||
"--ciphers", action="store",
|
||||
type = "str", dest="ciphers", default=None,
|
||||
help = "SSL ciphers."
|
||||
)
|
||||
parser.add_option(
|
||||
"-p", "--port", action="store",
|
||||
type = "int", dest="port", default=8080,
|
||||
|
@ -54,7 +59,8 @@ if __name__ == '__main__':
|
|||
utils.make_bogus_cert(certpath)
|
||||
|
||||
proxy.config = proxy.Config(
|
||||
certpath
|
||||
certpath,
|
||||
ciphers = options.ciphers
|
||||
)
|
||||
server = proxy.ProxyServer(options.port)
|
||||
m = dump.DumpMaster(server, options.verbose)
|
||||
|
|
|
@ -36,6 +36,12 @@ if __name__ == '__main__':
|
|||
help = "SSL certificate file."
|
||||
)
|
||||
|
||||
parser.add_option(
|
||||
"--ciphers", action="store",
|
||||
type = "str", dest="ciphers", default=None,
|
||||
help = "SSL ciphers."
|
||||
)
|
||||
|
||||
parser.add_option(
|
||||
"-p", "--port", action="store",
|
||||
type = "int", dest="port", default=8080,
|
||||
|
@ -68,7 +74,8 @@ if __name__ == '__main__':
|
|||
utils.make_bogus_cert(certpath)
|
||||
|
||||
proxy.config = proxy.Config(
|
||||
certpath
|
||||
certpath,
|
||||
ciphers = options.ciphers
|
||||
)
|
||||
server = proxy.ProxyServer(options.port)
|
||||
m = playback.PlaybackMaster(server, options)
|
||||
|
|
|
@ -39,6 +39,12 @@ if __name__ == '__main__':
|
|||
help = "SSL certificate file."
|
||||
)
|
||||
|
||||
parser.add_option(
|
||||
"--ciphers", action="store",
|
||||
type = "str", dest="ciphers", default=None,
|
||||
help = "SSL ciphers."
|
||||
)
|
||||
|
||||
parser.add_option(
|
||||
"-p", "--port", action="store",
|
||||
type = "int", dest="port", default=8080,
|
||||
|
@ -97,7 +103,8 @@ if __name__ == '__main__':
|
|||
utils.make_bogus_cert(certpath)
|
||||
|
||||
proxy.config = proxy.Config(
|
||||
certpath
|
||||
certpath,
|
||||
ciphers = options.ciphers
|
||||
)
|
||||
if options.cache is not None:
|
||||
utils.mkdir_p(options.cache)
|
||||
|
|
|
@ -35,6 +35,12 @@ if __name__ == '__main__':
|
|||
help = "SSL certificate file."
|
||||
)
|
||||
|
||||
parser.add_option(
|
||||
"--ciphers", action="store",
|
||||
type = "str", dest="ciphers", default=None,
|
||||
help = "SSL ciphers."
|
||||
)
|
||||
|
||||
parser.add_option(
|
||||
"-p", "--port", action="store",
|
||||
type = "int", dest="port", default=8080,
|
||||
|
@ -73,7 +79,8 @@ if __name__ == '__main__':
|
|||
utils.make_bogus_cert(certpath)
|
||||
|
||||
proxy.config = proxy.Config(
|
||||
certpath
|
||||
certpath,
|
||||
ciphers = options.ciphers
|
||||
)
|
||||
server = proxy.ProxyServer(options.port)
|
||||
utils.mkdir_p(options.cache)
|
||||
|
|
Loading…
Reference in New Issue