File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,19 @@ def do_GET (self):
149149 httpd = HTTPServer (('localhost' , port ), RQ_Handler )
150150
151151 if self .use_tls :
152- context = ssl .SSLContext (ssl .PROTOCOL_TLS_SERVER )
152+ # note this opens a server on localhost. Only
153+ # a process on the same host can get the credentials.
154+ # Even unencrypted (http://) url is fine as the credentials
155+ # will be saved in clear text on disk for use. So a
156+ # compromised local host will still get the credentials.
157+ context = ssl .SSLContext (ssl_version = ssl .PROTOCOL_TLS_SERVER )
158+
159+ # This should not be needed. Uses Python 3.10+ setting.
160+ # context.maximum_version = ssl.TLSVersion.TLSv1_2
161+ # for previous versions maybe:
162+ # ssl.PROTOCOL_TLSv1_2
163+ # would work?
164+
153165 context .load_cert_chain \
154166 ( keyfile = self .args .keyfile
155167 , certfile = self .args .certfile
You can’t perform that action at this time.
0 commit comments