We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc9b257 commit 94f3c41Copy full SHA for 94f3c41
scripts/oauth-get-token.py
@@ -149,13 +149,13 @@ def do_GET (self):
149
httpd = HTTPServer (('localhost', port), RQ_Handler)
150
151
if self.use_tls:
152
- httpd.socket = ssl.wrap_socket \
153
- ( httpd.socket
154
- , keyfile = self.args.keyfile
155
- , certfile = self.args.certfile
156
- , server_side = True
+ context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
+ context.load_cert_chain \
+ ( keyfile = self.args.keyfile
+ , certfile = self.args.certfile
157
)
158
-
+ httpd.socket = context.wrap_socket \
+ (httpd.socket, server_side = True)
159
while not self.request_received:
160
httpd.handle_request ()
161
# end def https_server
0 commit comments