From c8d2876f2340cd751f81b0c187dd0e97c97447cc Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 8 Feb 2016 00:44:38 +0100 Subject: raise error if --http2 is specified, but the OpenSSL version doesn't support it --- libmproxy/proxy/config.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libmproxy/proxy') diff --git a/libmproxy/proxy/config.py b/libmproxy/proxy/config.py index bf765d81..a635ab19 100644 --- a/libmproxy/proxy/config.py +++ b/libmproxy/proxy/config.py @@ -180,6 +180,9 @@ def process_proxy_options(parser, options): parser.error("Certificate file does not exist: %s" % parts[1]) certs.append(parts) + if options.http2 and not tcp.HAS_ALPN: + raise RuntimeError("HTTP2 support requires OpenSSL 1.0.2 or above.") + return ProxyConfig( host=options.addr, port=options.port, -- cgit v1.2.3